diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d58130f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Frameworks/ZeroKit"] + path = Frameworks/ZeroKit + url = git@github.com:eczarny/zerokit.git diff --git a/Configurations/Common.xcconfig b/Configurations/Common.xcconfig index 6b8a42f..3087ffa 100644 --- a/Configurations/Common.xcconfig +++ b/Configurations/Common.xcconfig @@ -1,6 +1,6 @@ ARCHS = $(ARCHS_STANDARD_32_64_BIT) -VALID_ARCHS = i386 ppc x86_64 -SDKROOT = macosx10.6 +VALID_ARCHS = i386 x86_64 +SDKROOT = macosx10.7 PREBINDING = NO RUN_CLANG_STATIC_ANALYZER = YES @@ -13,4 +13,5 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES GCC_WARN_ABOUT_RETURN_TYPE = YES GCC_WARN_UNUSED_VARIABLE = YES +GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO GCC_TREAT_WARNINGS_AS_ERRORS = YES diff --git a/Configurations/CommonDevelopment.xcconfig b/Configurations/CommonDevelopment.xcconfig index 80228cc..87b5325 100644 --- a/Configurations/CommonDevelopment.xcconfig +++ b/Configurations/CommonDevelopment.xcconfig @@ -2,8 +2,6 @@ DEBUG_INFORMATION_FORMAT = dwarf -ONLY_ACTIVE_ARCH = YES - COPY_PHASE_STRIP = NO GCC_DYNAMIC_NO_PIC = NO diff --git a/Frameworks/ZeroKit b/Frameworks/ZeroKit new file mode 160000 index 0000000..e5d04aa --- /dev/null +++ b/Frameworks/ZeroKit @@ -0,0 +1 @@ +Subproject commit e5d04aaced51e16a8688e861c5f29ff7e32a7a22 diff --git a/Languages/English.lproj/SpectaclePreferencePane.xib b/Languages/English.lproj/SpectaclePreferencePane.xib index 8cb54a3..326fe59 100644 --- a/Languages/English.lproj/SpectaclePreferencePane.xib +++ b/Languages/English.lproj/SpectaclePreferencePane.xib @@ -1,21 +1,31 @@ - 1060 - 10H574 - 804 - 1038.35 - 461.00 - - 804 - 1.2.5 - - - + 1070 + 11C74 + 1938 + 1138.23 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + NSButton + NSTextFieldCell + NSImageView + NSButtonCell + NSImageCell + NSTabView + NSCustomView + NSTabViewItem + NSWindowTemplate + NSView + NSTextField + NSCustomObject com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit PluginDependencyRecalculationVersion @@ -41,6 +51,7 @@ View + {668, 455} {668, 455} @@ -52,6 +63,8 @@ 36 {{238, 32}, {417, 417}} + + 1 @@ -62,8 +75,10 @@ 268 - {{59, 307}, {130, 17}} + {{47, 307}, {142, 17}} + + YES 68288064 @@ -100,13 +115,17 @@ 268 {{194, 334}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 - {{59, 336}, {130, 17}} + {{47, 336}, {142, 17}} + + YES 68288064 @@ -123,13 +142,17 @@ 268 {{194, 305}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 - {{59, 75}, {130, 17}} + {{47, 75}, {142, 17}} + + YES 68288064 @@ -144,8 +167,10 @@ 268 - {{59, 46}, {130, 17}} + {{47, 46}, {142, 17}} + + YES 68288064 @@ -162,34 +187,44 @@ 268 {{194, 44}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 102}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 15}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 73}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 - {{59, 104}, {130, 17}} + {{47, 104}, {142, 17}} + + YES 68288064 @@ -204,8 +239,10 @@ 268 - {{59, 17}, {130, 17}} + {{47, 17}, {142, 17}} + + YES 68288064 @@ -220,8 +257,10 @@ 268 - {{59, 162}, {130, 17}} + {{47, 162}, {142, 17}} + + YES 68288064 @@ -236,8 +275,10 @@ 268 - {{59, 249}, {130, 17}} + {{47, 249}, {142, 17}} + + YES 68288064 @@ -254,34 +295,44 @@ 268 {{194, 160}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 218}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 247}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 {{194, 189}, {140, 21}} - SpectacleHotKeyRecorder + + + ZeroKitHotKeyRecorder 268 - {{59, 220}, {130, 17}} + {{47, 220}, {142, 17}} + + YES 68288064 @@ -296,8 +347,10 @@ 268 - {{59, 191}, {130, 17}} + {{47, 191}, {142, 17}} + + YES 68288064 @@ -312,6 +365,8 @@ {{10, 33}, {397, 371}} + + General @@ -326,8 +381,9 @@ 268 - {{59, 307}, {130, 17}} + {{47, 307}, {142, 17}} + YES 68288064 @@ -344,13 +400,15 @@ 268 {{194, 334}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder 268 - {{59, 336}, {130, 17}} + {{47, 336}, {142, 17}} + YES 68288064 @@ -367,13 +425,15 @@ 268 {{194, 305}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder 268 - {{59, 249}, {130, 17}} + {{47, 249}, {142, 17}} + YES 68288064 @@ -390,13 +450,15 @@ 268 {{194, 276}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder 268 - {{59, 278}, {130, 17}} + {{47, 278}, {142, 17}} + YES 68288064 @@ -413,13 +475,15 @@ 268 {{194, 247}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder 268 - {{59, 191}, {130, 17}} + {{47, 191}, {142, 17}} + YES 68288064 @@ -436,13 +500,15 @@ 268 {{194, 189}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder 268 - {{59, 162}, {130, 17}} + {{47, 162}, {142, 17}} + YES 68288064 @@ -459,10 +525,12 @@ 268 {{194, 160}, {140, 21}} - SpectacleHotKeyRecorder + + ZeroKitHotKeyRecorder {{10, 33}, {397, 371}} + Misc. @@ -483,6 +551,8 @@ 268 {{22, 182}, {200, 28}} + + SpectacleToggleSwitch @@ -498,6 +568,8 @@ {{56, 287}, {132, 132}} + + YES 130560 @@ -513,17 +585,19 @@ YES - + 268 {{32, 247}, {181, 39}} + + YES - + 68288064 138413056 Spectacle - + LucidaGrande-Bold 32 16 @@ -538,47 +612,19 @@ MQA - + 1 MCAwIDAAA - YES - YES - NO - - 1 - MSAxIDEAA - - - - - - - 2 - 2 - - - - -1 - - - - - 1 - MC4zMjk3MTQ5MjU1IDAuMzc5MjE3MjcxNSAwLjQzMzY3MzQ2OTQAA - - - 1 - MC41NjA2NDczNjY2IDAuNjA1Mzg4OTczNyAwLjY1ODE2MzI2NTMAA - - - + 268 {{53, 231}, {138, 14}} + + YES 68288064 @@ -602,6 +648,7 @@ -2147483349 {{481, 14}, {169, 18}} + YES 67239424 @@ -629,6 +676,8 @@ 299 {{243, 14}, {183, 18}} + + YES 67239424 @@ -649,10 +698,13 @@ {668, 455} + + - {{0, 0}, {1600, 1178}} + {{0, 0}, {2560, 1418}} {668, 477} {668, 477} + YES @@ -1323,123 +1375,49 @@ + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{306, 153}, {668, 455}} com.apple.InterfaceBuilder.CocoaPlugin - {{306, 153}, {668, 455}} - - - - {668, 455} - {668, 455} com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABBUAAAw9+AAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDqwAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAw7OAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDnIAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAw6UAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDfwAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAw4gAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDYgAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAw3MAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDRQAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAw1YAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABDKAAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAwzkAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUNCAABCygAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAwwYAAA - com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABCsAAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAwtIAAA - com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABCbAAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAwpgAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKiAABB8AAAA - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAADCWAAAwjwAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABB8AAAwxgAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABCGAAAwxQAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -1454,94 +1432,64 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABCbAAAwqoAAA - com.apple.InterfaceBuilder.CocoaPlugin - - AUNCAABCiAAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABCbAAAwmAAAA - com.apple.InterfaceBuilder.CocoaPlugin - - AUNCAABCHAAAA - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - AUKIAABCzgAAA - com.apple.InterfaceBuilder.CocoaPlugin - - AULMAABDZgAAA - - com.brandonwalkin.BWToolkit - - P4AAAL+AAABCnAAAw1wAAA - - com.brandonwalkin.BWToolkit - - P4AAAL+AAABCxgAAwzEAAA - - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - 358 + 360 - - FirstResponder - NSObject - - IBUserSource - - - NSPreferencePane NSObject - - IBUserSource - - - - - SpectacleHotKeyRecorder - NSControl + + NSView + NSView + NSView + NSWindow + + + + _firstKeyView + NSView + + + _initialKeyView + NSView + + + _lastKeyView + NSView + + + _window + NSWindow + + IBProjectSource - SpectacleHotKeyRecorder.h + ./Classes/NSPreferencePane.h SpectaclePreferencePane NSPreferencePane - - id - id - - - - toggleCheckForUpdates: - id - - - toggleLoginItem: - id - - NSButton NSButton @@ -1563,7 +1511,6 @@ NSTextField SpectacleToggleSwitch SpectacleHotKeyRecorder - id @@ -1646,14 +1593,10 @@ myUndoLastMoveHotKeyRecorder SpectacleHotKeyRecorder - - myVendedHelperController - id - IBProjectSource - SpectaclePreferencePane.h + ./Classes/SpectaclePreferencePane.h @@ -1661,566 +1604,22 @@ NSControl IBProjectSource - SpectacleToggleSwitch.h - - - - - - BWInsetTextField - NSTextField - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWInsetTextField.h - - - - BWStyledTextField - NSTextField - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWStyledTextField.h - - - - BWStyledTextFieldCell - NSTextFieldCell - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWStyledTextFieldCell.h - - - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSApplication - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSImageCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSImageCell.h - - - - NSImageView - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSImageView.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUAppcast.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUUpdater.h - - - - NSPreferencePane - NSObject - - NSView - NSView - NSView - NSWindow - - - - _firstKeyView - NSView - - - _initialKeyView - NSView - - - _lastKeyView - NSView - - - _window - NSWindow - - - - IBFrameworkSource - PreferencePanes.framework/Headers/NSPreferencePane.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h + ./Classes/SpectacleToggleSwitch.h - NSTabView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTabView.h - - - - NSTabViewItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTabViewItem.h - - - - NSTextField + ZeroKitHotKeyRecorder NSControl - IBFrameworkSource - AppKit.framework/Headers/NSTextField.h - - - - NSTextFieldCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSTextFieldCell.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSView+BWAdditions.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - NSWindow - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h + IBProjectSource + ./Classes/ZeroKitHotKeyRecorder.h 0 IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - YES - ../../Spectacle.xcodeproj 3 {128, 128} diff --git a/README.md b/README.md index 376cdf1..3b652b7 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,15 @@ Spectacle allows you to easily organize your windows without using a mouse. Spectacle has been built, and designed, for Mac OS X 10.6 or later. -In order to build Spectacle you will need to install [Sparkle] [1], [BWToolkit] [2], and [ZeroKit] [3]. Please download and install these frameworks to: +In order to build Spectacle you will need to install [Sparkle] [1]. Please download and install Sparkle to: /Library/Frameworks/ +Next, pull down [ZeroKit] [2] as a submodule with the following commands: + + $ git submodule init + $ git submodule update + If everything is in its proper place the Xcode build should succeed. # What if I find a bug, or what if I want to help? @@ -27,5 +32,4 @@ Spectacle should be accompanied by a LICENSE file containing the license relevan If no LICENSE exists please contact Eric Czarny . [1]: http://sparkle.andymatuschak.org -[2]: http://brandonwalkin.com/bwtoolkit -[3]: http://github.com/eczarny/zerokit +[2]: http://github.com/eczarny/zerokit diff --git a/Resources/Property Lists/Defaults.plist b/Resources/Property Lists/Defaults.plist index c02cdb4..8c05f22 100644 --- a/Resources/Property Lists/Defaults.plist +++ b/Resources/Property Lists/Defaults.plist @@ -3,36 +3,36 @@ MoveToBottomHalf - YnBsaXN0MDDUAQIDBAUGGRpYJHZ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AAAAAANw= RedoLastMove - YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRCwAQBoACXFJlZG9MYXN0TW92ZdITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNfEA9TcGVjdGFjbGVIb3RLZXmiFxhfEA9TcGVjdGFjbGVIb3RLZXlYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1JcZGlrbnByf4SPmKqtv8ja3eIAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA5A== + YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRCwAQBoACXFJlZG9MYXN0TW92ZdITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNdWmVyb0tpdEhvdEtleaIXGF1aZXJvS2l0SG90S2V5WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktSXGRpa25wcn+Ej5imqbfA0tXaAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAANw= diff --git a/Resources/Property Lists/SpecialHotKeyTranslations.plist b/Resources/Property Lists/SpecialHotKeyTranslations.plist deleted file mode 100644 index beab86e..0000000 --- a/Resources/Property Lists/SpecialHotKeyTranslations.plist +++ /dev/null @@ -1,92 +0,0 @@ - - - - - SpecialHotKeyTranslations - - 122 - F1 - 120 - F2 - 99 - F3 - 118 - F4 - 96 - F5 - 97 - F6 - 98 - F7 - 100 - F8 - 101 - F9 - 109 - F10 - 103 - F11 - 111 - F12 - 105 - F13 - 107 - F14 - 113 - F15 - 106 - F16 - 64 - F17 - 79 - F18 - 80 - F19 - 49 - Space - 51 - SpectacleHotKeyDeleteLeftGlyph - 117 - SpectacleHotKeyDeleteRightGlyph - 123 - SpectacleHotKeyLeftArrowGlyph - 124 - SpectacleHotKeyRightArrowGlyph - 126 - SpectacleHotKeyUpArrowGlyph - 125 - SpectacleHotKeyDownArrowGlyph - 121 - SpectacleHotKeyPageDownGlyph - 116 - SpectacleHotKeyPageUpGlyph - 36 - SpectacleHotKeyReturnGlyph - 48 - SpectacleHotKeyTabRightGlyph - - SpecialHotKeyGlyphTranslations - - SpectacleHotKeyDeleteLeftGlyph - 9003 - SpectacleHotKeyDeleteRightGlyph - 8998 - SpectacleHotKeyLeftArrowGlyph - 8592 - SpectacleHotKeyRightArrowGlyph - 8594 - SpectacleHotKeyUpArrowGlyph - 8593 - SpectacleHotKeyDownArrowGlyph - 8595 - SpectacleHotKeyPageDownGlyph - 8671 - SpectacleHotKeyPageUpGlyph - 8670 - SpectacleHotKeyReturnGlyph - 8617 - SpectacleHotKeyTabRightGlyph - 8677 - - - diff --git a/Spectacle.xcodeproj/project.pbxproj b/Spectacle.xcodeproj/project.pbxproj index 4e512c9..65f6dbd 100644 --- a/Spectacle.xcodeproj/project.pbxproj +++ b/Spectacle.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 070031B01217712E001D4C46 /* HotKeyNames.plist in Resources */ = {isa = PBXBuildFile; fileRef = 070031AF1217712E001D4C46 /* HotKeyNames.plist */; }; - 0700947B11A5F575000C87DC /* SpecialHotKeyTranslations.plist in Resources */ = {isa = PBXBuildFile; fileRef = 07BB4DFA11A3686F0021B27A /* SpecialHotKeyTranslations.plist */; }; 07088271119A301800EC9426 /* SpectacleHelperController.m in Sources */ = {isa = PBXBuildFile; fileRef = 07088270119A301800EC9426 /* SpectacleHelperController.m */; }; 07088356119A443E00EC9426 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0747DB061183ACD600F75DD2 /* InfoPlist.strings */; }; 070D2B10128B43080022D02C /* SpectacleToggleSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 070D2B0F128B43080022D02C /* SpectacleToggleSwitch.m */; }; @@ -17,45 +16,32 @@ 070D2B29128B52A90022D02C /* SliderHandlePressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 070D2B25128B52A90022D02C /* SliderHandlePressed.png */; }; 070D2B2A128B52A90022D02C /* SliderMask.png in Resources */ = {isa = PBXBuildFile; fileRef = 070D2B26128B52A90022D02C /* SliderMask.png */; }; 070D2B2B128B52A90022D02C /* SliderBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 070D2B27128B52A90022D02C /* SliderBackground.png */; }; - 070D2CD611E4C08D00C8DC0A /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 07CCF9E811E41E850054483C /* Sparkle.framework */; }; 072EAD00118A4D5A0015FC8A /* SpectacleWindowPositionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 072EACFF118A4D5A0015FC8A /* SpectacleWindowPositionManager.m */; }; - 0742996F1192379900C79D03 /* SpectacleHotKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 076780B611867BA400614FB5 /* SpectacleHotKey.m */; }; - 074299701192379900C79D03 /* SpectacleHotKeyAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 07E632101187A7D100451374 /* SpectacleHotKeyAction.m */; }; 0747DB051183ACC600F75DD2 /* SpectaclePreferencePane.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0747DB031183ACC600F75DD2 /* SpectaclePreferencePane.xib */; }; 0747DB081183ACD600F75DD2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0747DB061183ACD600F75DD2 /* InfoPlist.strings */; }; 074A8F72119FAF9300940841 /* Defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0706C0431191092B0068F04B /* Defaults.plist */; }; 074F0B8112BD5E3100A8CF3F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 074F0B8012BD5E3100A8CF3F /* QuartzCore.framework */; }; - 0752C74811E4D6B900AB6A46 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07CCF9E811E41E850054483C /* Sparkle.framework */; }; - 0760BB35128B040400FAFC77 /* BWToolkitFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */; }; - 0760BB68128B065D00FAFC77 /* BWToolkitFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */; }; - 0760BB69128B066A00FAFC77 /* BWToolkitFramework.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */; }; - 0760BB6A128B067000FAFC77 /* BWToolkitFramework.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */; }; 0766438A11A212A800B7BFA3 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0766438911A212A800B7BFA3 /* CoreServices.framework */; }; 076644FB11A212D700B7BFA3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07E632151187AAD800451374 /* Carbon.framework */; }; 07678097118679C600614FB5 /* SpectacleHotKeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 07678096118679C600614FB5 /* SpectacleHotKeyManager.m */; }; - 076780B811867BA400614FB5 /* SpectacleHotKey.m in Sources */ = {isa = PBXBuildFile; fileRef = 076780B611867BA400614FB5 /* SpectacleHotKey.m */; }; 077938BF1184F9C10013BC14 /* SpectacleHelper.app in Resources */ = {isa = PBXBuildFile; fileRef = 077938B61184F96A0013BC14 /* SpectacleHelper.app */; }; 077938E61184FADB0013BC14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 077938E51184FADB0013BC14 /* main.m */; }; 077939041184FB3C0013BC14 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 077939131184FCD20013BC14 /* SpectacleHelper.xib in Resources */ = {isa = PBXBuildFile; fileRef = 077939111184FCD20013BC14 /* SpectacleHelper.xib */; }; 079CDA0F1221BAFF0099612C /* SpectacleHistoryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 079CDA0E1221BAFF0099612C /* SpectacleHistoryItem.m */; }; - 07BB53DC118655F10045663F /* ZeroKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07BB53DB118655F10045663F /* ZeroKit.framework */; }; - 07BB53E5118656050045663F /* ZeroKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07BB53DB118655F10045663F /* ZeroKit.framework */; }; - 07BB53FE1186565B0045663F /* ZeroKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 07BB53DB118655F10045663F /* ZeroKit.framework */; }; - 07BB53FF1186565E0045663F /* ZeroKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 07BB53DB118655F10045663F /* ZeroKit.framework */; }; 07BB5406118657190045663F /* SpectacleHelperApplicationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 07BB5405118657190045663F /* SpectacleHelperApplicationController.m */; }; 07BB542D1186662F0045663F /* SpectacleUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 07BB542C1186662F0045663F /* SpectacleUtilities.m */; }; 07BB542E1186662F0045663F /* SpectacleUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 07BB542C1186662F0045663F /* SpectacleUtilities.m */; }; 07BB544C11866B090045663F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 07BB544A11866B090045663F /* Localizable.strings */; }; 07BB544D11866B090045663F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 07BB544A11866B090045663F /* Localizable.strings */; }; 07C9360B11E7809900735C13 /* dsa_public.pem in Resources */ = {isa = PBXBuildFile; fileRef = 07CCF9F911E41F2B0054483C /* dsa_public.pem */; }; - 07CFE2AA1198D75F004C39BD /* SpectacleHotKeyTranslator.m in Sources */ = {isa = PBXBuildFile; fileRef = 07CFE2A91198D75F004C39BD /* SpectacleHotKeyTranslator.m */; }; - 07CFE2C41198E92E004C39BD /* SpectacleHotKeyTranslator.m in Sources */ = {isa = PBXBuildFile; fileRef = 07CFE2A91198D75F004C39BD /* SpectacleHotKeyTranslator.m */; }; - 07E632111187A7D100451374 /* SpectacleHotKeyAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 07E632101187A7D100451374 /* SpectacleHotKeyAction.m */; }; 07E632161187AAD800451374 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07E632151187AAD800451374 /* Carbon.framework */; }; - 07EE10FF11937F7200D6F536 /* SpectacleHotKeyRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 07EE10FE11937F7200D6F536 /* SpectacleHotKeyRecorder.m */; }; - 07EE11021193806300D6F536 /* SpectacleHotKeyRecorderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 07EE11011193806300D6F536 /* SpectacleHotKeyRecorderCell.m */; }; - 07EFB4DA11890E3E003CBBDB /* SpectacleAccessibilityElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 07EFB4D911890E3E003CBBDB /* SpectacleAccessibilityElement.m */; }; + 2D2412271475FA830063085D /* ZeroKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 2D6540721475EAE1000133CA /* ZeroKit.framework */; }; + 2D6540741475EB90000133CA /* ZeroKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D6540721475EAE1000133CA /* ZeroKit.framework */; }; + 2D6540751475EBF4000133CA /* ZeroKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 2D6540721475EAE1000133CA /* ZeroKit.framework */; }; + 2D65407B1475ECCA000133CA /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D65407A1475ECCA000133CA /* Sparkle.framework */; }; + 2D65407D1475ECD5000133CA /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 2D65407A1475ECCA000133CA /* Sparkle.framework */; }; + 2D65407F1475ECF1000133CA /* ZeroKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D65407E1475ECF1000133CA /* ZeroKit.framework */; }; 8D202CF10486D31800D8A456 /* SpectaclePreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = F506C03D013D9D7901CA16C8 /* SpectaclePreferencePane.m */; }; 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F506C035013D953901CA16C8 /* PreferencePanes.framework */; }; @@ -69,6 +55,27 @@ remoteGlobalIDString = 077938B51184F96A0013BC14; remoteInfo = SpectacleHelper; }; + 2D2412281475FB0E0063085D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8DC2EF4F0486A6940098B216; + remoteInfo = ZeroKit; + }; + 2D24122A1475FB160063085D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8DC2EF4F0486A6940098B216; + remoteInfo = ZeroKit; + }; + 2D6540711475EAE1000133CA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8DC2EF5B0486A6940098B216; + remoteInfo = ZeroKit; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -78,9 +85,8 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 0760BB6A128B067000FAFC77 /* BWToolkitFramework.framework in Copy Frameworks */, - 070D2CD611E4C08D00C8DC0A /* Sparkle.framework in Copy Frameworks */, - 07BB53FF1186565E0045663F /* ZeroKit.framework in Copy Frameworks */, + 2D65407D1475ECD5000133CA /* Sparkle.framework in Copy Frameworks */, + 2D6540751475EBF4000133CA /* ZeroKit.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -91,8 +97,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 0760BB69128B066A00FAFC77 /* BWToolkitFramework.framework in Copy Frameworks */, - 07BB53FE1186565B0045663F /* ZeroKit.framework in Copy Frameworks */, + 2D2412271475FA830063085D /* ZeroKit.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -125,12 +130,9 @@ 0747DB041183ACC600F75DD2 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Languages/English.lproj/SpectaclePreferencePane.xib; sourceTree = ""; }; 0747DB071183ACD600F75DD2 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = Languages/English.lproj/InfoPlist.strings; sourceTree = ""; }; 074F0B8012BD5E3100A8CF3F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BWToolkitFramework.framework; path = Library/Frameworks/BWToolkitFramework.framework; sourceTree = SDKROOT; }; 0766438911A212A800B7BFA3 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; 07678095118679C600614FB5 /* SpectacleHotKeyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyManager.h; sourceTree = ""; }; 07678096118679C600614FB5 /* SpectacleHotKeyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKeyManager.m; sourceTree = ""; }; - 076780B511867BA400614FB5 /* SpectacleHotKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKey.h; sourceTree = ""; }; - 076780B611867BA400614FB5 /* SpectacleHotKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKey.m; sourceTree = ""; }; 077938B61184F96A0013BC14 /* SpectacleHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpectacleHelper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 077938B81184F96A0013BC14 /* SpectacleHelper-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "SpectacleHelper-Info.plist"; path = "Resources/Property Lists/SpectacleHelper-Info.plist"; sourceTree = ""; }; 077938E51184FADB0013BC14 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -141,30 +143,19 @@ 078B0F50118D18CC004EE86C /* SpectacleConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleConstants.h; sourceTree = ""; }; 079CDA0D1221BAFF0099612C /* SpectacleHistoryItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHistoryItem.h; sourceTree = ""; }; 079CDA0E1221BAFF0099612C /* SpectacleHistoryItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHistoryItem.m; sourceTree = ""; }; - 07BB4DFA11A3686F0021B27A /* SpecialHotKeyTranslations.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = SpecialHotKeyTranslations.plist; path = "Resources/Property Lists/SpecialHotKeyTranslations.plist"; sourceTree = ""; }; - 07BB53DB118655F10045663F /* ZeroKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZeroKit.framework; path = Library/Frameworks/ZeroKit.framework; sourceTree = SDKROOT; }; 07BB5404118657190045663F /* SpectacleHelperApplicationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHelperApplicationController.h; sourceTree = ""; }; 07BB5405118657190045663F /* SpectacleHelperApplicationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHelperApplicationController.m; sourceTree = ""; }; 07BB542B1186662F0045663F /* SpectacleUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleUtilities.h; sourceTree = ""; }; 07BB542C1186662F0045663F /* SpectacleUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleUtilities.m; sourceTree = ""; }; 07BB544B11866B090045663F /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = Languages/English.lproj/Localizable.strings; sourceTree = ""; }; - 07CCF9E811E41E850054483C /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Library/Frameworks/Sparkle.framework; sourceTree = SDKROOT; }; 07CCF9F911E41F2B0054483C /* dsa_public.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dsa_public.pem; path = Resources/Sparkle/dsa_public.pem; sourceTree = ""; }; - 07CFE2A81198D75F004C39BD /* SpectacleHotKeyTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyTranslator.h; sourceTree = ""; }; - 07CFE2A91198D75F004C39BD /* SpectacleHotKeyTranslator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKeyTranslator.m; sourceTree = ""; }; - 07E6320F1187A7D100451374 /* SpectacleHotKeyAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyAction.h; sourceTree = ""; }; - 07E632101187A7D100451374 /* SpectacleHotKeyAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKeyAction.m; sourceTree = ""; }; 07E632151187AAD800451374 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; - 07EE10FD11937F7200D6F536 /* SpectacleHotKeyRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyRecorder.h; sourceTree = ""; }; - 07EE10FE11937F7200D6F536 /* SpectacleHotKeyRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKeyRecorder.m; sourceTree = ""; }; - 07EE11001193806300D6F536 /* SpectacleHotKeyRecorderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyRecorderCell.h; sourceTree = ""; }; - 07EE11011193806300D6F536 /* SpectacleHotKeyRecorderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleHotKeyRecorderCell.m; sourceTree = ""; }; - 07EFB4D811890E3E003CBBDB /* SpectacleAccessibilityElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleAccessibilityElement.h; sourceTree = ""; }; - 07EFB4D911890E3E003CBBDB /* SpectacleAccessibilityElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpectacleAccessibilityElement.m; sourceTree = ""; }; - 07F3FAF61197449400247AC2 /* SpectacleHotKeyRecorderDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpectacleHotKeyRecorderDelegate.h; sourceTree = ""; }; 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ZeroKit.xcodeproj; path = Frameworks/ZeroKit/ZeroKit.xcodeproj; sourceTree = ""; }; + 2D65407A1475ECCA000133CA /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = ../../../../../Library/Frameworks/Sparkle.framework; sourceTree = ""; }; + 2D65407E1475ECF1000133CA /* ZeroKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZeroKit.framework; path = "../../../Library/Developer/Xcode/DerivedData/Spectacle-gfuhcjgbmgbmfqaeerwhcojqjawa/Build/Products/Development/ZeroKit.framework"; sourceTree = ""; }; 32DBCFA20370C41700C91783 /* Spectacle.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Spectacle.pch; sourceTree = ""; }; 8D202CF70486D31800D8A456 /* Spectacle-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Spectacle-Info.plist"; path = "Resources/Property Lists/Spectacle-Info.plist"; sourceTree = ""; }; 8D202CF80486D31800D8A456 /* Spectacle.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Spectacle.prefPane; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -178,11 +169,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0760BB68128B065D00FAFC77 /* BWToolkitFramework.framework in Frameworks */, 07E632161187AAD800451374 /* Carbon.framework in Frameworks */, 077939041184FB3C0013BC14 /* Cocoa.framework in Frameworks */, - 0752C74811E4D6B900AB6A46 /* Sparkle.framework in Frameworks */, - 07BB53E5118656050045663F /* ZeroKit.framework in Frameworks */, + 2D65407B1475ECCA000133CA /* Sparkle.framework in Frameworks */, + 2D6540741475EB90000133CA /* ZeroKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -190,13 +180,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0760BB35128B040400FAFC77 /* BWToolkitFramework.framework in Frameworks */, 076644FB11A212D700B7BFA3 /* Carbon.framework in Frameworks */, 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */, 0766438A11A212A800B7BFA3 /* CoreServices.framework in Frameworks */, 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */, 074F0B8112BD5E3100A8CF3F /* QuartzCore.framework in Frameworks */, - 07BB53DC118655F10045663F /* ZeroKit.framework in Frameworks */, + 2D65407F1475ECF1000133CA /* ZeroKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -215,10 +204,6 @@ isa = PBXGroup; children = ( 07F3FAF51197447200247AC2 /* Delegates */, - 07EE10FD11937F7200D6F536 /* SpectacleHotKeyRecorder.h */, - 07EE10FE11937F7200D6F536 /* SpectacleHotKeyRecorder.m */, - 07EE11001193806300D6F536 /* SpectacleHotKeyRecorderCell.h */, - 07EE11011193806300D6F536 /* SpectacleHotKeyRecorderCell.m */, 070D2B0E128B43080022D02C /* SpectacleToggleSwitch.h */, 070D2B0F128B43080022D02C /* SpectacleToggleSwitch.m */, 070D2B11128B431C0022D02C /* SpectacleToggleSwitchCell.h */, @@ -232,8 +217,6 @@ children = ( 07678095118679C600614FB5 /* SpectacleHotKeyManager.h */, 07678096118679C600614FB5 /* SpectacleHotKeyManager.m */, - 07CFE2A81198D75F004C39BD /* SpectacleHotKeyTranslator.h */, - 07CFE2A91198D75F004C39BD /* SpectacleHotKeyTranslator.m */, 07BB542B1186662F0045663F /* SpectacleUtilities.h */, 07BB542C1186662F0045663F /* SpectacleUtilities.m */, 072EACFE118A4D5A0015FC8A /* SpectacleWindowPositionManager.h */, @@ -259,14 +242,8 @@ 0747DAE91183AAC100F75DD2 /* Models */ = { isa = PBXGroup; children = ( - 07EFB4D811890E3E003CBBDB /* SpectacleAccessibilityElement.h */, - 07EFB4D911890E3E003CBBDB /* SpectacleAccessibilityElement.m */, 079CDA0D1221BAFF0099612C /* SpectacleHistoryItem.h */, 079CDA0E1221BAFF0099612C /* SpectacleHistoryItem.m */, - 076780B511867BA400614FB5 /* SpectacleHotKey.h */, - 076780B611867BA400614FB5 /* SpectacleHotKey.m */, - 07E6320F1187A7D100451374 /* SpectacleHotKeyAction.h */, - 07E632101187A7D100451374 /* SpectacleHotKeyAction.m */, ); name = Models; sourceTree = ""; @@ -283,7 +260,6 @@ children = ( 0706C0431191092B0068F04B /* Defaults.plist */, 070031AF1217712E001D4C46 /* HotKeyNames.plist */, - 07BB4DFA11A3686F0021B27A /* SpecialHotKeyTranslations.plist */, 8D202CF70486D31800D8A456 /* Spectacle-Info.plist */, 077938B81184F96A0013BC14 /* SpectacleHelper-Info.plist */, ); @@ -354,7 +330,6 @@ 07F3FAF51197447200247AC2 /* Delegates */ = { isa = PBXGroup; children = ( - 07F3FAF61197449400247AC2 /* SpectacleHotKeyRecorderDelegate.h */, 07415BF712B86B3600BD0B7C /* SpectacleToggleSwitchDelegate.h */, ); name = Delegates; @@ -363,6 +338,7 @@ 089C166AFE841209C02AAC07 /* Spectacle */ = { isa = PBXGroup; children = ( + 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */, 08FB77AFFE84173DC02AAC07 /* Classes */, 32DBCFA10370C40200C91783 /* Other Sources */, 089C167CFE841241C02AAC07 /* Resources */, @@ -409,14 +385,13 @@ 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( - 0760BB34128B040400FAFC77 /* BWToolkitFramework.framework */, 07E632151187AAD800451374 /* Carbon.framework */, 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, 0766438911A212A800B7BFA3 /* CoreServices.framework */, F506C035013D953901CA16C8 /* PreferencePanes.framework */, 074F0B8012BD5E3100A8CF3F /* QuartzCore.framework */, - 07CCF9E811E41E850054483C /* Sparkle.framework */, - 07BB53DB118655F10045663F /* ZeroKit.framework */, + 2D65407A1475ECCA000133CA /* Sparkle.framework */, + 2D65407E1475ECF1000133CA /* ZeroKit.framework */, ); name = "Linked Frameworks"; sourceTree = ""; @@ -439,6 +414,14 @@ name = Products; sourceTree = ""; }; + 2D65406B1475EAE1000133CA /* Products */ = { + isa = PBXGroup; + children = ( + 2D6540721475EAE1000133CA /* ZeroKit.framework */, + ); + name = Products; + sourceTree = ""; + }; 32DBCFA10370C40200C91783 /* Other Sources */ = { isa = PBXGroup; children = ( @@ -464,6 +447,7 @@ buildRules = ( ); dependencies = ( + 2D2412291475FB0E0063085D /* PBXTargetDependency */, ); name = SpectacleHelper; productName = SpectacleHelper; @@ -485,6 +469,7 @@ ); dependencies = ( 077938BE1184F9780013BC14 /* PBXTargetDependency */, + 2D24122B1475FB160063085D /* PBXTargetDependency */, ); name = Spectacle; productInstallPath = "$(HOME)/Library/PreferencePanes"; @@ -497,6 +482,9 @@ /* Begin PBXProject section */ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; buildConfigurationList = 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "Spectacle" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; @@ -509,6 +497,12 @@ ); mainGroup = 089C166AFE841209C02AAC07 /* Spectacle */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 2D65406B1475EAE1000133CA /* Products */; + ProjectRef = 2D65406A1475EAE1000133CA /* ZeroKit.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 8D202CE80486D31800D8A456 /* Spectacle */, @@ -517,6 +511,16 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 2D6540721475EAE1000133CA /* ZeroKit.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = ZeroKit.framework; + remoteRef = 2D6540711475EAE1000133CA /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 077938B21184F96A0013BC14 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -526,7 +530,6 @@ 070031B01217712E001D4C46 /* HotKeyNames.plist in Resources */, 07088356119A443E00EC9426 /* InfoPlist.strings in Resources */, 07BB544C11866B090045663F /* Localizable.strings in Resources */, - 0700947B11A5F575000C87DC /* SpecialHotKeyTranslations.plist in Resources */, 077939131184FCD20013BC14 /* SpectacleHelper.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -586,14 +589,10 @@ buildActionMask = 2147483647; files = ( 077938E61184FADB0013BC14 /* main.m in Sources */, - 07EFB4DA11890E3E003CBBDB /* SpectacleAccessibilityElement.m in Sources */, 07BB5406118657190045663F /* SpectacleHelperApplicationController.m in Sources */, 07088271119A301800EC9426 /* SpectacleHelperController.m in Sources */, 079CDA0F1221BAFF0099612C /* SpectacleHistoryItem.m in Sources */, - 076780B811867BA400614FB5 /* SpectacleHotKey.m in Sources */, - 07E632111187A7D100451374 /* SpectacleHotKeyAction.m in Sources */, 07678097118679C600614FB5 /* SpectacleHotKeyManager.m in Sources */, - 07CFE2C41198E92E004C39BD /* SpectacleHotKeyTranslator.m in Sources */, 07BB542D1186662F0045663F /* SpectacleUtilities.m in Sources */, 072EAD00118A4D5A0015FC8A /* SpectacleWindowPositionManager.m in Sources */, ); @@ -603,11 +602,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0742996F1192379900C79D03 /* SpectacleHotKey.m in Sources */, - 074299701192379900C79D03 /* SpectacleHotKeyAction.m in Sources */, - 07EE10FF11937F7200D6F536 /* SpectacleHotKeyRecorder.m in Sources */, - 07EE11021193806300D6F536 /* SpectacleHotKeyRecorderCell.m in Sources */, - 07CFE2AA1198D75F004C39BD /* SpectacleHotKeyTranslator.m in Sources */, 8D202CF10486D31800D8A456 /* SpectaclePreferencePane.m in Sources */, 07BB542E1186662F0045663F /* SpectacleUtilities.m in Sources */, 070D2B10128B43080022D02C /* SpectacleToggleSwitch.m in Sources */, @@ -623,6 +617,16 @@ target = 077938B51184F96A0013BC14 /* SpectacleHelper */; targetProxy = 077938BD1184F9780013BC14 /* PBXContainerItemProxy */; }; + 2D2412291475FB0E0063085D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ZeroKit; + targetProxy = 2D2412281475FB0E0063085D /* PBXContainerItemProxy */; + }; + 2D24122B1475FB160063085D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ZeroKit; + targetProxy = 2D24122A1475FB160063085D /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -665,6 +669,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0779390C1184FBC00013BC14 /* SpectacleHelperDevelopment.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; VERSION_INFO_FILE = ""; }; name = Development; @@ -673,6 +678,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0779390D1184FBC00013BC14 /* SpectacleHelperRelease.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; VERSION_INFO_FILE = ""; }; name = Release; @@ -681,6 +687,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0747DAFB1183AC5100F75DD2 /* SpectacleDevelopment.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + SDKROOT = macosx; VERSION_INFO_FILE = ""; }; name = Development; @@ -689,6 +697,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0747DAFC1183AC5100F75DD2 /* SpectacleRelease.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + SDKROOT = macosx; VERSION_INFO_FILE = ""; }; name = Release; @@ -697,6 +707,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0747DAF81183AC5100F75DD2 /* CommonDevelopment.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(CONFIGURATION_BUILD_DIR)"; + SDKROOT = macosx; }; name = Development; }; @@ -704,6 +716,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 0747DAF91183AC5100F75DD2 /* CommonRelease.xcconfig */; buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(CONFIGURATION_BUILD_DIR)"; + SDKROOT = macosx; }; name = Release; }; diff --git a/SpectacleAccessibilityElement.h b/SpectacleAccessibilityElement.h deleted file mode 100644 index 5c1c4e9..0000000 --- a/SpectacleAccessibilityElement.h +++ /dev/null @@ -1,20 +0,0 @@ -#import -#import - -@interface SpectacleAccessibilityElement : NSObject { - AXUIElementRef myElement; -} - -+ (SpectacleAccessibilityElement *)systemWideElement; - -#pragma mark - - -- (SpectacleAccessibilityElement *)elementWithAttribute: (CFStringRef)attribute; - -#pragma mark - - -- (AXValueRef)valueOfAttribute: (CFStringRef)attribute type: (AXValueType)type; - -- (void)setValue: (AXValueRef)value forAttribute: (CFStringRef)attribute; - -@end diff --git a/SpectacleAccessibilityElement.m b/SpectacleAccessibilityElement.m deleted file mode 100644 index 009721b..0000000 --- a/SpectacleAccessibilityElement.m +++ /dev/null @@ -1,88 +0,0 @@ -#import "SpectacleAccessibilityElement.h" - -@interface SpectacleAccessibilityElement (SpectacleAccessibilityElementPrivate) - -- (void)setElement: (AXUIElementRef)element; - -@end - -#pragma mark - - -@implementation SpectacleAccessibilityElement - -- (id)init { - if (self = [super init]) { - myElement = NULL; - } - - return self; -} - -#pragma mark - - -+ (SpectacleAccessibilityElement *)systemWideElement { - SpectacleAccessibilityElement *systemWideElement = [[[SpectacleAccessibilityElement alloc] init] autorelease]; - - [systemWideElement setElement: AXUIElementCreateSystemWide()]; - - return systemWideElement; -} - -#pragma mark - - -- (SpectacleAccessibilityElement *)elementWithAttribute: (CFStringRef)attribute { - SpectacleAccessibilityElement *element = nil; - AXUIElementRef childElement; - AXError result; - - result = AXUIElementCopyAttributeValue(myElement, attribute, (CFTypeRef *)&childElement); - - if (result == kAXErrorSuccess) { - element = [[[SpectacleAccessibilityElement alloc] init] autorelease]; - - [element setElement: childElement]; - } else { - NSLog(@"Unable to obtain the accessibility element with the specified attribute: %@", attribute); - } - - return element; -} - -#pragma mark - - -- (AXValueRef)valueOfAttribute: (CFStringRef)attribute type: (AXValueType)type { - if (CFGetTypeID(myElement) == AXUIElementGetTypeID()) { - CFTypeRef value; - AXError result; - - result = AXUIElementCopyAttributeValue(myElement, attribute, (CFTypeRef *)&value); - - if ((result == kAXErrorSuccess) && (AXValueGetType(value) == type)) { - return value; - } else { - NSLog(@"There was a problem getting the value of the specified attribute: %@", attribute); - } - } - - return NULL; -} - -- (void)setValue: (AXValueRef)value forAttribute: (CFStringRef)attribute { - AXError result = AXUIElementSetAttributeValue(myElement, attribute, (CFTypeRef *)value); - - if (result != kAXErrorSuccess) { - NSLog(@"There was a problem setting the value of the specified attribute: %@", attribute); - } -} - -@end - -#pragma mark - - -@implementation SpectacleAccessibilityElement (SpectacleAccessibilityElementPrivate) - -- (void)setElement: (AXUIElementRef)element { - myElement = element; -} - -@end diff --git a/SpectacleConstants.h b/SpectacleConstants.h index 366c2d2..d0b8ec8 100644 --- a/SpectacleConstants.h +++ b/SpectacleConstants.h @@ -22,13 +22,6 @@ #pragma mark - -#define SpectacleHotKeyTranslationsPropertyListFile @"SpecialHotKeyTranslations" - -#define SpectacleHotKeyTranslationsKey @"SpecialHotKeyTranslations" -#define SpectacleHotKeyGlyphTranslationsKey @"SpecialHotKeyGlyphTranslations" - -#pragma mark - - #define SpectacleHotKeyNamesPropertyListFile @"HotKeyNames" #pragma mark - diff --git a/SpectacleHelperController.h b/SpectacleHelperController.h index ffe3e1f..51d071e 100644 --- a/SpectacleHelperController.h +++ b/SpectacleHelperController.h @@ -1,14 +1,14 @@ #import #import "SpectacleHelperControllerProtocol.h" -@class SpectacleHotKeyManager, SpectacleHelperApplicationController, SpectacleHotKey; +@class SpectacleHotKeyManager, SpectacleHelperApplicationController, ZeroKitHotKey; @interface SpectacleHelperController : NSObject { SpectacleHotKeyManager *myHotKeyManager; IBOutlet SpectacleHelperApplicationController *myHelperApplicationController; } -- (SpectacleHotKey *)registeredHotKeyForName: (NSString *)name; +- (ZeroKitHotKey *)registeredHotKeyForName: (NSString *)name; #pragma mark - diff --git a/SpectacleHelperController.m b/SpectacleHelperController.m index 9d4e2f0..c2d220c 100644 --- a/SpectacleHelperController.m +++ b/SpectacleHelperController.m @@ -1,8 +1,6 @@ #import "SpectacleHelperController.h" #import "SpectacleHotKeyManager.h" #import "SpectacleHelperApplicationController.h" -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyAction.h" #import "SpectacleUtilities.h" @implementation SpectacleHelperController @@ -17,14 +15,14 @@ - (id)init { #pragma mark - -- (SpectacleHotKey *)registeredHotKeyForName: (NSString *)name { +- (ZeroKitHotKey *)registeredHotKeyForName: (NSString *)name { return [myHotKeyManager registeredHotKeyForName: name]; } #pragma mark - - (void)updateHotKeyWithKeyCode: (NSInteger)keyCode modifiers: (NSInteger)modifiers name: (NSString *)name { - SpectacleHotKey *hotKey = [[[SpectacleHotKey alloc] initWithHotKeyCode: keyCode hotKeyModifiers: modifiers] autorelease]; + ZeroKitHotKey *hotKey = [[[ZeroKitHotKey alloc] initWithHotKeyCode: keyCode hotKeyModifiers: modifiers] autorelease]; [hotKey setHotKeyName: name]; diff --git a/SpectacleHelperControllerProtocol.h b/SpectacleHelperControllerProtocol.h index 81f260b..568fa84 100644 --- a/SpectacleHelperControllerProtocol.h +++ b/SpectacleHelperControllerProtocol.h @@ -1,10 +1,10 @@ #import -@class SpectacleHotKey; +@class ZeroKitHotKey; @protocol SpectacleHelperControllerProtocol -- (bycopy SpectacleHotKey *)registeredHotKeyForName: (NSString *)name; +- (bycopy ZeroKitHotKey *)registeredHotKeyForName: (NSString *)name; #pragma mark - diff --git a/SpectacleHistoryItem.h b/SpectacleHistoryItem.h index bc3bfac..1c1d1a0 100644 --- a/SpectacleHistoryItem.h +++ b/SpectacleHistoryItem.h @@ -1,23 +1,23 @@ #import -@class SpectacleAccessibilityElement; +@class ZeroKitAccessibilityElement; @interface SpectacleHistoryItem : NSObject { - SpectacleAccessibilityElement *myAccessibilityElement; + ZeroKitAccessibilityElement *myAccessibilityElement; CGRect myWindowRect; } -- (id)initWithAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect; +- (id)initWithAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect; #pragma mark - -+ (SpectacleHistoryItem *)historyItemFromAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect; ++ (SpectacleHistoryItem *)historyItemFromAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect; #pragma mark - -- (SpectacleAccessibilityElement *)accessibilityElement; +- (ZeroKitAccessibilityElement *)accessibilityElement; -- (void)setAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement; +- (void)setAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement; #pragma mark - diff --git a/SpectacleHistoryItem.m b/SpectacleHistoryItem.m index 9944792..ad11348 100644 --- a/SpectacleHistoryItem.m +++ b/SpectacleHistoryItem.m @@ -2,7 +2,7 @@ @implementation SpectacleHistoryItem -- (id)initWithAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect { +- (id)initWithAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect { if (self = [super init]) { myAccessibilityElement = [accessibilityElement retain]; myWindowRect = windowRect; @@ -13,17 +13,17 @@ - (id)initWithAccessibilityElement: (SpectacleAccessibilityElement *)accessibili #pragma mark - -+ (SpectacleHistoryItem *)historyItemFromAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect { ++ (SpectacleHistoryItem *)historyItemFromAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement windowRect: (CGRect)windowRect { return [[[SpectacleHistoryItem alloc] initWithAccessibilityElement: accessibilityElement windowRect: windowRect] autorelease]; } #pragma mark - -- (SpectacleAccessibilityElement *)accessibilityElement { +- (ZeroKitAccessibilityElement *)accessibilityElement { return myAccessibilityElement; } -- (void)setAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement { +- (void)setAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement { if (myAccessibilityElement != accessibilityElement) { [myAccessibilityElement release]; diff --git a/SpectacleHotKey.h b/SpectacleHotKey.h deleted file mode 100644 index 2aa9480..0000000 --- a/SpectacleHotKey.h +++ /dev/null @@ -1,61 +0,0 @@ -#import -#import - -@class SpectacleHotKeyAction; - -@interface SpectacleHotKey : NSObject { - NSInteger myHandle; - NSString *myHotKeyName; - SpectacleHotKeyAction *myHotKeyAction; - NSInteger myHotKeyCode; - NSInteger myHotKeyModifiers; - EventHotKeyRef myHotKeyRef; -} - -- (id)initWithHotKeyCode: (NSInteger)hotKeyCode hotKeyModifiers: (NSInteger)hotKeyModifiers; - -#pragma mark - - -- (NSInteger)handle; - -- (void)setHandle: (NSInteger)handle; - -#pragma mark - - -- (NSString *)hotKeyName; - -- (void)setHotKeyName: (NSString *)hotKeyName; - -#pragma mark - - -- (SpectacleHotKeyAction *)hotKeyAction; - -- (void)setHotKeyAction: (SpectacleHotKeyAction *)hotKeyAction; - -#pragma mark - - -- (NSInteger)hotKeyCode; - -- (void)setHotKeyCode: (NSInteger)hotKeyCode; - -#pragma mark - - -- (NSInteger)hotKeyModifiers; - -- (void)setHotKeyModifiers: (NSInteger)hotKeyModifiers; - -#pragma mark - - -- (EventHotKeyRef)hotKeyRef; - -- (void)setHotKeyRef: (EventHotKeyRef)hotKeyRef; - -#pragma mark - - -- (NSString *)displayString; - -#pragma mark - - -+ (BOOL)validCocoaModifiers: (NSInteger)modifiers; - -@end diff --git a/SpectacleHotKey.m b/SpectacleHotKey.m deleted file mode 100644 index 699b030..0000000 --- a/SpectacleHotKey.m +++ /dev/null @@ -1,152 +0,0 @@ -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyAction.h" -#import "SpectacleHotKeyTranslator.h" - -@implementation SpectacleHotKey - -- (id)initWithHotKeyCode: (NSInteger)hotKeyCode hotKeyModifiers: (NSInteger)hotKeyModifiers { - if (self = [super init]) { - myHandle = -1; - myHotKeyName = nil; - myHotKeyAction = nil; - myHotKeyCode = hotKeyCode; - myHotKeyModifiers = [SpectacleHotKeyTranslator convertModifiersToCarbonIfNecessary: hotKeyModifiers]; - myHotKeyRef = NULL; - } - - return self; -} - -#pragma mark - - -- (id)initWithCoder: (NSCoder *)coder { - if (self = [super init]) { - if ([coder allowsKeyedCoding]) { - myHotKeyName = [[coder decodeObjectForKey: @"name"] retain]; - myHotKeyCode = [coder decodeIntegerForKey: @"keyCode"]; - myHotKeyModifiers = [coder decodeIntegerForKey: @"modifiers"]; - } else { - myHotKeyName = [[coder decodeObject] retain]; - - [coder decodeValueOfObjCType: @encode(NSInteger) at: &myHotKeyCode]; - [coder decodeValueOfObjCType: @encode(NSInteger) at: &myHotKeyModifiers]; - } - } - - return self; -} - -#pragma mark - - -- (void)encodeWithCoder: (NSCoder *)coder { - if ([coder allowsKeyedCoding]) { - [coder encodeObject: myHotKeyName forKey: @"name"]; - [coder encodeInteger: myHotKeyCode forKey: @"keyCode"]; - [coder encodeInteger: myHotKeyModifiers forKey: @"modifiers"]; - } else { - [coder encodeObject: myHotKeyName]; - [coder encodeValueOfObjCType: @encode(NSInteger) at: &myHotKeyCode]; - [coder encodeValueOfObjCType: @encode(NSInteger) at: &myHotKeyModifiers]; - } -} - -#pragma mark - - -- (id)replacementObjectForPortCoder: (NSPortCoder *)encoder { - if ([encoder isBycopy]) { - return self; - } - - return [super replacementObjectForPortCoder: encoder]; -} - -#pragma mark - - -- (NSInteger)handle { - return myHandle; -} - -- (void)setHandle: (NSInteger)handle { - myHandle = handle; -} - -#pragma mark - - -- (NSString *)hotKeyName { - return myHotKeyName; -} - -- (void)setHotKeyName: (NSString *)hotKeyName { - if (myHotKeyName != hotKeyName) { - [myHotKeyName release]; - - myHotKeyName = [hotKeyName retain]; - } -} - -#pragma mark - - -- (SpectacleHotKeyAction *)hotKeyAction { - return myHotKeyAction; -} - -- (void)setHotKeyAction: (SpectacleHotKeyAction *)hotKeyAction { - if (myHotKeyAction != hotKeyAction) { - [myHotKeyAction release]; - - myHotKeyAction = [hotKeyAction retain]; - } -} - -#pragma mark - - -- (NSInteger)hotKeyCode { - return myHotKeyCode; -} - -- (void)setHotKeyCode: (NSInteger)hotKeyCode { - myHotKeyCode = hotKeyCode; -} - -#pragma mark - - -- (NSInteger)hotKeyModifiers { - return myHotKeyModifiers; -} - -- (void)setHotKeyModifiers: (NSInteger)hotKeyModifiers { - myHotKeyModifiers = [SpectacleHotKeyTranslator convertModifiersToCarbonIfNecessary: hotKeyModifiers]; -} - -#pragma mark - - -- (EventHotKeyRef)hotKeyRef { - return myHotKeyRef; -} - -- (void)setHotKeyRef: (EventHotKeyRef)hotKeyRef { - myHotKeyRef = hotKeyRef; -} - -#pragma mark - - -- (NSString *)displayString { - return [[SpectacleHotKeyTranslator sharedTranslator] translateHotKey: self]; -} - -#pragma mark - - -+ (BOOL)validCocoaModifiers: (NSInteger)modifiers { - return (modifiers & NSAlternateKeyMask) || (modifiers & NSCommandKeyMask) || (modifiers & NSControlKeyMask) || (modifiers & NSShiftKeyMask); -} - -#pragma mark - - -- (void)dealloc { - [myHotKeyName release]; - [myHotKeyAction release]; - - [super dealloc]; -} - -@end diff --git a/SpectacleHotKeyAction.h b/SpectacleHotKeyAction.h deleted file mode 100644 index 416c46b..0000000 --- a/SpectacleHotKeyAction.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@interface SpectacleHotKeyAction : NSObject { - id myTarget; - SEL mySelector; -} - -- (id)initWithTarget: (id)target selector: (SEL)selector; - -#pragma mark - - -+ (SpectacleHotKeyAction *)hotKeyActionFromTarget: (id)target selector: (SEL)selector; - -#pragma mark - - -- (void)trigger; - -@end diff --git a/SpectacleHotKeyAction.m b/SpectacleHotKeyAction.m deleted file mode 100644 index 69f2a63..0000000 --- a/SpectacleHotKeyAction.m +++ /dev/null @@ -1,31 +0,0 @@ -#import "SpectacleHotKeyAction.h" - -@implementation SpectacleHotKeyAction - -- (id)initWithTarget: (id)target selector: (SEL)selector { - if (self = [super init]) { - myTarget = target; - mySelector = selector; - } - - return self; -} - -#pragma mark - - -+ (SpectacleHotKeyAction *)hotKeyActionFromTarget: (id)target selector: (SEL)selector { - return [[[SpectacleHotKeyAction alloc] initWithTarget: target selector: selector] autorelease]; -} - -#pragma mark - - -- (void)trigger { - if ([myTarget respondsToSelector: mySelector]) { - [myTarget performSelector: mySelector]; - } else { - NSLog(@"Unable to trigger hot key action, the target does not respond to the specified selector."); - } - -} - -@end diff --git a/SpectacleHotKeyManager.h b/SpectacleHotKeyManager.h index c819b85..5d0bd07 100644 --- a/SpectacleHotKeyManager.h +++ b/SpectacleHotKeyManager.h @@ -1,7 +1,7 @@ #import #import -@class SpectacleHotKey; +@class ZeroKitHotKey; @interface SpectacleHotKeyManager : NSObject { NSMutableDictionary *myRegisteredHotKeys; @@ -13,7 +13,7 @@ #pragma mark - -- (NSInteger)registerHotKey: (SpectacleHotKey *)hotKey; +- (NSInteger)registerHotKey: (ZeroKitHotKey *)hotKey; - (void)registerHotKeys: (NSArray *)hotKeys; @@ -27,6 +27,6 @@ - (NSArray *)registeredHotKeys; -- (SpectacleHotKey *)registeredHotKeyForName: (NSString *)name; +- (ZeroKitHotKey *)registeredHotKeyForName: (NSString *)name; @end diff --git a/SpectacleHotKeyManager.m b/SpectacleHotKeyManager.m index a26180f..09aa734 100644 --- a/SpectacleHotKeyManager.m +++ b/SpectacleHotKeyManager.m @@ -1,6 +1,4 @@ #import "SpectacleHotKeyManager.h" -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyAction.h" #import "SpectacleConstants.h" static OSStatus hotKeyEventHandler(EventHandlerCallRef handlerCall, EventRef event, void *data); @@ -17,7 +15,7 @@ - (void)installHotKeyEventHandler; #pragma mark - -- (SpectacleHotKey *)registeredHotKeyForHandle: (NSInteger)handle; +- (ZeroKitHotKey *)registeredHotKeyForHandle: (NSInteger)handle; #pragma mark - @@ -69,9 +67,9 @@ + (SpectacleHotKeyManager *)sharedManager { #pragma mark - -- (NSInteger)registerHotKey: (SpectacleHotKey *)hotKey { +- (NSInteger)registerHotKey: (ZeroKitHotKey *)hotKey { NSString *hotKeyName = [hotKey hotKeyName]; - SpectacleHotKey *existingHotKey = [self registeredHotKeyForName: hotKeyName]; + ZeroKitHotKey *existingHotKey = [self registeredHotKeyForName: hotKeyName]; EventHotKeyID hotKeyID; EventHotKeyRef hotKeyRef; OSStatus err; @@ -111,7 +109,7 @@ - (NSInteger)registerHotKey: (SpectacleHotKey *)hotKey { } - (void)registerHotKeys: (NSArray *)hotKeys { - for (SpectacleHotKey *hotKey in hotKeys) { + for (ZeroKitHotKey *hotKey in hotKeys) { [self registerHotKey: hotKey]; } } @@ -119,7 +117,7 @@ - (void)registerHotKeys: (NSArray *)hotKeys { #pragma mark - - (void)unregisterHotKeyForName: (NSString *)name { - SpectacleHotKey *hotKey = [self registeredHotKeyForName: name]; + ZeroKitHotKey *hotKey = [self registeredHotKeyForName: name]; EventHotKeyRef hotKeyRef; OSStatus err; @@ -147,7 +145,7 @@ - (void)unregisterHotKeyForName: (NSString *)name { } - (void)unregisterHotKeys { - for (SpectacleHotKey *hotKey in [myRegisteredHotKeys allValues]) { + for (ZeroKitHotKey *hotKey in [myRegisteredHotKeys allValues]) { [self unregisterHotKeyForName: [hotKey hotKeyName]]; } } @@ -158,7 +156,7 @@ - (NSArray *)registeredHotKeys { return [myRegisteredHotKeys allValues]; } -- (SpectacleHotKey *)registeredHotKeyForName: (NSString *)name { +- (ZeroKitHotKey *)registeredHotKeyForName: (NSString *)name { return [myRegisteredHotKeys objectForKey: name]; } @@ -185,7 +183,7 @@ @implementation SpectacleHotKeyManager (SpectacleHotKeyManagerPrivate) - (void)updateUserDefaults { NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; - for (SpectacleHotKey *hotKey in [myRegisteredHotKeys allValues]) { + for (ZeroKitHotKey *hotKey in [myRegisteredHotKeys allValues]) { NSData *hotKeyData = [NSKeyedArchiver archivedDataWithRootObject: hotKey]; NSString *hotKeyName = [hotKey hotKeyName]; @@ -212,8 +210,8 @@ - (void)installHotKeyEventHandler { #pragma mark - -- (SpectacleHotKey *)registeredHotKeyForHandle: (NSInteger)handle { - for (SpectacleHotKey *hotKey in [myRegisteredHotKeys allValues]) { +- (ZeroKitHotKey *)registeredHotKeyForHandle: (NSInteger)handle { + for (ZeroKitHotKey *hotKey in [myRegisteredHotKeys allValues]) { if ([hotKey handle] == handle) { return hotKey; } @@ -225,7 +223,7 @@ - (SpectacleHotKey *)registeredHotKeyForHandle: (NSInteger)handle { #pragma mark - - (OSStatus)handleHotKeyEvent: (EventRef)event { - SpectacleHotKey *hotKey; + ZeroKitHotKey *hotKey; EventHotKeyID hotKeyID; OSStatus err = GetEventParameter(event, kEventParamDirectObject, diff --git a/SpectacleHotKeyRecorder.h b/SpectacleHotKeyRecorder.h deleted file mode 100644 index 285f9ed..0000000 --- a/SpectacleHotKeyRecorder.h +++ /dev/null @@ -1,26 +0,0 @@ -#import -#import "SpectacleHotKeyRecorderDelegate.h" - -@class SpectacleHotKey; - -@interface SpectacleHotKeyRecorder : NSControl { - -} - -- (NSString *)hotKeyName; - -- (void)setHotKeyName: (NSString *)hotKeyName; - -#pragma mark - - -- (SpectacleHotKey *)hotKey; - -- (void)setHotKey: (SpectacleHotKey *)hotKey; - -#pragma mark - - -- (id)delegate; - -- (void)setDelegate: (id)delegate; - -@end diff --git a/SpectacleHotKeyRecorder.m b/SpectacleHotKeyRecorder.m deleted file mode 100644 index e20741b..0000000 --- a/SpectacleHotKeyRecorder.m +++ /dev/null @@ -1,94 +0,0 @@ -#import "SpectacleHotKeyRecorder.h" -#import "SpectacleHotKeyRecorderCell.h" - -#define MyCell (SpectacleHotKeyRecorderCell *)[self cell] - -#pragma mark - - -@implementation SpectacleHotKeyRecorder - -- (id)initWithFrame: (NSRect)frame { - if (self = [super initWithFrame: frame]) { - [MyCell setHotKeyRecorder: self]; - } - - return self; -} - -#pragma mark - - -+ (Class)cellClass { - return [SpectacleHotKeyRecorderCell class]; -} - -#pragma mark - - -- (NSString *)hotKeyName { - return [MyCell hotKeyName]; -} - -- (void)setHotKeyName: (NSString *)hotKeyName { - [MyCell setHotKeyName: hotKeyName]; -} - -#pragma mark - - -- (SpectacleHotKey *)hotKey { - return [MyCell hotKey]; -} - -- (void)setHotKey: (SpectacleHotKey *)hotKey { - [MyCell setHotKey: hotKey]; - - [self updateCell: MyCell]; -} - -#pragma mark - - -- (id)delegate { - return [MyCell delegate]; -} - -- (void)setDelegate: (id)delegate { - [MyCell setDelegate: delegate]; -} - -#pragma mark - - -- (BOOL)acceptsFirstResponder { - return YES; -} - -- (BOOL)acceptsFirstMouse: (NSEvent *)event { - return YES; -} - -#pragma mark - - -- (BOOL)performKeyEquivalent: (NSEvent *)event { - if ([[[self window] firstResponder] isEqualTo: self]) { - return [MyCell performKeyEquivalent: event]; - } - - return [super performKeyEquivalent: event]; -} - -- (void)keyDown: (NSEvent *)event { - if ([self performKeyEquivalent: event]) { - return; - } - - [super keyDown: event]; -} - -- (void)flagsChanged: (NSEvent *)event { - [MyCell flagsChanged: event]; -} - -#pragma mark - - -- (BOOL)resignFirstResponder { - return [MyCell resignFirstResponder]; -} - -@end diff --git a/SpectacleHotKeyRecorderCell.h b/SpectacleHotKeyRecorderCell.h deleted file mode 100644 index 16020eb..0000000 --- a/SpectacleHotKeyRecorderCell.h +++ /dev/null @@ -1,48 +0,0 @@ -#import -#import "SpectacleHotKeyRecorderDelegate.h" - -@class SpectacleHotKeyRecorder, SpectacleHotKey; - -@interface SpectacleHotKeyRecorderCell : NSCell { - SpectacleHotKeyRecorder *myHotKeyRecorder; - NSString *myHotKeyName; - SpectacleHotKey *myHotKey; - id myDelegate; - NSInteger myModifierFlags; - BOOL isRecording; - NSTrackingArea *myTrackingArea; - BOOL isMouseAboveBadge; - BOOL isMouseDown; -} - -- (void)setHotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder; - -#pragma mark - - -- (NSString *)hotKeyName; - -- (void)setHotKeyName: (NSString *)hotKeyName; - -#pragma mark - - -- (SpectacleHotKey *)hotKey; - -- (void)setHotKey: (SpectacleHotKey *)hotKey; - -#pragma mark - - -- (id)delegate; - -- (void)setDelegate: (id)delegate; - -#pragma mark - - -- (BOOL)resignFirstResponder; - -#pragma mark - - -- (BOOL)performKeyEquivalent: (NSEvent *)event; - -- (void)flagsChanged: (NSEvent *)event; - -@end diff --git a/SpectacleHotKeyRecorderCell.m b/SpectacleHotKeyRecorderCell.m deleted file mode 100644 index 7d5c8ae..0000000 --- a/SpectacleHotKeyRecorderCell.m +++ /dev/null @@ -1,457 +0,0 @@ -#import "SpectacleHotKeyRecorderCell.h" -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyTranslator.h" -#import "SpectacleHotKeyRecorderDelegate.h" -#import "SpectacleUtilities.h" - -#define MakeRelativePoint(a, b, c) NSMakePoint((a * horizontalScale) + c.origin.x, (b * verticalScale) + c.origin.y) - -#pragma mark - - -@interface SpectacleHotKeyRecorderCell (SpectacleHotKeyRecorderCellPrivate) - -- (void)drawBorderInRect: (NSRect)rect withRadius: (CGFloat)radius; - -- (void)drawBackgroundInRect: (NSRect)rect withRadius: (CGFloat)radius; - -#pragma mark - - -- (void)drawBadgeInRect: (NSRect)rect; - -#pragma mark - - -- (void)drawClearHotKeyBadgeInRect: (NSRect)rect withOpacity: (CGFloat)opacity; - -- (void)drawRevertHotKeyBadgeInRect: (NSRect)rect; - -#pragma mark - - -- (void)drawLabelInRect: (NSRect)rect; - -#pragma mark - - -- (void)drawString: (NSString *)string withForegroundColor: (NSColor *)foregroundcolor inRect: (NSRect)rect; - -@end - -#pragma mark - - -@implementation SpectacleHotKeyRecorderCell - -- (id)init { - if (self = [super init]) { - myHotKeyRecorder = nil; - myHotKeyName = nil; - myHotKey = nil; - myDelegate = nil; - myModifierFlags = 0; - isRecording = NO; - myTrackingArea = nil; - isMouseAboveBadge = NO; - isMouseDown = NO; - } - - return self; -} - -#pragma mark - - -- (void)setHotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder { - if (myHotKeyRecorder != hotKeyRecorder) { - [myHotKeyRecorder release]; - - myHotKeyRecorder = [hotKeyRecorder retain]; - } -} - -#pragma mark - - -- (NSString *)hotKeyName { - return myHotKeyName; -} - -- (void)setHotKeyName: (NSString *)hotKeyName { - if (myHotKeyName != hotKeyName) { - [myHotKeyName release]; - - myHotKeyName = [hotKeyName retain]; - } -} - -#pragma mark - - -- (SpectacleHotKey *)hotKey { - return myHotKey; -} - -- (void)setHotKey: (SpectacleHotKey *)hotKey { - if (myHotKey != hotKey) { - [myHotKey release]; - - myHotKey = [hotKey retain]; - } -} - -#pragma mark - - -- (id)delegate { - return myDelegate; -} - -- (void)setDelegate: (id)delegate { - myDelegate = delegate; -} - -#pragma mark - - -- (BOOL)resignFirstResponder { - if (isRecording) { - isRecording = NO; - - [[self controlView] setNeedsDisplay: YES]; - } - - return YES; -} - -#pragma mark - - -- (BOOL)performKeyEquivalent: (NSEvent *)event { - NSInteger keyCode = [event keyCode]; - NSInteger modifierFlags = myModifierFlags | [event modifierFlags]; - - if (isRecording && [SpectacleHotKey validCocoaModifiers: modifierFlags]) { - NSString *characters = [[event charactersIgnoringModifiers] uppercaseString]; - - if ([characters length]) { - SpectacleHotKey *hotKey = [[[SpectacleHotKey alloc] initWithHotKeyCode: keyCode hotKeyModifiers: modifierFlags] autorelease]; - - [hotKey setHotKeyName: myHotKeyName]; - - [self setHotKey: hotKey]; - - [myDelegate hotKeyRecorder: myHotKeyRecorder didReceiveNewHotKey: hotKey]; - } else { - NSBeep(); - } - - myModifierFlags = 0; - - isRecording = NO; - - [[self controlView] setNeedsDisplay: YES]; - - return YES; - } - - return NO; -} - -- (void)flagsChanged: (NSEvent *)event { - if (isRecording) { - myModifierFlags = [event modifierFlags]; - - if (myModifierFlags == 256) { - myModifierFlags = 0; - } - - [[self controlView] setNeedsDisplay: YES]; - } -} - -#pragma mark - - -- (BOOL)trackMouse: (NSEvent *)event inRect: (NSRect)rect ofView: (NSView *)view untilMouseUp: (BOOL)untilMouseUp { - NSEvent *currentEvent = event; - - do { - NSPoint mouseLocation = [view convertPoint: [currentEvent locationInWindow] fromView: nil]; - - switch ([currentEvent type]) { - case NSLeftMouseDown: - isMouseDown = YES; - - [view setNeedsDisplay: YES]; - - break; - case NSLeftMouseDragged: - if ([view mouse: mouseLocation inRect: rect]) { - isMouseDown = YES; - } else { - isMouseDown = NO; - } - - if (isMouseAboveBadge && [view mouse: mouseLocation inRect: [myTrackingArea rect]]) { - isMouseDown = YES; - isMouseAboveBadge = YES; - } else { - isMouseDown = NO; - isMouseAboveBadge = NO; - } - - [view setNeedsDisplay: YES]; - - break; - default: - isMouseDown = NO; - - if ([view mouse: mouseLocation inRect: rect] && !isRecording && !isMouseAboveBadge) { - isRecording = YES; - - [[view window] makeFirstResponder: view]; - } else if (isRecording && isMouseAboveBadge) { - isRecording = NO; - } else if (!isRecording && myHotKey && isMouseAboveBadge) { - [myDelegate hotKeyRecorder: myHotKeyRecorder didClearExistingHotKey: myHotKey]; - - [self setHotKey: nil]; - } - - [view setNeedsDisplay: YES]; - - return YES; - } - } while (currentEvent = [[view window] nextEventMatchingMask: (NSLeftMouseDraggedMask | NSLeftMouseUpMask) - untilDate: [NSDate distantFuture] - inMode: NSEventTrackingRunLoopMode - dequeue: YES]); - - return YES; -} - -#pragma mark - - -- (void)mouseEntered: (NSEvent *)event { - isMouseAboveBadge = YES; - - [[self controlView] setNeedsDisplay: YES]; -} - -- (void)mouseExited: (NSEvent *)event { - isMouseAboveBadge = NO; - - [[self controlView] setNeedsDisplay: YES]; -} - -#pragma mark - - -- (void)drawWithFrame: (NSRect)frame inView: (NSView *)view { - CGFloat radius = NSHeight(frame) / 2.0f; - - // Draw the border of the control. - [self drawBorderInRect: frame withRadius: radius]; - - // Draw the default background of the control. - [self drawBackgroundInRect: frame withRadius: radius]; - - // Draw the tracking area image, depending the control's current state. - [self drawBadgeInRect: frame]; - - // Draw the label of the control. - [self drawLabelInRect: frame]; -} - -#pragma mark - - -- (void)dealloc { - [myHotKey release]; - [myTrackingArea release]; - - [super dealloc]; -} - -@end - -#pragma mark - - -@implementation SpectacleHotKeyRecorderCell (SpectacleHotKeyRecorderCellPrivate) - -- (void)drawBorderInRect: (NSRect)rect withRadius: (CGFloat)radius { - NSBezierPath *roundedPath = [NSBezierPath bezierPathWithRoundedRect: rect xRadius: radius yRadius: radius]; - - [[NSGraphicsContext currentContext] saveGraphicsState]; - - [roundedPath addClip]; - - [[NSColor windowFrameColor] set]; - - [NSBezierPath fillRect: rect]; - - [[NSGraphicsContext currentContext] restoreGraphicsState]; -} - -- (void)drawBackgroundInRect: (NSRect)rect withRadius: (CGFloat)radius { - NSBezierPath *roundedPath = [NSBezierPath bezierPathWithRoundedRect: NSInsetRect(rect, 1.0f, 1.0f) xRadius: radius yRadius: radius]; - NSColor *gradientStartingColor = nil; - NSColor *gradientEndingColor = nil; - NSGradient *gradient = nil; - - [[NSGraphicsContext currentContext] saveGraphicsState]; - - [roundedPath addClip]; - - if (isRecording) { - gradientStartingColor = [NSColor colorWithDeviceRed: 0.784f green: 0.953f blue: 1.0f alpha: 1.0f]; - gradientEndingColor = [NSColor colorWithDeviceRed: 0.694f green: 0.859f blue: 1.0f alpha: 1.0f]; - } else { - gradientStartingColor = [[[NSColor whiteColor] shadowWithLevel: 0.2f] colorWithAlphaComponent: 0.9f]; - gradientEndingColor = [[[NSColor whiteColor] highlightWithLevel: 0.2f] colorWithAlphaComponent: 0.9f]; - } - - if (!isRecording && isMouseDown && !isMouseAboveBadge) { - gradient = [[[NSGradient alloc] initWithStartingColor: gradientEndingColor endingColor: gradientStartingColor] autorelease]; - } else { - gradient = [[[NSGradient alloc] initWithStartingColor: gradientStartingColor endingColor: gradientEndingColor] autorelease]; - } - - [gradient drawInRect: rect angle: 90.0f]; - - [[NSGraphicsContext currentContext] restoreGraphicsState]; -} - -#pragma mark - - -- (void)drawBadgeInRect: (NSRect)rect { - NSRect badgeRect; - NSSize badgeSize; - - // Calculate this! Eventually... - badgeSize.width = 13.0f; - badgeSize.height = 13.0f; - - badgeRect.origin = NSMakePoint(NSMaxX(rect) - badgeSize.width - 4.0f, floor((NSMaxY(rect) - badgeSize.height) / 2.0f)); - badgeRect.size = badgeSize; - - if (isRecording && !myHotKey) { - [self drawClearHotKeyBadgeInRect: badgeRect withOpacity: 0.25f]; - } else if (isRecording) { - [self drawRevertHotKeyBadgeInRect: badgeRect]; - } else if (myHotKey) { - [self drawClearHotKeyBadgeInRect: badgeRect withOpacity: 0.25f]; - } - - if (((myHotKey && !isRecording) || (!myHotKey && isRecording)) && isMouseAboveBadge && isMouseDown) { - [self drawClearHotKeyBadgeInRect: badgeRect withOpacity: 0.50f]; - } - - if (!myTrackingArea) { - myTrackingArea = [[NSTrackingArea alloc] initWithRect: badgeRect - options: (NSTrackingActiveInKeyWindow | NSTrackingMouseEnteredAndExited) - owner: self - userInfo: nil]; - - [[self controlView] addTrackingArea: myTrackingArea]; - } -} - -#pragma mark - - -- (void)drawClearHotKeyBadgeInRect: (NSRect)rect withOpacity: (CGFloat)opacity { - CGFloat horizontalScale = (rect.size.width / 13.0f); - CGFloat verticalScale = (rect.size.height / 13.0f); - - [[NSGraphicsContext currentContext] saveGraphicsState]; - - [[NSColor colorWithCalibratedWhite: 0.0f alpha: opacity] setFill]; - - [[NSBezierPath bezierPathWithOvalInRect: rect] fill]; - - [[NSColor whiteColor] setStroke]; - - NSBezierPath *cross = [[[NSBezierPath alloc] init] autorelease]; - - [cross setLineWidth: horizontalScale * 1.4f]; - - [cross moveToPoint: MakeRelativePoint(4.0f, 4.0f, rect)]; - [cross lineToPoint: MakeRelativePoint(9.0f, 9.0f, rect)]; - [cross moveToPoint: MakeRelativePoint(9.0f, 4.0f, rect)]; - [cross lineToPoint: MakeRelativePoint(4.0f, 9.0f, rect)]; - - [cross stroke]; - - [[NSGraphicsContext currentContext] restoreGraphicsState]; -} - -- (void)drawRevertHotKeyBadgeInRect: (NSRect)rect { - CGFloat horizontalScale = (rect.size.width / 1.0f); - CGFloat verticalScale = (rect.size.height / 1.0f); - - [[NSGraphicsContext currentContext] saveGraphicsState]; - - NSBezierPath *swoosh = [[[NSBezierPath alloc] init] autorelease]; - - [swoosh setLineWidth: horizontalScale]; - - [swoosh moveToPoint: MakeRelativePoint(0.0489685f, 0.6181513f, rect)]; - [swoosh lineToPoint: MakeRelativePoint(0.4085750f, 0.9469318f, rect)]; - [swoosh lineToPoint: MakeRelativePoint(0.4085750f, 0.7226146f, rect)]; - - [swoosh curveToPoint: MakeRelativePoint(0.8508247f, 0.4836237f, rect) - controlPoint1: MakeRelativePoint(0.4085750f, 0.7226146f, rect) - controlPoint2: MakeRelativePoint(0.8371143f, 0.7491841f, rect)]; - [swoosh curveToPoint: MakeRelativePoint(0.5507195f, 0.0530682f, rect) - controlPoint1: MakeRelativePoint(0.8677834f, 0.1545071f, rect) - controlPoint2: MakeRelativePoint(0.5507195f, 0.0530682f, rect)]; - [swoosh curveToPoint: MakeRelativePoint(0.7421721f, 0.3391942f, rect) - controlPoint1: MakeRelativePoint(0.5507195f, 0.0530682f, rect) - controlPoint2: MakeRelativePoint(0.7458685f, 0.1913146f, rect)]; - [swoosh curveToPoint: MakeRelativePoint(0.4085750f, 0.5154130f, rect) - controlPoint1: MakeRelativePoint(0.7383412f, 0.4930328f, rect) - controlPoint2: MakeRelativePoint(0.4085750f, 0.5154130f, rect)]; - - [swoosh lineToPoint: MakeRelativePoint(0.4085750f, 0.2654000f, rect)]; - - [swoosh fill]; - - [[NSGraphicsContext currentContext] restoreGraphicsState]; -} - -#pragma mark - - -- (void)drawLabelInRect: (NSRect)rect { - NSString *label = nil; - NSColor *foregroundColor = [NSColor blackColor]; - - if (isRecording && !isMouseAboveBadge) { - label = ZeroKitLocalizedStringFromCurrentBundle(@"Enter hot key"); - } else if (isRecording && isMouseAboveBadge && !myHotKey) { - label = ZeroKitLocalizedStringFromCurrentBundle(@"Stop recording"); - } else if (isRecording && isMouseAboveBadge) { - label = ZeroKitLocalizedStringFromCurrentBundle(@"Use existing"); - } else if (myHotKey) { - label = [myHotKey displayString]; - } else { - label = ZeroKitLocalizedStringFromCurrentBundle(@"Click to record"); - } - - // Recording is in progress and modifier flags have already been set, display them. - if (isRecording && (myModifierFlags > 0)) { - label = [SpectacleHotKeyTranslator translateCocoaModifiers: myModifierFlags]; - } - - if (![self isEnabled]) { - foregroundColor = [NSColor disabledControlTextColor]; - } - - if (isRecording) { - [self drawString: label withForegroundColor: foregroundColor inRect: rect]; - } else { - [self drawString: label withForegroundColor: foregroundColor inRect: rect]; - } -} - -#pragma mark - - -- (void)drawString: (NSString *)string withForegroundColor: (NSColor *)foregroundColor inRect: (NSRect)rect { - NSMutableDictionary *attributes = [SpectacleUtilities createStringAttributesWithShadow]; - NSRect labelRect = rect; - - [attributes setObject: [NSFont systemFontOfSize: [NSFont smallSystemFontSize]] forKey: NSFontAttributeName]; - [attributes setObject: foregroundColor forKey: NSForegroundColorAttributeName]; - - labelRect.origin.y = -(NSMidY(rect) - [string sizeWithAttributes: attributes].height / 2.0f); - - [string drawInRect: labelRect withAttributes: attributes]; -} - -@end diff --git a/SpectacleHotKeyRecorderDelegate.h b/SpectacleHotKeyRecorderDelegate.h deleted file mode 100644 index 0869808..0000000 --- a/SpectacleHotKeyRecorderDelegate.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) 2011 Eric Czarny -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -// - -#import - -@class SpectacleHotKeyRecorder, SpectacleHotKey; - -@protocol SpectacleHotKeyRecorderDelegate - -- (void)hotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder didReceiveNewHotKey: (SpectacleHotKey *)hotKey; - -- (void)hotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder didClearExistingHotKey: (SpectacleHotKey *)hotKey; - -@end diff --git a/SpectacleHotKeyTranslator.h b/SpectacleHotKeyTranslator.h deleted file mode 100644 index d79eb0b..0000000 --- a/SpectacleHotKeyTranslator.h +++ /dev/null @@ -1,27 +0,0 @@ -#import -#import -#import - -@class SpectacleHotKey; - -@interface SpectacleHotKeyTranslator : NSObject { - NSDictionary *mySpecialHotKeyTranslations; -} - -+ (SpectacleHotKeyTranslator *)sharedTranslator; - -#pragma mark - - -+ (NSInteger)convertModifiersToCarbonIfNecessary: (NSInteger)modifiers; - -#pragma mark - - -+ (NSString *)translateCocoaModifiers: (NSInteger)modifiers; - -- (NSString *)translateKeyCode: (NSInteger)keyCode; - -#pragma mark - - -- (NSString *)translateHotKey: (SpectacleHotKey *)hotKey; - -@end diff --git a/SpectacleHotKeyTranslator.m b/SpectacleHotKeyTranslator.m deleted file mode 100644 index 5021324..0000000 --- a/SpectacleHotKeyTranslator.m +++ /dev/null @@ -1,244 +0,0 @@ -#import "SpectacleHotKeyTranslator.h" -#import "SpectacleHotKey.h" -#import "SpectacleUtilities.h" -#import "SpectacleConstants.h" - -enum { - SpectacleHotKeyAlternateGlyph = 0x2325, - SpectacleHotKeyCommandGlyph = 0x2318, - SpectacleHotKeyControlGlyph = 0x2303, - SpectacleHotKeyDeleteLeftGlyph = 0x232B, - SpectacleHotKeyDeleteRightGlyph = 0x2326, - SpectacleHotKeyDownArrowGlyph = 0x2193, - SpectacleHotKeyLeftArrowGlyph = 0x2190, - SpectacleHotKeyPageDownGlyph = 0x21DF, - SpectacleHotKeyPageUpGlyph = 0x21DE, - SpectacleHotKeyReturnGlyph = 0x21A9, - SpectacleHotKeyRightArrowGlyph = 0x2192, - SpectacleHotKeyShiftGlyph = 0x21E7, - SpectacleHotKeyTabLeftGlyph = 0x21E4, - SpectacleHotKeyTabRightGlyph = 0x21E5, - SpectacleHotKeyUpArrowGlyph = 0x2191 -}; - -enum { - SpectacleHotKeyAlternateCarbonKeyMask = 1 << 11, - SpectacleHotKeyCommandCarbonKeyMask = 1 << 8, - SpectacleHotKeyControlCarbonKeyMask = 1 << 12, - SpectacleHotKeyShiftCarbonKeyMask = 1 << 9, -}; - -@interface SpectacleHotKeyTranslator (SpectacleHotKeyTranslatorPrivate) - -+ (NSInteger)convertCocoaModifiersToCarbon: (NSInteger)modifiers; - -+ (NSInteger)convertCarbonModifiersToCocoa: (NSInteger)modifiers; - -#pragma mark - - -- (void)buildKeyCodeConvertorDictionary; - -@end - -#pragma mark - - -@implementation SpectacleHotKeyTranslator - -static SpectacleHotKeyTranslator *sharedInstance = nil; - -- (id)init { - if ((self = [super init])) { - mySpecialHotKeyTranslations = nil; - } - - return self; -} - -#pragma mark - - -+ (id)allocWithZone: (NSZone *)zone { - @synchronized(self) { - if (!sharedInstance) { - sharedInstance = [super allocWithZone: zone]; - - return sharedInstance; - } - } - - return nil; -} - -#pragma mark - - -+ (SpectacleHotKeyTranslator *)sharedTranslator { - @synchronized(self) { - if (!sharedInstance) { - [[self alloc] init]; - } - } - - return sharedInstance; -} - -#pragma mark - - -+ (NSInteger)convertModifiersToCarbonIfNecessary: (NSInteger)modifiers { - if ([SpectacleHotKey validCocoaModifiers: modifiers]) { - modifiers = [self convertCocoaModifiersToCarbon: modifiers]; - } - - return modifiers; -} - -#pragma mark - - -+ (NSString *)translateCocoaModifiers: (NSInteger)modifiers { - NSString *modifierGlyphs = [NSString string]; - - if (modifiers & NSControlKeyMask) { - modifierGlyphs = [modifierGlyphs stringByAppendingFormat: @"%C", SpectacleHotKeyControlGlyph]; - } - - if (modifiers & NSAlternateKeyMask) { - modifierGlyphs = [modifierGlyphs stringByAppendingFormat: @"%C", SpectacleHotKeyAlternateGlyph]; - } - - if (modifiers & NSShiftKeyMask) { - modifierGlyphs = [modifierGlyphs stringByAppendingFormat: @"%C", SpectacleHotKeyShiftGlyph]; - } - - if (modifiers & NSCommandKeyMask) { - modifierGlyphs = [modifierGlyphs stringByAppendingFormat: @"%C", SpectacleHotKeyCommandGlyph]; - } - - return modifierGlyphs; -} - -- (NSString *)translateKeyCode: (NSInteger)keyCode { - NSDictionary *keyCodeTranslations = nil; - NSString *result; - - [self buildKeyCodeConvertorDictionary]; - - keyCodeTranslations = [mySpecialHotKeyTranslations objectForKey: SpectacleHotKeyTranslationsKey]; - - result = [keyCodeTranslations objectForKey: [NSString stringWithFormat: @"%d", keyCode]]; - - if (result) { - NSDictionary *glyphTranslations = [mySpecialHotKeyTranslations objectForKey: SpectacleHotKeyGlyphTranslationsKey]; - id translatedGlyph = [glyphTranslations objectForKey: result]; - - if (translatedGlyph) { - result = [NSString stringWithFormat: @"%C", [translatedGlyph integerValue]]; - } - } else { - TISInputSourceRef inputSource = TISCopyCurrentKeyboardInputSource(); - CFDataRef layoutData = (CFDataRef)TISGetInputSourceProperty(inputSource, kTISPropertyUnicodeKeyLayoutData); - const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData); - UInt32 keysDown = 0; - UniCharCount length = 4; - UniCharCount actualLength = 0; - UniChar chars[4]; - OSStatus err; - - err = UCKeyTranslate(keyboardLayout, - keyCode, - kUCKeyActionDisplay, - 0, - LMGetKbdType(), - kUCKeyTranslateNoDeadKeysBit, - &keysDown, - length, - &actualLength, - chars); - - if (err != noErr) { - NSLog(@"There was a problem translating the key code."); - - return @"?"; - } - - result = [[NSString stringWithCharacters: chars length: 1] uppercaseString]; - } - - return result; -} - -#pragma mark - - -- (NSString *)translateHotKey: (SpectacleHotKey *)hotKey { - NSInteger modifiers = [SpectacleHotKeyTranslator convertCarbonModifiersToCocoa: [hotKey hotKeyModifiers]]; - - return [NSString stringWithFormat: @"%@%@", [SpectacleHotKeyTranslator translateCocoaModifiers: modifiers], [self translateKeyCode: [hotKey hotKeyCode]]]; -} - -#pragma mark - - -- (void)dealloc { - [mySpecialHotKeyTranslations release]; - - [super dealloc]; -} - -@end - -#pragma mark - - -@implementation SpectacleHotKeyTranslator (SpectacleHotKeyTranslatorPrivate) - -+ (NSInteger)convertCocoaModifiersToCarbon: (NSInteger)modifiers { - NSInteger convertedModifiers = 0; - - if (modifiers & NSControlKeyMask) { - convertedModifiers |= SpectacleHotKeyControlCarbonKeyMask; - } - - if (modifiers & NSAlternateKeyMask) { - convertedModifiers |= SpectacleHotKeyAlternateCarbonKeyMask; - } - - if (modifiers & NSShiftKeyMask) { - convertedModifiers |= SpectacleHotKeyShiftCarbonKeyMask; - } - - if (modifiers & NSCommandKeyMask) { - convertedModifiers |= SpectacleHotKeyCommandCarbonKeyMask; - } - - return convertedModifiers; -} - -+ (NSInteger)convertCarbonModifiersToCocoa: (NSInteger)modifiers { - NSInteger convertedModifiers = 0; - - if (modifiers & SpectacleHotKeyControlCarbonKeyMask) { - convertedModifiers |= NSControlKeyMask; - } - - if (modifiers & SpectacleHotKeyAlternateCarbonKeyMask) { - convertedModifiers |= NSAlternateKeyMask; - } - - if (modifiers & SpectacleHotKeyShiftCarbonKeyMask) { - convertedModifiers |= NSShiftKeyMask; - } - - if (modifiers & SpectacleHotKeyCommandCarbonKeyMask) { - convertedModifiers |= NSCommandKeyMask; - } - - return convertedModifiers; -} - -#pragma mark - - -- (void)buildKeyCodeConvertorDictionary { - if (!mySpecialHotKeyTranslations) { - NSBundle *bundle = [SpectacleUtilities helperApplicationBundle]; - NSString *path = [bundle pathForResource: SpectacleHotKeyTranslationsPropertyListFile ofType: ZeroKitPropertyListFileExtension]; - - mySpecialHotKeyTranslations = [[NSDictionary alloc] initWithContentsOfFile: path]; - } -} - -@end diff --git a/SpectaclePreferencePane.h b/SpectaclePreferencePane.h index e7149b6..6d2dd7e 100644 --- a/SpectaclePreferencePane.h +++ b/SpectaclePreferencePane.h @@ -1,32 +1,31 @@ #import -#import "SpectacleHotKeyRecorderDelegate.h" #import "SpectacleToggleSwitchDelegate.h" -@class SpectacleHotKeyRecorder, SpectacleToggleSwitch; +@class SpectacleToggleSwitch; -@interface SpectaclePreferencePane : NSPreferencePane { +@interface SpectaclePreferencePane : NSPreferencePane { id myVendedHelperController; NSDictionary *myHotKeyRecorders; IBOutlet NSTextField *mySpectacleVersionTextField; IBOutlet SpectacleToggleSwitch *myToggleRunningStateSwitch; IBOutlet NSButton *myLoginItemEnabledButton; IBOutlet NSButton *myAutomaticallyChecksForUpdatesButton; - IBOutlet SpectacleHotKeyRecorder *myMoveToCenterHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToFullscreenHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToLeftHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToRightHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToTopHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToBottomHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToUpperLeftHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToLowerLeftHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToUpperRightHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToLowerRightHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToLeftDisplayHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToRightDisplayHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToTopDisplayHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myMoveToBottomDisplayHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myUndoLastMoveHotKeyRecorder; - IBOutlet SpectacleHotKeyRecorder *myRedoLastMoveHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToCenterHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToFullscreenHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToLeftHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToRightHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToTopHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToBottomHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToUpperLeftHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToLowerLeftHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToUpperRightHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToLowerRightHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToLeftDisplayHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToRightDisplayHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToTopDisplayHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myMoveToBottomDisplayHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myUndoLastMoveHotKeyRecorder; + IBOutlet ZeroKitHotKeyRecorder *myRedoLastMoveHotKeyRecorder; } - (void)toggleLoginItem: (id)sender; diff --git a/SpectaclePreferencePane.m b/SpectaclePreferencePane.m index cf53ced..36a7be6 100644 --- a/SpectaclePreferencePane.m +++ b/SpectaclePreferencePane.m @@ -1,7 +1,5 @@ #import "SpectaclePreferencePane.h" #import "SpectacleHelperControllerProtocol.h" -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyRecorder.h" #import "SpectacleToggleSwitch.h" #import "SpectacleUtilities.h" #import "SpectacleConstants.h" @@ -54,23 +52,23 @@ - (void)mainViewDidLoad { suspensionBehavior: NSNotificationSuspensionBehaviorDeliverImmediately]; myHotKeyRecorders = [[NSDictionary alloc] initWithObjectsAndKeys: - myMoveToCenterHotKeyRecorder, SpectacleWindowActionMoveToCenter, - myMoveToFullscreenHotKeyRecorder, SpectacleWindowActionMoveToFullscreen, - myMoveToLeftHotKeyRecorder, SpectacleWindowActionMoveToLeftHalf, - myMoveToRightHotKeyRecorder, SpectacleWindowActionMoveToRightHalf, - myMoveToTopHotKeyRecorder, SpectacleWindowActionMoveToTopHalf, - myMoveToBottomHotKeyRecorder, SpectacleWindowActionMoveToBottomHalf, - myMoveToUpperLeftHotKeyRecorder, SpectacleWindowActionMoveToUpperLeft, - myMoveToLowerLeftHotKeyRecorder, SpectacleWindowActionMoveToLowerLeft, - myMoveToUpperRightHotKeyRecorder, SpectacleWindowActionMoveToUpperRight, - myMoveToLowerRightHotKeyRecorder, SpectacleWindowActionMoveToLowerRight, - myMoveToLeftDisplayHotKeyRecorder, SpectacleWindowActionMoveToLeftDisplay, - myMoveToRightDisplayHotKeyRecorder, SpectacleWindowActionMoveToRightDisplay, - myMoveToTopDisplayHotKeyRecorder, SpectacleWindowActionMoveToTopDisplay, - myMoveToBottomDisplayHotKeyRecorder, SpectacleWindowActionMoveToBottomDisplay, - myUndoLastMoveHotKeyRecorder, SpectacleWindowActionUndoLastMove, - myRedoLastMoveHotKeyRecorder, SpectacleWindowActionRedoLastMove, - nil]; + myMoveToCenterHotKeyRecorder, SpectacleWindowActionMoveToCenter, + myMoveToFullscreenHotKeyRecorder, SpectacleWindowActionMoveToFullscreen, + myMoveToLeftHotKeyRecorder, SpectacleWindowActionMoveToLeftHalf, + myMoveToRightHotKeyRecorder, SpectacleWindowActionMoveToRightHalf, + myMoveToTopHotKeyRecorder, SpectacleWindowActionMoveToTopHalf, + myMoveToBottomHotKeyRecorder, SpectacleWindowActionMoveToBottomHalf, + myMoveToUpperLeftHotKeyRecorder, SpectacleWindowActionMoveToUpperLeft, + myMoveToLowerLeftHotKeyRecorder, SpectacleWindowActionMoveToLowerLeft, + myMoveToUpperRightHotKeyRecorder, SpectacleWindowActionMoveToUpperRight, + myMoveToLowerRightHotKeyRecorder, SpectacleWindowActionMoveToLowerRight, + myMoveToLeftDisplayHotKeyRecorder, SpectacleWindowActionMoveToLeftDisplay, + myMoveToRightDisplayHotKeyRecorder, SpectacleWindowActionMoveToRightDisplay, + myMoveToTopDisplayHotKeyRecorder, SpectacleWindowActionMoveToTopDisplay, + myMoveToBottomDisplayHotKeyRecorder, SpectacleWindowActionMoveToBottomDisplay, + myUndoLastMoveHotKeyRecorder, SpectacleWindowActionUndoLastMove, + myRedoLastMoveHotKeyRecorder, SpectacleWindowActionRedoLastMove, + nil]; [myToggleRunningStateSwitch setDelegate: self]; @@ -110,7 +108,7 @@ - (void)toggleCheckForUpdates: (id)sender { #pragma mark - -- (void)hotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder didReceiveNewHotKey: (SpectacleHotKey *)hotKey { +- (void)hotKeyRecorder: (ZeroKitHotKeyRecorder *)hotKeyRecorder didReceiveNewHotKey: (ZeroKitHotKey *)hotKey { @try { [myVendedHelperController updateHotKeyWithKeyCode: [hotKey hotKeyCode] modifiers: [hotKey hotKeyModifiers] name: [hotKey hotKeyName]]; } @catch (NSException *e) { @@ -119,7 +117,7 @@ - (void)hotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder didReceiveNewH } } -- (void)hotKeyRecorder: (SpectacleHotKeyRecorder *)hotKeyRecorder didClearExistingHotKey: (SpectacleHotKey *)hotKey { +- (void)hotKeyRecorder: (ZeroKitHotKeyRecorder *)hotKeyRecorder didClearExistingHotKey: (ZeroKitHotKey *)hotKey { @try { [myVendedHelperController unregisterHotKeyWithName: [hotKey hotKeyName]]; } @catch (NSException *e) { @@ -142,17 +140,9 @@ - (void)toggleSwitchDidChangeState: (SpectacleToggleSwitch *)toggleSwitch { #pragma mark - -- (void)willUnselect { +- (void)dealloc { [[NSDistributedNotificationCenter defaultCenter] removeObserver: self]; - [myVendedHelperController release]; - - myVendedHelperController = nil; -} - -#pragma mark - - -- (void)dealloc { [myVendedHelperController release]; [myHotKeyRecorders release]; @@ -248,8 +238,8 @@ - (void)handleConnectionException: (NSException *)exception withMessage: (NSStri - (void)loadRegisteredHotKeys { for (NSString *hotKeyName in [myHotKeyRecorders allKeys]) { - SpectacleHotKeyRecorder *hotKeyRecorder = [myHotKeyRecorders objectForKey: hotKeyName]; - SpectacleHotKey *hotKey = nil; + ZeroKitHotKeyRecorder *hotKeyRecorder = [myHotKeyRecorders objectForKey: hotKeyName]; + ZeroKitHotKey *hotKey = nil; @try { hotKey = [myVendedHelperController registeredHotKeyForName: hotKeyName]; @@ -273,7 +263,7 @@ - (void)loadRegisteredHotKeys { #pragma mark - - (void)enableHotKeyRecorders: (BOOL)enabled { - for (SpectacleHotKeyRecorder *hotKeyRecorder in [myHotKeyRecorders allValues]) { + for (ZeroKitHotKeyRecorder *hotKeyRecorder in [myHotKeyRecorders allValues]) { if (!enabled) { [hotKeyRecorder setHotKey: nil]; } diff --git a/SpectacleToggleSwitchCell.m b/SpectacleToggleSwitchCell.m index 26816e7..d5d6144 100644 --- a/SpectacleToggleSwitchCell.m +++ b/SpectacleToggleSwitchCell.m @@ -160,10 +160,10 @@ - (BOOL)trackMouse: (NSEvent *)event inRect: (NSRect)rect ofView: (NSView *)view [view setNeedsDisplay: YES]; previousPosition = currentPosition; - } while (currentEvent = [[view window] nextEventMatchingMask: (NSLeftMouseDraggedMask | NSLeftMouseUpMask) - untilDate: [NSDate distantFuture] - inMode: NSEventTrackingRunLoopMode - dequeue: YES]); + } while ((currentEvent = [[view window] nextEventMatchingMask: (NSLeftMouseDraggedMask | NSLeftMouseUpMask) + untilDate: [NSDate distantFuture] + inMode: NSEventTrackingRunLoopMode + dequeue: YES])); return YES; } diff --git a/SpectacleUtilities.h b/SpectacleUtilities.h index 2d902b5..ac16dae 100644 --- a/SpectacleUtilities.h +++ b/SpectacleUtilities.h @@ -1,6 +1,6 @@ #import -@class SpectacleHotKeyAction; +@class ZeroKitHotKeyAction; @interface SpectacleUtilities : ZeroKitUtilities { @@ -36,7 +36,7 @@ #pragma mark - -+ (SpectacleHotKeyAction *)actionForHotKeyWithName: (NSString *)key target: (id)target; ++ (ZeroKitHotKeyAction *)actionForHotKeyWithName: (NSString *)key target: (id)target; #pragma mark - @@ -46,8 +46,4 @@ + (NSImage *)imageFromResource: (NSString *)resource; -#pragma mark - - -+ (NSMutableDictionary *)createStringAttributesWithShadow; - @end diff --git a/SpectacleUtilities.m b/SpectacleUtilities.m index 448075f..61b55b7 100644 --- a/SpectacleUtilities.m +++ b/SpectacleUtilities.m @@ -1,6 +1,4 @@ #import "SpectacleUtilities.h" -#import "SpectacleHotKey.h" -#import "SpectacleHotKeyAction.h" #import "SpectacleConstants.h" @interface SpectacleUtilities (SpectacleUtilitiesPrivate) @@ -9,7 +7,7 @@ + (NSString *)versionOfBundle: (NSBundle *)bundle; #pragma mark - -+ (void)updateHotKey: (SpectacleHotKey *)hotKey withPotentiallyNewDefaultHotKey: (SpectacleHotKey *)defaultHotKey; ++ (void)updateHotKey: (ZeroKitHotKey *)hotKey withPotentiallyNewDefaultHotKey: (ZeroKitHotKey *)defaultHotKey; #pragma mark - @@ -127,8 +125,10 @@ + (NSArray *)hotKeysFromDictionary: (NSDictionary *)dictionary hotKeyTarget: (id NSDictionary *defaultHotKeys = [SpectacleUtilities defaultHotKeysWithNames: [dictionary allKeys]]; NSMutableArray *hotKeys = [NSMutableArray array]; + [NSKeyedUnarchiver setClass: [ZeroKitHotKey class] forClassName: @"SpectacleHotKey"]; + for (NSData *hotKeyData in [dictionary allValues]) { - SpectacleHotKey *hotKey = [NSKeyedUnarchiver unarchiveObjectWithData: hotKeyData]; + ZeroKitHotKey *hotKey = [NSKeyedUnarchiver unarchiveObjectWithData: hotKeyData]; NSString *hotKeyName = [hotKey hotKeyName]; [hotKey setHotKeyAction: [SpectacleUtilities actionForHotKeyWithName: hotKeyName target: target]]; @@ -143,7 +143,7 @@ + (NSArray *)hotKeysFromDictionary: (NSDictionary *)dictionary hotKeyTarget: (id #pragma mark - -+ (SpectacleHotKeyAction *)actionForHotKeyWithName: (NSString *)name target: (id)target { ++ (ZeroKitHotKeyAction *)actionForHotKeyWithName: (NSString *)name target: (id)target { SEL selector = NULL; if ([name isEqualToString: SpectacleWindowActionMoveToCenter]) { @@ -180,7 +180,7 @@ + (SpectacleHotKeyAction *)actionForHotKeyWithName: (NSString *)name target: (id selector = @selector(redoLastWindowAction:); } - return [SpectacleHotKeyAction hotKeyActionFromTarget: target selector: selector]; + return [ZeroKitHotKeyAction hotKeyActionFromTarget: target selector: selector]; } #pragma mark - @@ -214,26 +214,6 @@ + (NSImage *)imageFromResource: (NSString *)resource { return [SpectacleUtilities imageFromResource: resource inBundle: [SpectacleUtilities preferencePaneBundle]]; } -#pragma mark - - -+ (NSMutableDictionary *)createStringAttributesWithShadow { - NSMutableParagraphStyle *paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; - NSShadow *textShadow = [[[NSShadow alloc] init] autorelease]; - NSMutableDictionary *stringAttributes = [NSMutableDictionary dictionary]; - - [paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail]; - [paragraphStyle setAlignment: NSCenterTextAlignment]; - - [textShadow setShadowColor: [NSColor whiteColor]]; - [textShadow setShadowOffset: NSMakeSize(0.0f, -1.0)]; - [textShadow setShadowBlurRadius: 0.0f]; - - [stringAttributes setObject: paragraphStyle forKey: NSParagraphStyleAttributeName]; - [stringAttributes setObject: textShadow forKey: NSShadowAttributeName]; - - return stringAttributes; -} - @end #pragma mark - @@ -252,7 +232,7 @@ + (NSString *)versionOfBundle: (NSBundle *)bundle { #pragma mark - -+ (void)updateHotKey: (SpectacleHotKey *)hotKey withPotentiallyNewDefaultHotKey: (SpectacleHotKey *)defaultHotKey { ++ (void)updateHotKey: (ZeroKitHotKey *)hotKey withPotentiallyNewDefaultHotKey: (ZeroKitHotKey *)defaultHotKey { NSString *hotKeyName = [hotKey hotKeyName]; NSInteger defaultHotKeyCode; @@ -279,7 +259,7 @@ + (NSDictionary *)defaultHotKeysWithNames: (NSArray *)names { for (NSString *hotKeyName in names) { NSData *defaultHotKeyData = [applicationDefaults objectForKey: hotKeyName]; - SpectacleHotKey *defaultHotKey = [NSKeyedUnarchiver unarchiveObjectWithData: defaultHotKeyData]; + ZeroKitHotKey *defaultHotKey = [NSKeyedUnarchiver unarchiveObjectWithData: defaultHotKeyData]; [defaultHotKeys setObject: defaultHotKey forKey: hotKeyName]; } diff --git a/SpectacleWindowPositionManager.h b/SpectacleWindowPositionManager.h index 971238c..95aae5c 100644 --- a/SpectacleWindowPositionManager.h +++ b/SpectacleWindowPositionManager.h @@ -1,8 +1,6 @@ #import #import -@class SpectacleAccessibilityElement; - typedef enum { SpectacleWindowActionNone = -1, SpectacleWindowActionCenter, @@ -24,7 +22,7 @@ typedef enum { #pragma mark - @interface SpectacleWindowPositionManager : NSObject { - SpectacleAccessibilityElement *myFrontMostWindowElement; + ZeroKitAccessibilityElement *myFrontMostWindowElement; NSMutableDictionary *myUndoHistory; NSMutableDictionary *myRedoHistory; } diff --git a/SpectacleWindowPositionManager.m b/SpectacleWindowPositionManager.m index 50d5048..09ad0c9 100644 --- a/SpectacleWindowPositionManager.m +++ b/SpectacleWindowPositionManager.m @@ -1,5 +1,4 @@ #import "SpectacleWindowPositionManager.h" -#import "SpectacleAccessibilityElement.h" #import "SpectacleHistoryItem.h" #import "SpectacleUtilities.h" @@ -59,7 +58,7 @@ - (CGFloat)percentageOfRect: (CGRect)rect withinFrameOfScreen: (CGRect)frameOfSc - (CGRect)rectOfFrontMostWindow; -- (CGRect)rectOfWindowWithAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement; +- (CGRect)rectOfWindowWithAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement; #pragma mark - @@ -182,7 +181,7 @@ - (void)moveFrontMostWindowWithAction: (SpectacleWindowAction)action { - (void)undoLastWindowAction { SpectacleHistoryItem *historyItem = [CurrentUndoHistory lastObject]; - SpectacleAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; + ZeroKitAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; CGRect windowRect = [self rectOfWindowWithAccessibilityElement: accessibilityElement]; if (!CGRectIsNull(windowRect)) { @@ -201,7 +200,7 @@ - (void)undoLastWindowAction { - (void)redoLastWindowAction { SpectacleHistoryItem *historyItem = [CurrentRedoHistory lastObject]; - SpectacleAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; + ZeroKitAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; CGRect windowRect = [self rectOfWindowWithAccessibilityElement: accessibilityElement]; if (!CGRectIsNull(windowRect)) { @@ -313,8 +312,8 @@ - (CGFloat)percentageOfRect: (CGRect)rect withinFrameOfScreen: (CGRect)frameOfSc #pragma mark - - (CGRect)rectOfFrontMostWindow { - SpectacleAccessibilityElement *systemWideElement = [SpectacleAccessibilityElement systemWideElement]; - SpectacleAccessibilityElement *applicationWithFocusElement = [systemWideElement elementWithAttribute: kAXFocusedApplicationAttribute]; + ZeroKitAccessibilityElement *systemWideElement = [ZeroKitAccessibilityElement systemWideElement]; + ZeroKitAccessibilityElement *applicationWithFocusElement = [systemWideElement elementWithAttribute: kAXFocusedApplicationAttribute]; CGRect result = CGRectNull; if (applicationWithFocusElement) { @@ -332,7 +331,7 @@ - (CGRect)rectOfFrontMostWindow { return result; } -- (CGRect)rectOfWindowWithAccessibilityElement: (SpectacleAccessibilityElement *)accessibilityElement { +- (CGRect)rectOfWindowWithAccessibilityElement: (ZeroKitAccessibilityElement *)accessibilityElement { CGRect result = CGRectNull; if (accessibilityElement) { @@ -402,7 +401,7 @@ - (CGRect)moveFrontMostWindowRect: (CGRect)frontMostWindowRect visibleFrameOfScr #pragma mark - - (BOOL)moveWithHistoryItem: (SpectacleHistoryItem *)historyItem { - SpectacleAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; + ZeroKitAccessibilityElement *accessibilityElement = [historyItem accessibilityElement]; CGRect windowRect = CGRectNull; if (!historyItem || !accessibilityElement) {