├── .gitignore
├── README.md
├── ShiftIt
├── AXUIUtils.h
├── AXUIUtils.m
├── DefaultShiftItActions.h
├── DefaultShiftItActions.m
├── English.lproj
│ ├── InfoPlist.strings
│ ├── MainMenu.xib
│ └── ShortcutRecorder.strings
├── FMT
│ ├── FMTDefines.h
│ ├── FMTHotKey+SRKeyCombo.h
│ ├── FMTHotKey+SRKeyCombo.m
│ ├── FMTHotKey.h
│ ├── FMTHotKey.m
│ ├── FMTHotKeyManager.h
│ ├── FMTHotKeyManager.m
│ ├── FMTLoginItems.h
│ ├── FMTLoginItems.m
│ ├── FMTUtils.h
│ ├── FMTUtils.m
│ └── Readme.md
├── PreferencesWindow.xib
├── PreferencesWindowController.h
├── PreferencesWindowController.m
├── ShiftIt-Info.plist
├── ShiftIt-defaults.plist
├── ShiftIt-menuIcon.png
├── ShiftIt.h
├── ShiftIt.icns
├── ShiftIt.xcodeproj
│ └── project.pbxproj
├── ShiftItAction.h
├── ShiftItAction.m
├── ShiftItAppDelegate.h
├── ShiftItAppDelegate.m
├── ShiftIt_Prefix.pch
├── ShortcutRecorder.framework
│ ├── Headers
│ ├── Resources
│ ├── ShortcutRecorder
│ └── Versions
│ │ ├── A
│ │ ├── Headers
│ │ │ ├── SRCommon.h
│ │ │ ├── SRKeyCodeTransformer.h
│ │ │ ├── SRRecorderCell.h
│ │ │ ├── SRRecorderControl.h
│ │ │ ├── SRValidator.h
│ │ │ ├── SR_LeopardView.h
│ │ │ └── ShortcutRecorder.h
│ │ ├── Resources
│ │ │ ├── Info.plist
│ │ │ └── ShortcutRecorder.ibplugin
│ │ │ │ └── Contents
│ │ │ │ ├── Info.plist
│ │ │ │ ├── MacOS
│ │ │ │ └── ShortcutRecorder
│ │ │ │ └── Resources
│ │ │ │ ├── English.lproj
│ │ │ │ ├── InfoPlist.strings
│ │ │ │ ├── SR_LeopardInspector.nib
│ │ │ │ └── SR_LeopardLibrary.nib
│ │ │ │ └── SRRecorderControl.classdescription
│ │ └── ShortcutRecorder
│ │ └── Current
├── Sparkle.framework
│ ├── Headers
│ ├── Resources
│ ├── Sparkle
│ └── Versions
│ │ ├── A
│ │ ├── Headers
│ │ │ ├── SUAppcast.h
│ │ │ ├── SUAppcastItem.h
│ │ │ ├── SUUpdater.h
│ │ │ ├── SUVersionComparisonProtocol.h
│ │ │ └── Sparkle.h
│ │ ├── Resources
│ │ │ ├── Info.plist
│ │ │ ├── License.txt
│ │ │ ├── SUModelTranslation.plist
│ │ │ ├── SUStatus.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ └── keyedobjects.nib
│ │ │ ├── de.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ ├── en.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ ├── es.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ ├── fr.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── Sparkle.strings
│ │ │ │ └── fr.lproj
│ │ │ ├── fr_CA.lproj
│ │ │ ├── it.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ ├── nl.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ ├── relaunch
│ │ │ ├── ru.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ │ ├── classes.nib
│ │ │ │ │ ├── info.nib
│ │ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ │ └── sv.lproj
│ │ │ │ ├── SUAutomaticUpdateAlert.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdateAlert.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ └── keyedobjects.nib
│ │ │ │ ├── SUUpdatePermissionPrompt.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ └── keyedobjects.nib
│ │ │ │ └── Sparkle.strings
│ │ └── Sparkle
│ │ └── Current
├── WindowSizer.h
├── WindowSizer.m
├── X11Utils.c
├── X11Utils.h
├── dsa_pub.pem
└── main.m
├── artwork
└── ShiftIt.png
└── scripts
└── release.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | ShiftIt/build
2 | release-notes-*
3 | ShiftIt-*.zip
4 | ShiftIt/ShiftIt.xcodeproj/*.pbxuser
5 | ShiftIt/ShiftIt.xcodeproj/*.perspectivev3
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
ShiftIt
2 |
3 | *Managing window size and position in OSX*
4 |
5 | About
6 | --------
7 |
8 | ShiftIt is an application for OSX that allows you to quickly manipulate window position and size using keyboard shortcuts. It intends to become a full featured window organizer for OSX.
9 | It is a fork from the original [ShiftIt][1] by [Aravindkumar Rajendiran][2] which is not longer under development. For discussing any sort of stuff about this app, please create a new issue [right here][3] in github. There is also quite a quiet [google group][4], but it's better to post stuff directly here.
10 |
11 | License: [GNU General Public License v3][5]
12 |
13 | Requirements
14 | ------------
15 |
16 | The primary development is done on OSX 10.6 Snow Leopard, but it should be running under OSX 10.5 Leopard as well.
17 |
18 | Compiling
19 | ---------
20 |
21 | After cloning or download a snapshot of the repository (*master branch
22 | is recommended*):
23 |
24 | * on OSX 10.6 Snow Leopard
25 | 1. Compile in XCode by clicking build, or use the
26 | `scripts/release.sh`
27 | 1. That's it
28 | * on OSX 10.5 Leopard
29 | 1. Go to `Project` menu and click `Edit Project Settings` item
30 | 1. Select `Build` tab
31 | 1. Set `Architectures` to be `32-bit Universal`
32 | 1. Select `C/C++ Compiler Version` to be `GCC 4.2`
33 | 1. Check `Build Active Architecture Only`
34 |
35 | The reason for this is that the Interface Builder frameworks on OS X Leopard 10.5 do not have 64-Bit capabilities.
36 |
37 | Note: If you have a problem with the build - xcode complaining about the ShortcutRecorder IB plugin then download (from [here][7]) and build it yourself. Once done load it into the Interface Builder (double click on the just built ShortcutRecorder.ibplugin).
38 |
39 | FAQ
40 | ---
41 |
42 | **I disabled the `Show Icon in Menu Bar` in the preferences, how can I get it back?how can I get it back?**
43 |
44 | Launch the application again. It will open the preference dialog.
45 |
46 | 3rd Party Frameworks
47 | --------------------
48 |
49 | * [ShortcutRecorder][7] framework (*New BSD license*) for capturing key bindings during hotkey reconfiguration. (*from version 1.4*)
50 | * [FMT][8] framework (*MIT license*) for some utility functions like handling login items, hot keys, etc. (*from version 1.5*)
51 |
52 | Change Log:
53 | ---------------------------
54 |
55 | - [1.5][9]
56 | - [1.4.1][10]
57 | - [1.4][11]
58 | - [1.3][12]
59 |
60 |
61 | [1]: http://code.google.com/p/shiftit/
62 | [2]: http://ca.linkedin.com/in/aravind88
63 | [3]: https://github.com/fikovnik/ShiftIt/issues
64 | [4]: http://groups.google.com/group/shiftitapp
65 | [5]: http://www.gnu.org/licenses/gpl.html
66 | [7]: http://code.google.com/p/shortcutrecorder/
67 | [8]: https://github.com/fikovnik/FMT
68 | [9]: http://nkuyu.net/apps/shiftit/release-notes-1.5.html
69 | [10]: http://nkuyu.net/apps/shiftit/release-notes-1.4.1.html
70 | [11]: http://nkuyu.net/apps/shiftit/release-notes-1.4.html
71 | [12]: http://nkuyu.net/apps/shiftit/release-notes-1.3.htmlBlockquotehow can I get it back?
72 |
--------------------------------------------------------------------------------
/ShiftIt/AXUIUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | int AXUISetWindowPosition(void *window, int x, int y);
21 | int AXUISetWindowSize(void *window, unsigned int width, unsigned int height);
22 | int AXUIGetActiveWindow(void **activeWindow);
23 | int AXUIGetWindowGeometry(void *window, int *x, int *y, unsigned int *width, unsigned int *height);
24 | void AXUIFreeWindowRef(void *window);
25 |
26 | const char *AXUIGetErrorMessage(int code);
--------------------------------------------------------------------------------
/ShiftIt/AXUIUtils.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import
21 |
22 | #import "AXUIUtils.h"
23 | #import "FMTDefines.h"
24 |
25 | static const char *const kErrorMessages_[] = {
26 | "AXError: Unable to get active application",
27 | "AXError: Unable to get active window",
28 | "AXError: Unable to get active window position",
29 | "AXError: Unable to extract position",
30 | "AXError: Unable to get focused window size",
31 | "AXError: Unable to extract position",
32 | "AXError: Position cannot be changed",
33 | "AXError: Size cannot be modified"
34 | };
35 |
36 | static int kErrorMessageCount_ = sizeof(kErrorMessages_)/sizeof(kErrorMessages_[0]);
37 |
38 | int AXUISetWindowPosition(void *window, int x, int y) {
39 | FMTAssertNotNil(window);
40 |
41 | NSPoint position = {x, y};
42 | CFTypeRef positionRef = (CFTypeRef)(AXValueCreate(kAXValueCGPointType, (const void *)&position));
43 | if(AXUIElementSetAttributeValue((AXUIElementRef)window,(CFStringRef)NSAccessibilityPositionAttribute,(CFTypeRef*)positionRef) != kAXErrorSuccess){
44 | CFRelease(positionRef);
45 | return -7;
46 | }
47 | CFRelease(positionRef);
48 |
49 | return 0;
50 | }
51 |
52 | int AXUISetWindowSize(void *window, unsigned int width, unsigned int height) {
53 | FMTAssertNotNil(window);
54 |
55 | NSSize size = {width, height};
56 | CFTypeRef sizeRef = (CFTypeRef)(AXValueCreate(kAXValueCGSizeType, (const void *)&size));
57 | if(AXUIElementSetAttributeValue((AXUIElementRef)window,(CFStringRef)NSAccessibilitySizeAttribute,(CFTypeRef*)sizeRef) != kAXErrorSuccess){
58 | CFRelease(sizeRef);
59 | return -8;
60 | }
61 | CFRelease(sizeRef);
62 |
63 | return 0;
64 | }
65 |
66 | int AXUIGetActiveWindow(void **activeWindow) {
67 | AXUIElementRef systemElementRef = AXUIElementCreateSystemWide();
68 | // here is the assert for purpose because the app should not have gone
69 | // that far in execution if the AX api is not available
70 | FMTAssertNotNil(systemElementRef);
71 |
72 | //get the focused application
73 | AXUIElementRef focusedAppRef = nil;
74 | AXError axerror = AXUIElementCopyAttributeValue(systemElementRef,
75 | (CFStringRef) kAXFocusedApplicationAttribute,
76 | (CFTypeRef *) &focusedAppRef);
77 | CFRelease(systemElementRef);
78 |
79 | if (axerror != kAXErrorSuccess) {
80 | return -1;
81 | }
82 | FMTAssertNotNil(focusedAppRef);
83 |
84 | //get the focused window
85 | AXUIElementRef focusedWindowRef = nil;
86 | axerror = AXUIElementCopyAttributeValue((AXUIElementRef)focusedAppRef,
87 | (CFStringRef)NSAccessibilityFocusedWindowAttribute,
88 | (CFTypeRef*)&focusedWindowRef);
89 | CFRelease(focusedAppRef);
90 | if (axerror != kAXErrorSuccess) {
91 | return -2;
92 | }
93 | FMTAssertNotNil(focusedWindowRef);
94 | *activeWindow = (void *) focusedWindowRef;
95 |
96 | return 0;
97 | }
98 |
99 | int AXUIGetWindowGeometry(void *window, int *x, int *y, unsigned int *width, unsigned int *height) {
100 | FMTAssertNotNil(x);
101 | FMTAssertNotNil(y);
102 | FMTAssertNotNil(width);
103 | FMTAssertNotNil(height);
104 |
105 | //get the position
106 | CFTypeRef positionRef;
107 | NSPoint position;
108 |
109 | int axerror = AXUIElementCopyAttributeValue((AXUIElementRef)window,(CFStringRef)NSAccessibilityPositionAttribute,(CFTypeRef*)&positionRef);
110 | if (axerror != kAXErrorSuccess) {
111 | return -3;
112 | }
113 |
114 | FMTAssertNotNil(positionRef);
115 | if(AXValueGetType(positionRef) == kAXValueCGPointType) {
116 | AXValueGetValue(positionRef, kAXValueCGPointType, (void*)&position);
117 | *x = (int) position.x;
118 | *y = (int) position.y;
119 | } else {
120 | CFRelease(positionRef);
121 |
122 | return -4;
123 | }
124 | CFRelease(positionRef);
125 |
126 | //get the focused size
127 | CFTypeRef sizeRef;
128 | NSSize size;
129 |
130 | axerror = AXUIElementCopyAttributeValue((AXUIElementRef)window,(CFStringRef)NSAccessibilitySizeAttribute,(CFTypeRef*)&sizeRef);
131 | if (axerror != kAXErrorSuccess) {
132 | return -5;
133 | }
134 |
135 | FMTAssertNotNil(sizeRef);
136 | if(AXValueGetType(sizeRef) == kAXValueCGSizeType) {
137 | AXValueGetValue(sizeRef, kAXValueCGSizeType, (void*)&size);
138 | *width = (unsigned int) size.width;
139 | *height = (unsigned int) size.height;
140 | } else {
141 | CFRelease(sizeRef);
142 |
143 | return -6;
144 | }
145 | CFRelease(sizeRef);
146 |
147 | return 0;
148 | }
149 |
150 | void AXUIFreeWindowRef(void *window) {
151 | FMTAssertNotNil(window);
152 |
153 | CFRelease((CFTypeRef) window);
154 | }
155 |
156 | const char *AXUIGetErrorMessage(int code) {
157 | FMTAssert(code < 0 && code >= -kErrorMessageCount_, @"error code must be %d < code < 0", -kErrorMessageCount_);
158 |
159 | return kErrorMessages_[-code-1];
160 | }
--------------------------------------------------------------------------------
/ShiftIt/DefaultShiftItActions.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import
21 |
22 | NSRect ShiftIt_Left(NSSize screenSize, NSRect windowRect);
23 | NSRect ShiftIt_Right(NSSize screenSize, NSRect windowRect);
24 | NSRect ShiftIt_Top(NSSize screenSize, NSRect windowRect);
25 | NSRect ShiftIt_Bottom(NSSize screenSize, NSRect windowRect);
26 | NSRect ShiftIt_TopLeft(NSSize screenSize, NSRect windowRect);
27 | NSRect ShiftIt_TopRight(NSSize screenSize, NSRect windowRect);
28 | NSRect ShiftIt_BottomLeft(NSSize screenSize, NSRect windowRect);
29 | NSRect ShiftIt_BottomRight(NSSize screenSize, NSRect windowRect);
30 | NSRect ShiftIt_FullScreen(NSSize screenSize, NSRect windowRect);
31 | NSRect ShiftIt_Center(NSSize screenSize, NSRect windowRect);
32 | NSRect ShiftIt_Increase(NSSize screenSize, NSRect windowRect);
33 | NSRect ShiftIt_Reduce(NSSize screenSize, NSRect windowRect);
34 |
--------------------------------------------------------------------------------
/ShiftIt/DefaultShiftItActions.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import "DefaultShiftItActions.h"
21 | #import "FMTDefines.h"
22 | #import "WindowSizer.h"
23 |
24 | extern short GetMBarHeight(void);
25 |
26 | NSRect ShiftIt_Left(NSSize screenSize, NSRect windowRect) {
27 | NSRect r;
28 |
29 | r.origin.x = 0;
30 | r.origin.y = 0;
31 |
32 | r.size.width = screenSize.width / 2;
33 | r.size.height = screenSize.height;
34 |
35 | return r;
36 | }
37 |
38 | NSRect ShiftIt_Right(NSSize screenSize, NSRect windowRect) {
39 | NSRect r;
40 |
41 | r.origin.x = screenSize.width/2;
42 | r.origin.y = 0;
43 |
44 | r.size.width = screenSize.width / 2;
45 | r.size.height = screenSize.height;
46 |
47 | return r;
48 | }
49 |
50 | NSRect ShiftIt_Top(NSSize screenSize, NSRect windowRect) {
51 | NSRect r;
52 |
53 | r.origin.x = 0;
54 | r.origin.y = 0;
55 |
56 | r.size.width = screenSize.width;
57 | r.size.height = screenSize.height / 2;
58 |
59 | return r;
60 | }
61 |
62 | NSRect ShiftIt_Bottom(NSSize screenSize, NSRect windowRect) {
63 | NSRect r;
64 |
65 | r.origin.x = 0;
66 | r.origin.y = screenSize.height / 2;
67 |
68 | r.size.width = screenSize.width;
69 | r.size.height = screenSize.height / 2;
70 |
71 | return r;
72 | }
73 |
74 | NSRect ShiftIt_TopLeft(NSSize screenSize, NSRect windowRect) {
75 | NSRect r;
76 |
77 | r.origin.x = 0;
78 | r.origin.y = 0;
79 |
80 | r.size.width = screenSize.width / 2;
81 | r.size.height = screenSize.height / 2;
82 |
83 | return r;
84 | }
85 |
86 | NSRect ShiftIt_TopRight(NSSize screenSize, NSRect windowRect) {
87 | NSRect r;
88 |
89 | r.origin.x = screenSize.width / 2;
90 | r.origin.y = 0;
91 |
92 | r.size.width = screenSize.width / 2;
93 | r.size.height = screenSize.height / 2;
94 |
95 | return r;
96 | }
97 |
98 | NSRect ShiftIt_BottomLeft(NSSize screenSize, NSRect windowRect) {
99 | NSRect r;
100 |
101 | r.origin.x = 0;
102 | r.origin.y = screenSize.height / 2;
103 |
104 | r.size.width = screenSize.width / 2;
105 | r.size.height = screenSize.height / 2;
106 |
107 | return r;
108 | }
109 |
110 | NSRect ShiftIt_BottomRight(NSSize screenSize, NSRect windowRect) {
111 | NSRect r;
112 |
113 | r.origin.x = screenSize.width / 2;
114 | r.origin.y = screenSize.height / 2;
115 |
116 | r.size.width = screenSize.width / 2;
117 | r.size.height = screenSize.height / 2;
118 |
119 | return r;
120 | }
121 |
122 | NSRect ShiftIt_FullScreen(NSSize screenSize, NSRect windowRect) {
123 | NSRect r;
124 |
125 | r.origin.x = 0;
126 | r.origin.y = 0;
127 |
128 | r.size.width = screenSize.width;
129 | r.size.height = screenSize.height;
130 |
131 | return r;
132 | }
133 |
134 | NSRect ShiftIt_Center(NSSize screenSize, NSRect windowRect) {
135 | NSRect r;
136 |
137 | r.origin.x = (screenSize.width / 2)-(windowRect.size.width / 2);
138 | r.origin.y = (screenSize.height / 2)-(windowRect.size.height / 2);
139 |
140 | r.size = windowRect.size;
141 |
142 | return r;
143 | }
144 |
145 | //wider
146 | NSRect ShiftIt_Increase(NSSize screenSize, NSRect windowRect) {
147 | NSRect r;
148 | float menuBarHeight = GetMBarHeight();
149 |
150 | NSString *lastActionExecuted = [[WindowSizer sharedWindowSize] lastActionExecuted];
151 | if (lastActionExecuted == @"left" || lastActionExecuted == @"right") {
152 | //wider
153 | int whichSide;
154 | (windowRect.origin.x == 0) ? (whichSide = 0) : (whichSide = 1);
155 |
156 | switch (whichSide) {
157 | case 0: // window origin is in left region
158 | r.size.width = windowRect.size.width + (screenSize.width/12);
159 | r.size.height = windowRect.size.height;
160 |
161 | r.origin.x = windowRect.origin.x;
162 | r.origin.y = windowRect.origin.y - menuBarHeight;
163 |
164 | break;
165 | case 1: // window origin is in right region
166 | r.size.width = windowRect.size.width + (screenSize.width/12);
167 | r.size.height = windowRect.size.height;
168 |
169 | r.origin.x = screenSize.width - r.size.width;
170 | r.origin.y = windowRect.origin.y - menuBarHeight;
171 |
172 | break;
173 | default:
174 | break;
175 | }
176 | } else if (lastActionExecuted == @"top" || lastActionExecuted == @"bottom") {
177 | //taller
178 | // detect which side of the screen the window is touching the side of the display
179 | int topOrBottom;
180 | (windowRect.origin.y - menuBarHeight == 0) ? (topOrBottom = 0) : (topOrBottom = 1);
181 |
182 | switch (topOrBottom) {
183 | case 0: // window origin is in upper region
184 | r.size.width = windowRect.size.width;
185 | r.size.height = windowRect.size.height + (screenSize.height/12);
186 |
187 | r.origin.x = windowRect.origin.x;
188 | r.origin.y = windowRect.origin.y - menuBarHeight;
189 |
190 | break;
191 | case 1: // window origin is in lower region
192 | r.size.width = windowRect.size.width;
193 | r.size.height = windowRect.size.height + (screenSize.height/12);
194 |
195 | r.origin.x = 0;
196 | r.origin.y = screenSize.height - r.size.height;
197 |
198 | break;
199 | default:
200 | break;
201 | }
202 |
203 | } else
204 | return windowRect;
205 |
206 | return r;
207 | }
208 |
209 | //taller
210 | NSRect ShiftIt_Reduce(NSSize screenSize, NSRect windowRect) {
211 | NSRect r;
212 | float menuBarHeight = GetMBarHeight();
213 |
214 | NSString *lastActionExecuted = [[WindowSizer sharedWindowSize] lastActionExecuted];
215 | if (lastActionExecuted == @"left" || lastActionExecuted == @"right") {
216 | //thinner
217 | int whichSide;
218 | (windowRect.origin.x == 0) ? (whichSide = 0) : (whichSide = 1);
219 |
220 | switch (whichSide) {
221 | case 0: // window origin is in left region
222 | r.size.width = windowRect.size.width - (screenSize.width/12);
223 | r.size.height = windowRect.size.height;
224 |
225 | r.origin.x = windowRect.origin.x;
226 | r.origin.y = windowRect.origin.y - menuBarHeight;
227 |
228 | break;
229 | case 1: // window origin is in right region
230 | r.size.width = windowRect.size.width - (screenSize.width/12);
231 | r.size.height = windowRect.size.height;
232 |
233 | r.origin.x = screenSize.width - r.size.width;
234 | r.origin.y = windowRect.origin.y - menuBarHeight;
235 |
236 | break;
237 | default:
238 | break;
239 | }
240 | } else if (lastActionExecuted == @"top" || lastActionExecuted == @"bottom") {
241 | //shorter
242 | // detect which side of the screen the window is touching the side of the display
243 | int topOrBottom;
244 | (windowRect.origin.y - menuBarHeight == 0) ? (topOrBottom = 0) : (topOrBottom = 1);
245 |
246 | switch (topOrBottom) {
247 | case 0: // window origin is in upper region
248 | r.size.width = windowRect.size.width;
249 | r.size.height = windowRect.size.height - (screenSize.height/12);
250 |
251 | r.origin.x = windowRect.origin.x;
252 | r.origin.y = windowRect.origin.y - menuBarHeight;
253 |
254 | break;
255 | case 1: // window origin is in lower region
256 | r.size.width = windowRect.size.width;
257 | r.size.height = windowRect.size.height - (screenSize.height/12);
258 |
259 | r.origin.x = 0;
260 | r.origin.y = screenSize.height - r.size.height;
261 |
262 | break;
263 | default:
264 | break;
265 | }
266 |
267 | } else
268 | return windowRect;
269 |
270 | return r;
271 | }
272 |
--------------------------------------------------------------------------------
/ShiftIt/English.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/ShiftIt/English.lproj/ShortcutRecorder.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/English.lproj/ShortcutRecorder.strings
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTDefines.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this sofFMTare and associated documentation files (the "SofFMTare"), to deal
6 | in the SofFMTare without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the SofFMTare, and to permit persons to whom the SofFMTare is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the SofFMTare.
13 |
14 | THE SOFFMTARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFFMTARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFFMTARE.
21 | */
22 |
23 | // following assertions were taken from: GMTDefines.h from the google-mac-toolbox:
24 | // http://code.google.com/p/google-toolbox-for-mac/
25 |
26 | #ifndef FMTDevLog
27 |
28 | #ifndef NDEBUG
29 | #define FMTDevLog(...) NSLog(__VA_ARGS__)
30 | #else
31 | #define FMTDevLog(...) do { } while (0)
32 | #endif // NDEBUG
33 |
34 | #endif // FMTDevLog
35 |
36 | // TODO: rename to NSStr
37 | #ifndef FMTStr
38 | #define FMTStr(fmt,...) [NSString stringWithFormat:fmt,##__VA_ARGS__]
39 | #endif // FMTStr
40 |
41 | #define FMTStrc(cstr) [NSString stringWithCString:(cstr) encoding:NSUTF8StringEncoding]
42 |
43 | #ifndef FMTTraceLog
44 |
45 | #ifndef NTRACE
46 | #define FMTTraceLog(...) NSLog(@"%@: %@",FMTStr(@"[\%s:\%s:\%d]",__PRETTY_FUNCTION__,__FILE__,__LINE__),FMTStr(__VA_ARGS__))
47 | #define FMTTrace() NSLog(@"[\%s:\%s:\%d]",__PRETTY_FUNCTION__,__FILE__,__LINE__)
48 | #endif // NTRACE
49 |
50 | #endif // FMTTraceLog
51 |
52 | #ifndef FMTAssert
53 |
54 | #if !defined(NS_BLOCK_ASSERTIONS)
55 |
56 | #define FMTAssert(condition, ...) \
57 | do { \
58 | if (!(condition)) { \
59 | [[NSAssertionHandler currentHandler] \
60 | handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \
61 | file:[NSString stringWithUTF8String:__FILE__] \
62 | lineNumber:__LINE__ \
63 | description:__VA_ARGS__]; \
64 | } \
65 | } while(0)
66 |
67 | #define FMTAssertNotNil(var) FMTAssert(var != nil, FMTStr(@"Variabe %@ must not be nil", @#var));
68 |
69 | #else // !defined(NS_BLOCK_ASSERTIONS)
70 | #define FMTAssert(condition, ...) do { } while (0)
71 | #endif // !defined(NS_BLOCK_ASSERTIONS)
72 |
73 | #endif // FMTAssert
74 |
75 | #ifndef FMTFail
76 |
77 | #define FMTFail(...) FMTAssert(NO,##__VA_ARGS__)
78 |
79 | #endif // FMTFail
80 |
81 |
82 | /// This macro implements the various methods needed to make a safe singleton.
83 | ///
84 | /// This Singleton pattern was taken from:
85 | /// http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_10.html
86 | ///
87 | /// Sample usage:
88 | ///
89 | /// SINGLETON_BOILERPLATE(SomeUsefulManager, sharedSomeUsefulManager)
90 | /// (with no trailing semicolon)
91 | ///
92 | /// This code here is based on Foundation/GTMObjectSingleton.h from google-toolbox-for-mac
93 | ///
94 |
95 | #ifndef SINGLETON_BOILERPLATE
96 |
97 | #define SINGLETON_BOILERPLATE(_object_name_, _shared_obj_name_) SINGLETON_BOILERPLATE_FULL(_object_name_, _shared_obj_name_, init)
98 |
99 | #endif // SINGLETON_BOILERPLATE
100 |
101 | #ifndef SINGLETON_BOILERPLATE_FULL
102 |
103 | #define SINGLETON_BOILERPLATE_FULL(_object_name_, _shared_obj_name_, _init_) \
104 | static _object_name_ *z##_shared_obj_name_ = nil; \
105 | + (_object_name_ *)_shared_obj_name_ { \
106 | @synchronized(self) { \
107 | if (z##_shared_obj_name_ == nil) { \
108 | /* Note that 'self' may not be the same as _object_name_ */ \
109 | /* first assignment done in allocWithZone but we must reassign in case init fails */ \
110 | z##_shared_obj_name_ = [[self alloc] _init_]; \
111 | FMTAssert((z##_shared_obj_name_ != nil), @"didn't catch singleton allocation"); \
112 | } \
113 | } \
114 | return z##_shared_obj_name_; \
115 | } \
116 | + (id)allocWithZone:(NSZone *)zone { \
117 | @synchronized(self) { \
118 | if (z##_shared_obj_name_ == nil) { \
119 | z##_shared_obj_name_ = [super allocWithZone:zone]; \
120 | return z##_shared_obj_name_; \
121 | } \
122 | } \
123 | \
124 | /* We can't return the shared instance, because it's been init'd */ \
125 | FMTAssert(NO, @"use the singleton API, not alloc+init"); \
126 | return nil; \
127 | } \
128 | - (id)retain { \
129 | return self; \
130 | } \
131 | - (NSUInteger)retainCount { \
132 | return NSUIntegerMax; \
133 | } \
134 | - (void)release { \
135 | } \
136 | - (id)autorelease { \
137 | return self; \
138 | } \
139 | - (id)copyWithZone:(NSZone *) __unused zone { \
140 | return self; \
141 | } \
142 |
143 | #endif // SINGLETON_BOILERPLATE_FULL
144 |
145 | #ifndef FMTGetErrorDescription
146 | #define FMTGetErrorDescription(error) [[(error) userInfo] objectForKey:NSLocalizedDescriptionKey]
147 | #endif // FMTGetErrorDescription
148 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKey+SRKeyCombo.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 |
25 | #import
26 |
27 | #import "FMTHotKey.h"
28 |
29 | @interface FMTHotKey (SRKeyCombo)
30 |
31 | + (FMTHotKey *)hotKey:(KeyCombo)keyCombo;
32 | - (KeyCombo)asKeyCombo;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKey+SRKeyCombo.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import "FMTHotKey+SRKeyCombo.h"
24 | #import "FMTDefines.h"
25 |
26 | @implementation FMTHotKey (SRKeyCombo)
27 |
28 | + (FMTHotKey *)hotKey:(KeyCombo)keyCombo {
29 | FMTHotKey *hotKey = [[FMTHotKey alloc] initWithKeyCode:keyCombo.code modifiers:keyCombo.flags];
30 |
31 | return hotKey;
32 | }
33 |
34 | - (KeyCombo)asKeyCombo {
35 | KeyCombo keyCombo = SRMakeKeyCombo(keyCode_, modifiers_);
36 |
37 | return keyCombo;
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 | #import
25 |
26 | @interface FMTHotKey : NSObject {
27 | @private
28 |
29 | /**
30 | * The virtual key code for the keyboard key associated with the receiving key event.
31 | *
32 | * @see NSEvent keyCode
33 | */
34 | NSInteger keyCode_;
35 |
36 | /**
37 | * Using the Cocoa modifiers
38 | *
39 | * @see NSEvent for NS*KeyMask (i.e.: NSCommandKeyMask)
40 | */
41 | NSUInteger modifiers_;
42 | }
43 |
44 | @property (readonly) NSInteger keyCode;
45 | @property (readonly) NSUInteger modifiers;
46 |
47 | - (id)initWithKeyCode:(NSInteger)keyCode modifiers:(NSUInteger)modifiers;
48 |
49 | - (NSString *)description;
50 | - (BOOL)isEqualTo:(id)object;
51 |
52 | @end
53 |
54 | #pragma mark Key code and modifiers conversion methods
55 |
56 | NSString *FMTStringForCocoaModifiers(NSUInteger modifiers);
57 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKey.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import "FMTHotKey.h"
24 | #import "FMTDefines.h"
25 |
26 | @implementation FMTHotKey
27 |
28 | @synthesize keyCode = keyCode_;
29 | @synthesize modifiers = modifiers_;
30 |
31 | - (id)initWithKeyCode:(NSInteger)keyCode modifiers:(NSUInteger)modifiers {
32 |
33 | if (![super init]) {
34 | return nil;
35 | }
36 |
37 | keyCode_ = keyCode;
38 |
39 | // TODO: assert that the code and modifiers make sense
40 | modifiers_ = modifiers;
41 |
42 | return self;
43 | }
44 |
45 | - (NSString *)description {
46 | return FMTStr(@"code: %d modifiers: %@ (%ld)", keyCode_, FMTStringForCocoaModifiers(modifiers_), modifiers_);
47 | }
48 |
49 | - (BOOL)isEqualTo:(id)object {
50 |
51 | if ([object isKindOfClass:[self class]] == NO) {
52 | return NO;
53 | }
54 |
55 | FMTHotKey *other = (FMTHotKey *) object;
56 | return (keyCode_ == [other keyCode]
57 | && modifiers_ == [other modifiers]);
58 | }
59 |
60 | // TODO: add hash
61 |
62 | @end
63 |
64 | #pragma mark Key code and modifiers conversion methods
65 |
66 | // this method is based on the SRStringForCocoaModifierFlags from SRCommon.m
67 | // in the ShortcutRecorder. The reason why it is duplicated here is to not to
68 | // have the dependency on ShortcutRecorder in FMTHotKey
69 | NSString *FMTStringForCocoaModifiers(NSUInteger modifiers) {
70 | NSString *modifiersString = [NSString stringWithFormat:@"%@%@%@%@",
71 | (modifiers & NSControlKeyMask ? [NSString stringWithFormat:@"%C", kControlUnicode] : @""),
72 | (modifiers & NSAlternateKeyMask ? [NSString stringWithFormat:@"%C", kOptionUnicode] : @""),
73 | (modifiers & NSShiftKeyMask ? [NSString stringWithFormat:@"%C", kShiftUnicode] : @""),
74 | (modifiers & NSCommandKeyMask ? [NSString stringWithFormat:@"%C", kCommandUnicode] : @"")];
75 |
76 | return modifiersString;
77 | }
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKeyManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 | #import
25 |
26 | #import "FMTHotKey.h"
27 |
28 | @interface FMTHotKeyManager : NSObject {
29 | @private
30 | NSInteger hotKeyIdSequence_;
31 | }
32 |
33 | + (FMTHotKeyManager *)sharedHotKeyManager;
34 |
35 | - (void)unregisterHotKey:(FMTHotKey *)hotKey;
36 | - (void)registerHotKey:(FMTHotKey *)hotKey handler:(SEL)handler provider:(id)provider userData:(id)userData;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTHotKeyManager.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 |
25 | #import "FMTHotKeyManager.h"
26 | #import "FMTDefines.h"
27 |
28 | @interface FMTHotKey (Private)
29 |
30 | - (NSInteger)carbonModifiers;
31 |
32 | @end
33 |
34 | @implementation FMTHotKey (Private)
35 |
36 | - (NSInteger) carbonModifiers {
37 | return SRCocoaToCarbonFlags([self modifiers]);
38 | }
39 |
40 | @end
41 |
42 | @interface TWHotKeyRegistartion : NSObject
43 | {
44 | FMTHotKey *hotKey_;
45 | SEL handler_;
46 | id provider_;
47 | id userData_;
48 | EventHotKeyRef ref_;
49 | }
50 |
51 | @property (readonly) FMTHotKey *hotKey;
52 | @property (readonly) SEL handler;
53 | @property (readonly) id provider;
54 | @property (readonly) id userData;
55 | @property (readonly) EventHotKeyRef ref;
56 |
57 | - (id)initWithHotKey:(FMTHotKey *)hotKey handler:(SEL)handler provider:(id)provider userData:(id)userData ref:(EventHotKeyRef)ref;
58 |
59 | @end
60 |
61 | @implementation TWHotKeyRegistartion
62 |
63 | @synthesize hotKey = hotKey_;
64 | @synthesize handler = handler_;
65 | @synthesize provider = provider_;
66 | @synthesize userData = userData_;
67 | @synthesize ref = ref_;
68 |
69 | - (id)initWithHotKey:(FMTHotKey *)hotKey handler:(SEL)handler provider:(id)provider userData:(id)userData ref:(EventHotKeyRef)ref {
70 | if (![super init]) {
71 | return nil;
72 | }
73 |
74 | FMTAssertNotNil(hotKey);
75 | FMTAssertNotNil(handler);
76 | FMTAssertNotNil(provider);
77 | FMTAssertNotNil(ref);
78 |
79 | hotKey_ = [hotKey retain];
80 | handler_ = handler;
81 | provider_ = [provider retain];
82 | userData_ = [userData retain];
83 | ref_ = ref;
84 |
85 | return self;
86 | }
87 |
88 | - (void) dealloc {
89 | [hotKey_ release];
90 | [provider_ release];
91 | [userData_ release];
92 |
93 | [super dealloc];
94 | }
95 |
96 | @end
97 |
98 | static NSMutableDictionary *allHotKeys;
99 |
100 | OSStatus hotKeyHandler(EventHandlerCallRef inHandlerCallRef,EventRef inEvent,
101 | void *userData)
102 | {
103 | EventHotKeyID hotKeyID;
104 | GetEventParameter(inEvent,kEventParamDirectObject,typeEventHotKeyID,NULL,
105 | sizeof(hotKeyID),NULL,&hotKeyID);
106 |
107 | NSNumber *id = [NSNumber numberWithInt:hotKeyID.id];
108 |
109 | TWHotKeyRegistartion* hotKeyReg = [allHotKeys objectForKey:id];
110 |
111 | if (hotKeyReg != nil) {
112 | objc_msgSend([hotKeyReg provider], [hotKeyReg handler], [hotKeyReg userData]);
113 | return noErr;
114 | } else {
115 | return eventNotHandledErr;
116 | }
117 | }
118 |
119 | @implementation FMTHotKeyManager
120 |
121 | SINGLETON_BOILERPLATE(FMTHotKeyManager, sharedHotKeyManager);
122 |
123 | - (id) init {
124 | if (![super init]) {
125 | return nil;
126 | }
127 |
128 | allHotKeys = [[NSMutableDictionary alloc] init];
129 | hotKeyIdSequence_ = 1;
130 |
131 | EventTypeSpec eventType;
132 | eventType.eventClass=kEventClassKeyboard;
133 | eventType.eventKind=kEventHotKeyPressed;
134 |
135 | InstallApplicationEventHandler(&hotKeyHandler, 1, &eventType, NULL, NULL);
136 |
137 | return self;
138 | }
139 |
140 | - (void)dealloc {
141 | [allHotKeys release];
142 |
143 | [super dealloc];
144 | }
145 |
146 | // TODO: modify to propagate error
147 | - (void)unregisterHotKey:(FMTHotKey *)hotKey {
148 | FMTAssertNotNil(hotKey);
149 |
150 | FMTDevLog(@"Unregistering hotKey %@", hotKey);
151 |
152 | // search for the registration
153 | TWHotKeyRegistartion *hotKeyReg;
154 | for (TWHotKeyRegistartion *e in [allHotKeys allValues]) {
155 | if ([hotKey isEqualTo:[e hotKey]]) {
156 | hotKeyReg = e;
157 | break;
158 | }
159 | }
160 |
161 | if (hotKeyReg) {
162 | UnregisterEventHotKey([hotKeyReg ref]);
163 | } else {
164 | // no registration found
165 | FMTDevLog(@"Unable to unregister hotKey: %@ - it has not been registered by this HotKeyManager", hotKey);
166 | }
167 |
168 | }
169 |
170 | - (void)registerHotKey:(FMTHotKey *)hotKey handler:(SEL)handler provider:(id)provider userData:(id)userData {
171 |
172 | FMTAssertNotNil(hotKey);
173 | FMTAssertNotNil(handler);
174 | FMTAssertNotNil(provider);
175 |
176 | FMTDevLog(@"Registering hotKey %@", hotKey);
177 |
178 | EventHotKeyID hotKeyID;
179 | // TODO: extract
180 | hotKeyID.signature = 'TFMT';
181 | // TODO: make sure it is thread safe
182 | hotKeyID.id = hotKeyIdSequence_++;
183 |
184 | EventHotKeyRef hotKeyRef;
185 | RegisterEventHotKey([hotKey keyCode], [hotKey carbonModifiers], hotKeyID,
186 | GetApplicationEventTarget(), 0, &hotKeyRef);
187 |
188 | if (!hotKeyRef) {
189 | NSLog(@"Unable to register hotKey: %@", hotKey);
190 | return;
191 | }
192 |
193 | // safe
194 | TWHotKeyRegistartion *hotKeyReg = [[TWHotKeyRegistartion alloc] initWithHotKey:hotKey
195 | handler:handler
196 | provider:provider
197 | userData:userData
198 | ref:hotKeyRef];
199 |
200 | [allHotKeys setObject:hotKeyReg forKey:[NSNumber numberWithInt:hotKeyID.id]];
201 | }
202 |
203 | @end
204 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTLoginItems.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 |
25 | /**
26 | * Manages the login items - both global ones (system wide) and session ones (current user).
27 | */
28 | @interface FMTLoginItems : NSObject {
29 | @private
30 |
31 | /** The type of the login items. This is internaly being called by the two subclasses
32 | * possible values:
33 | *
34 | * kLSSharedFileListGlobalLoginItems - system wide
35 | * kLSSharedFileListSessionLoginItems - current user only
36 | */
37 | CFStringRef type_;
38 | }
39 |
40 | @property(readonly) CFStringRef type;
41 |
42 | /** Returns true iff an executable (application, unix executable, script) denoted by the path is present in the login items */
43 | - (BOOL) isInLoginItemsApplicationWithPath:(NSString *)path;
44 |
45 | /** Toggle the presence of an executable (application, unix executable, script) denoted by the path in the login items */
46 | - (void) toggleApplicationInLoginItemsWithPath:(NSString *)path enabled:(BOOL)enabled;
47 |
48 | /** Ge the global (system wide) login items */
49 | + (FMTLoginItems *) sharedGlobalLoginItems;
50 |
51 | /** Ge the session (current user) login items */
52 | + (FMTLoginItems *) sharedSessionLoginItems;
53 |
54 | @end
55 |
56 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTLoginItems.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import "FMTLoginItems.h"
24 |
25 | #import "FMTDefines.h"
26 |
27 | @interface FMTLoginItems (Private)
28 |
29 | - (id)initWithLoginItemsType_:(CFStringRef)type;
30 | - (LSSharedFileListItemRef) getApplicationLoginItemWithPath_:(NSString *)path;
31 |
32 | @end
33 |
34 | // following is just to simplify the code
35 | // not sure whether the is a better way to do that
36 | // this will reuse the SINGLETON_BOILERPLATE* macros
37 | // so less typing while maintaining all the properties of these singletons
38 |
39 | @interface FMTGlobalLoginItems_ : FMTLoginItems
40 |
41 | + (FMTGlobalLoginItems_ *) sharedGlobalLoginItems_;
42 |
43 | @end
44 |
45 | @interface FMTSessionLoginItems_ : FMTLoginItems
46 |
47 | + (FMTSessionLoginItems_ *) sharedSessionLoginItems_;
48 |
49 | @end
50 |
51 |
52 | @implementation FMTLoginItems
53 |
54 | @synthesize type = type_;
55 |
56 |
57 | - (id)initWithLoginItemsType_:(CFStringRef)type {
58 | FMTAssertNotNil(type)
59 |
60 | if (![super init]) {
61 | return nil;
62 | }
63 |
64 | type_ = type;
65 |
66 | return self;
67 | }
68 |
69 | - (void)dealloc {
70 | [super dealloc];
71 | }
72 |
73 | - (BOOL) isInLoginItemsApplicationWithPath:(NSString *)path {
74 | FMTAssertNotNil(path);
75 |
76 | return [self getApplicationLoginItemWithPath_:path] != nil;
77 | }
78 |
79 | // following code has been inspired from Growl sources
80 | // http://growl.info/source.php
81 | - (void) toggleApplicationInLoginItemsWithPath:(NSString *)path enabled:(BOOL)enabled {
82 | FMTAssertNotNil(path);
83 |
84 | OSStatus status;
85 | LSSharedFileListItemRef existingItem = [self getApplicationLoginItemWithPath_:path];
86 | CFURLRef URLToApp = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)path, kCFURLPOSIXPathStyle, true);
87 | LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL,type_, NULL);
88 |
89 | if (enabled && (existingItem == NULL)) {
90 | NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:path];
91 | IconRef icon = NULL;
92 | FSRef ref;
93 | Boolean gotRef = CFURLGetFSRef(URLToApp, &ref);
94 | if (gotRef) {
95 | status = GetIconRefFromFileInfo(&ref,
96 | /*fileNameLength*/ 0, /*fileName*/ NULL,
97 | kFSCatInfoNone, /*catalogInfo*/ NULL,
98 | kIconServicesNormalUsageFlag,
99 | &icon,
100 | /*outLabel*/ NULL);
101 | if (status != noErr)
102 | icon = NULL;
103 | }
104 |
105 | LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, (CFStringRef)displayName, icon, URLToApp, /*propertiesToSet*/ NULL, /*propertiesToClear*/ NULL);
106 | } else if (!enabled && (existingItem != NULL)) {
107 | LSSharedFileListItemRemove(loginItems, existingItem);
108 | }
109 | }
110 |
111 | #pragma mark Private methods
112 |
113 | - (LSSharedFileListItemRef) getApplicationLoginItemWithPath_:(NSString *)path {
114 | FMTAssertNotNil(path);
115 |
116 | CFURLRef URLToApp = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)path, kCFURLPOSIXPathStyle, true);
117 |
118 | LSSharedFileListItemRef existingItem = NULL;
119 | UInt32 seed = 0U;
120 | LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL,type_, NULL);
121 | NSArray *currentLoginItems = [NSMakeCollectable(LSSharedFileListCopySnapshot(loginItems, &seed)) autorelease];
122 |
123 | for (id itemObject in currentLoginItems) {
124 | LSSharedFileListItemRef item = (LSSharedFileListItemRef)itemObject;
125 |
126 | UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
127 | CFURLRef URL = NULL;
128 | OSStatus err = LSSharedFileListItemResolve(item, resolutionFlags, &URL, /*outRef*/ NULL);
129 | if (err == noErr) {
130 | Boolean foundIt = CFEqual(URL, URLToApp);
131 | CFRelease(URL);
132 |
133 | if (foundIt)
134 | existingItem = item;
135 | break;
136 | }
137 | }
138 |
139 | CFRelease(URLToApp);
140 |
141 | return existingItem;
142 | }
143 |
144 | + (FMTLoginItems *) sharedGlobalLoginItems {
145 | return [FMTGlobalLoginItems_ sharedGlobalLoginItems_];
146 | }
147 |
148 | + (FMTLoginItems *) sharedSessionLoginItems {
149 | return [FMTSessionLoginItems_ sharedSessionLoginItems_];
150 | }
151 | @end
152 |
153 | @implementation FMTGlobalLoginItems_
154 |
155 | SINGLETON_BOILERPLATE_FULL(FMTGlobalLoginItems_, sharedGlobalLoginItems_, initWithLoginItemsType_:kLSSharedFileListGlobalLoginItems);
156 |
157 | @end
158 |
159 | @implementation FMTSessionLoginItems_
160 |
161 | SINGLETON_BOILERPLATE_FULL(FMTSessionLoginItems_, sharedSessionLoginItems_, initWithLoginItemsType_:kLSSharedFileListSessionLoginItems);
162 |
163 | @end
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import
24 |
25 | NSString *FMTGetBundleResourcePath(NSBundle *bundle, NSString *resourceName, NSString *resourceType);
26 | NSString *FMTGetMainBundleResourcePath(NSString *resourceName, NSString *resourceType);
27 |
28 | NSURL *FMTGetBundleResourceURL(NSBundle *bundle, NSString *resourceName, NSString *resourceType);
29 | NSURL *FMTGetMainBundleResourceURL(NSString *resourceName, NSString *resourceType);
30 |
31 | BOOL FMTOpenSystemPreferencePane(NSString *prefPaneId);
32 |
33 | BOOL FMTIsProcessWithBundleIdRunning(NSString *bundleId);
34 |
35 | NSInteger FMTNumberOfRunningProcessesWithBundleId(NSString *bundleId);
36 |
--------------------------------------------------------------------------------
/ShiftIt/FMT/FMTUtils.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2010 Filip Krikava
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 | */
22 |
23 | #import "FMTUtils.h"
24 | #import "FMTDefines.h"
25 |
26 | NSString *const kSystemPreferencesAppBundeId = @"com.apple.systempreferences";
27 |
28 | NSString *FMTGetBundleResourcePath(NSBundle *bundle, NSString *resourceName, NSString *resourceType) {
29 | FMTAssertNotNil(bundle);
30 | FMTAssertNotNil(resourceName);
31 | FMTAssertNotNil(resourceType);
32 |
33 | NSString *path = [bundle pathForResource:resourceName ofType:resourceType];
34 | if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
35 | return path;
36 | } else {
37 | return nil;
38 | }
39 | }
40 |
41 | NSString *FMTGetMainBundleResourcePath(NSString *resourceName, NSString *resourceType) {
42 | return FMTGetBundleResourcePath([NSBundle mainBundle], resourceName, resourceType);
43 | }
44 |
45 | NSURL *FMTGetBundleResourceURL(NSBundle *bundle, NSString *resourceName, NSString *resourceType) {
46 | NSString *path = FMTGetBundleResourcePath(bundle, resourceName, resourceType);
47 |
48 | if (path) {
49 | return [NSURL fileURLWithPath:path];
50 | } else {
51 | return nil;
52 | }
53 | }
54 |
55 | NSURL *FMTGetMainBundleResourceURL(NSString *resourceName, NSString *resourceType) {
56 | return FMTGetBundleResourceURL([NSBundle mainBundle], resourceName, resourceType);
57 | }
58 |
59 | BOOL FMTOpenSystemPreferencePane(NSString *prefPaneId) {
60 | FMTAssertNotNil(prefPaneId);
61 |
62 | NSString *source = FMTStr(@"tell application \"System Preferences\"\n"
63 | "activate\n"
64 | "set current pane to pane \"%@\"\n"
65 | "end tell\n", prefPaneId);
66 |
67 | NSAppleScript *script = [[NSAppleScript alloc] initWithSource:source];
68 |
69 | NSDictionary *dict = nil;
70 | NSAppleEventDescriptor *event = [script executeAndReturnError:&dict];
71 |
72 | if (dict) {
73 | FMTDevLog(@"Compilation of AppleScript: %@ failed: %@", source, dict);
74 | }
75 |
76 | [script release];
77 |
78 | return event != nil;
79 | }
80 |
81 | NSInteger FMTNumberOfRunningProcessesWithBundleId(NSString *bundleId) {
82 | FMTAssertNotNil(bundleId);
83 |
84 | NSInteger n = 0;
85 | ProcessSerialNumber PSN = { kNoProcess, kNoProcess };
86 |
87 | while (GetNextProcess(&PSN) == noErr) {
88 | NSDictionary *infoDict = (NSDictionary *)ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask);
89 | if(infoDict) {
90 | NSString *processBundleID = [infoDict objectForKey:(NSString *)kCFBundleIdentifierKey];
91 | if (processBundleID && [processBundleID isEqualToString:bundleId]) {
92 | n++;
93 | }
94 |
95 | CFMakeCollectable(infoDict);
96 | [infoDict release];
97 | }
98 | }
99 |
100 | return n;
101 | }
102 |
103 | BOOL FMTIsProcessWithBundleIdRunning(NSString *bundleId) {
104 | return FMTNumberOfRunningProcessesWithBundleId(bundleId) >= 1;
105 | }
--------------------------------------------------------------------------------
/ShiftIt/FMT/Readme.md:
--------------------------------------------------------------------------------
1 | FMT
2 | ========
3 |
4 | *Fikovnik's Mac Toolkit*
5 |
6 | A collection of utility classes and functions that I share across project. Some documentation is in the header files, but most of the time the names of the methods and functions are pretty self-explanatory. Here's the list of current functionalities:
7 |
8 | * `FMTHotkeys*` - manager and hot key class that allows for simple management of global hotkeys, compatible with the [ShortcutRecorder][1]
9 | * `FMTLoginItems` - manage the list of system/session wide login items
10 | * `FMTDefines` - basic assert and log macros (inspired by the [google-mac-toolbox][2])
11 | * `FMTUtils` - some additional utility functions that might be handy
12 |
13 | Acknowledgement
14 | ---------------
15 |
16 | Some of the code has been inspired by [google-mac-toolbox][3] and [Growl project][4].
17 |
18 | License (MIT)
19 | -------------
20 |
21 | > Copyright (c) 2010 Filip Křikava
22 | >
23 | > Permission is hereby granted, free of charge, to any
24 | > person obtaining a copy of this software and associated
25 | > documentation files (the "Software"), to deal in the
26 | > Software without restriction, including without limitation
27 | > the rights to use, copy, modify, merge, publish,
28 | > distribute, sublicense, and/or sell copies of the
29 | > Software, and to permit persons to whom the Software is
30 | > furnished to do so, subject to the following conditions:
31 | >
32 | > The above copyright notice and this permission notice
33 | > shall be included in all copies or substantial portions of
34 | > the Software.
35 | >
36 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
37 | > KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
38 | > WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
39 | > PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
40 | > OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41 | > OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
42 | > OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
43 | > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44 |
45 | [1]: http://code.google.com/p/shortcutrecorder/
46 | [2]: http://code.google.com/p/google-toolbox-for-mac/
47 | [3]: http://code.google.com/p/google-toolbox-for-mac/
48 | [4]: http://growl.info/
49 |
--------------------------------------------------------------------------------
/ShiftIt/PreferencesWindowController.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 |
21 | #import
22 | #import
23 |
24 | @interface PreferencesWindowController : NSWindowController {
25 | @private
26 | NSString *selectedTabIdentifier_;
27 |
28 | IBOutlet NSButton * openAtLogin_;
29 | IBOutlet NSTabView * tabView_;
30 | IBOutlet NSTextField * versionLabel_;
31 | }
32 |
33 | @property BOOL shouldStartAtLogin;
34 |
35 | -(void)updateRecorderCombos;
36 | -(IBAction)showPreferences:(id)sender;
37 | -(IBAction)revertDefaults:(id)sender;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/ShiftIt/PreferencesWindowController.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import "PreferencesWindowController.h"
21 | #import "ShiftIt.h"
22 | #import "ShiftItAction.h"
23 | #import "FMTLoginItems.h"
24 | #import "FMTDefines.h"
25 | #import "FMTUtils.h"
26 |
27 | NSString *const kKeyCodePrefKeySuffix = @"KeyCode";
28 | NSString *const kModifiersPrefKeySuffix = @"Modifiers";
29 |
30 | NSString *const kDidFinishEditingHotKeysPrefNotification = @"kEnableActionsRequestNotification";
31 | NSString *const kDidStartEditingHotKeysPrefNotification = @"kDisableActionsRequestNotification";
32 | NSString *const kHotKeyChangedNotification = @"kHotKeyChangedNotification";
33 | NSString *const kActionIdentifierKey = @"kActionIdentifierKey";
34 | NSString *const kHotKeyKeyCodeKey = @"kHotKeyKeyCodeKey";
35 | NSString *const kHotKeyModifiersKey = @"kHotKeyModifiersKey";
36 |
37 | NSInteger const kSISRUITagPrefix = 1000;
38 |
39 | NSString *const kHotKeysTabViewItemIdentifier = @"hotKeys";
40 |
41 | @interface PreferencesWindowController(Private)
42 |
43 | - (void)windowMainStatusChanged_:(NSNotification *)notification;
44 |
45 | @end
46 |
47 |
48 | @implementation PreferencesWindowController
49 |
50 | @dynamic shouldStartAtLogin;
51 |
52 | -(id)init{
53 | if (![super initWithWindowNibName:@"PreferencesWindow"]) {
54 | return nil;
55 | }
56 |
57 | return self;
58 | }
59 |
60 | -(BOOL)acceptsFirstResponder{
61 | return YES;
62 | }
63 |
64 | -(void)awakeFromNib {
65 | [tabView_ selectTabViewItemAtIndex:0];
66 |
67 | NSString *versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
68 | [versionLabel_ setStringValue:versionString];
69 |
70 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
71 | [notificationCenter addObserver:self selector:@selector(windowMainStatusChanged_:) name:NSWindowDidResignMainNotification object:[self window]];
72 | [notificationCenter addObserver:self selector:@selector(windowMainStatusChanged_:) name:NSWindowDidBecomeMainNotification object:[self window]];
73 |
74 | [self updateRecorderCombos];
75 | }
76 |
77 | -(IBAction)showPreferences:(id)sender{
78 | [[self window] center];
79 | [NSApp activateIgnoringOtherApps:YES];
80 | [[self window] makeKeyAndOrderFront:sender];
81 | }
82 |
83 | -(IBAction)revertDefaults:(id)sender {
84 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
85 |
86 | NSString *path = FMTGetMainBundleResourcePath(kShiftItUserDefaults, @"plist");
87 | NSDictionary *initialDefaults = [NSDictionary dictionaryWithContentsOfFile:path];
88 | [defaults registerDefaults:initialDefaults];
89 |
90 | for (ShiftItAction *action in [allShiftActions allValues]) {
91 | NSString *identifier = [action identifier];
92 |
93 | NSNumber *n = nil;
94 |
95 | n = [initialDefaults objectForKey:KeyCodePrefKey(identifier)];
96 | [defaults setInteger:[n integerValue] forKey:KeyCodePrefKey(identifier)];
97 |
98 | n = [initialDefaults objectForKey:ModifiersPrefKey(identifier)];
99 | [defaults setInteger:[n integerValue] forKey:ModifiersPrefKey(identifier)];
100 | }
101 |
102 | [defaults synchronize];
103 |
104 | // normally this won't be necessary since there could be an observer
105 | // looking at changes in the user defaults values itself, but since there is
106 | // unfortunatelly 2 defaults for one key this won't work well
107 | [self updateRecorderCombos];
108 | }
109 |
110 |
111 | #pragma mark shouldStartAtLogin dynamic property methods
112 |
113 | - (BOOL)shouldStartAtLogin {
114 | NSString *path = [[NSBundle mainBundle] bundlePath];
115 | return [[FMTLoginItems sharedSessionLoginItems] isInLoginItemsApplicationWithPath:path];
116 | }
117 |
118 | - (void)setShouldStartAtLogin:(BOOL)flag {
119 | FMTDevLog(@"ShiftIt should start at login: %d", flag);
120 |
121 | NSString *path = [[NSBundle mainBundle] bundlePath];
122 | [[FMTLoginItems sharedSessionLoginItems] toggleApplicationInLoginItemsWithPath:path enabled:flag];
123 | }
124 |
125 | #pragma mark Shortcut Recorder methods
126 |
127 | - (void)shortcutRecorder:(SRRecorderControl *)recorder keyComboDidChange:(KeyCombo)newKeyCombo{
128 | NSInteger tag = [recorder tag] - kSISRUITagPrefix;
129 |
130 | ShiftItAction *action = nil;
131 | for (action in [allShiftActions allValues]) {
132 | if ([action uiTag] == tag) {
133 | break;
134 | }
135 | }
136 | FMTAssertNotNil(action);
137 |
138 | FMTDevLog(@"ShiftIt action %@ hotkey changed: ", [action identifier]);
139 |
140 | NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithCapacity:3];
141 | [userInfo setObject:[action identifier] forKey:kActionIdentifierKey];
142 | [userInfo setObject:[NSNumber numberWithInt:newKeyCombo.code] forKey:kHotKeyKeyCodeKey];
143 | [userInfo setObject:[NSNumber numberWithLong:newKeyCombo.flags] forKey:kHotKeyModifiersKey];
144 |
145 | [[NSNotificationCenter defaultCenter] postNotificationName:kHotKeyChangedNotification object:self userInfo:userInfo];
146 | }
147 |
148 | - (void)updateRecorderCombos {
149 | NSInteger idx = [tabView_ indexOfTabViewItemWithIdentifier:@"hotKeys"];
150 | NSView *hotKeysView = [[tabView_ tabViewItemAtIndex:idx] view];
151 | FMTAssertNotNil(hotKeysView);
152 |
153 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
154 |
155 | for (ShiftItAction *action in [allShiftActions allValues]) {
156 | SRRecorderControl *recorder = [hotKeysView viewWithTag:kSISRUITagPrefix+[action uiTag]];
157 | FMTAssertNotNil(recorder);
158 |
159 | NSString *identifier = [action identifier];
160 |
161 | KeyCombo combo;
162 | combo.code = [defaults integerForKey:KeyCodePrefKey(identifier)];
163 | combo.flags = [defaults integerForKey:ModifiersPrefKey(identifier)];
164 | [recorder setKeyCombo:combo];
165 | }
166 | }
167 |
168 | -(void)dealloc{
169 | [super dealloc];
170 | }
171 |
172 | #pragma mark TabView delegate methods
173 |
174 | - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem {
175 | if ([selectedTabIdentifier_ isEqualTo:kHotKeysTabViewItemIdentifier]) {
176 | [[NSNotificationCenter defaultCenter] postNotificationName:kDidStartEditingHotKeysPrefNotification object:nil];
177 | } else {
178 | [[NSNotificationCenter defaultCenter] postNotificationName:kDidFinishEditingHotKeysPrefNotification object:nil];
179 | }
180 | }
181 |
182 | #pragma mark Notification handling methods
183 |
184 | - (void)windowMainStatusChanged_:(NSNotification *)notification {
185 | NSString *name = [notification name];
186 |
187 | if ([name isEqualTo:NSWindowDidBecomeMainNotification] && [selectedTabIdentifier_ isEqualTo:kHotKeysTabViewItemIdentifier]) {
188 | [[NSNotificationCenter defaultCenter] postNotificationName:kDidStartEditingHotKeysPrefNotification object:nil];
189 | } else if ([name isEqualTo:NSWindowDidResignMainNotification]) {
190 | [[NSNotificationCenter defaultCenter] postNotificationName:kDidFinishEditingHotKeysPrefNotification object:nil];
191 | }
192 | }
193 |
194 | @end
195 |
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | ShiftIt.icns
11 | CFBundleIdentifier
12 | org.shiftitapp.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.5.1
23 | LSMinimumSystemVersion
24 | ${MACOSX_DEPLOYMENT_TARGET}
25 | LSUIElement
26 |
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 | SUFeedURL
32 | http://nkuyu.net/apps/shiftit/appcast.xml
33 | SUPublicDSAKeyFile
34 | dsa_pub.pem
35 |
36 |
37 |
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt-defaults.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShiftIt-defaults.plist
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt-menuIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShiftIt-menuIcon.png
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | extern NSString *const kShiftItAppBundleId;
21 |
22 | // indexed using the ShiftItAction identifier
23 | extern NSDictionary *allShiftActions;
24 |
25 | extern NSString *const kShiftItUserDefaults;
26 |
27 | extern NSString *const kKeyCodePrefKeySuffix;
28 | extern NSString *const kModifiersPrefKeySuffix;
29 |
30 | // preferences keys
31 | extern NSString *const kHasStartedBeforePrefKey;
32 | extern NSString *const kShowMenuPrefKey;
33 |
34 | // distributed notifications
35 | extern NSString *const kShowPreferencesRequestNotification;
36 |
37 | // local notifications
38 | extern NSString *const kDidFinishEditingHotKeysPrefNotification;
39 | extern NSString *const kDidStartEditingHotKeysPrefNotification;
40 | extern NSString *const kHotKeyChangedNotification;
41 |
42 | // kHotKeyChangedNotification userInfo keys
43 | extern NSString *const kActionIdentifierKey;
44 | extern NSString *const kHotKeyKeyCodeKey;
45 | extern NSString *const kHotKeyModifiersKey;
46 |
47 | extern NSInteger const kSIMenuUITagPrefix;
48 | extern NSInteger const kSISRUITagPrefix;
49 |
50 | extern NSString *const kSIIconName;
51 | extern NSString *const kSIIconType;
52 | extern NSString *const kSIMenuItemTitle;
53 |
54 | extern NSString *const SIErrorDomain;
55 | extern NSInteger const kUnableToGetActiveWindowErrorCode;
56 | extern NSInteger const kUnableToChangeWindowPositionErrorCode;
57 | extern NSInteger const kUnableToGetWindowGeometryErrorCode;
58 | extern NSInteger const kUnableToChangeWindowSizeErrorCode;
59 |
60 | #define KeyCodePrefKey(identifier) FMTStr(@"%@%@", (identifier), kKeyCodePrefKeySuffix)
61 | #define ModifiersPrefKey(identifier) FMTStr(@"%@%@", (identifier), kModifiersPrefKeySuffix)
62 |
63 | extern NSError* SICreateError(NSString *localizedDescription, NSInteger errorCode);
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShiftIt.icns
--------------------------------------------------------------------------------
/ShiftIt/ShiftItAction.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import
21 |
22 | /**
23 | * A reference to a function that position
24 | * and size the window's geometry denoted by the windowRect argument
25 | * relatively to a screen rect that originates at [0,0] (top left corner)
26 | * and has a size screenSize. The windowRect is the whole window
27 | * including any sort window decorators.
28 | */
29 | typedef NSRect (*ShiftItFunctionRef)(NSSize screenSize, NSRect windowRect);
30 |
31 | @interface ShiftItAction : NSObject {
32 | @private
33 | NSString *identifier_;
34 | NSString *label_;
35 | NSInteger uiTag_;
36 | ShiftItFunctionRef action_;
37 | }
38 |
39 | @property (readonly) NSString *identifier;
40 | @property (readonly) NSString *label;
41 | @property (readonly) NSInteger uiTag;
42 | @property (readonly) ShiftItFunctionRef action;
43 |
44 | - (id) initWithIdentifier:(NSString *)identifier label:(NSString *)label uiTag:(NSInteger)uiTag action:(ShiftItFunctionRef)action;
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/ShiftIt/ShiftItAction.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import "ShiftItAction.h"
21 | #import "FMTDefines.h"
22 |
23 | @implementation ShiftItAction
24 |
25 | @synthesize identifier = identifier_;
26 | @synthesize label = label_;
27 | @synthesize uiTag = uiTag_;
28 | @synthesize action = action_;
29 |
30 | - (id) initWithIdentifier:(NSString *)identifier label:(NSString *)label uiTag:(NSInteger)uiTag action:(ShiftItFunctionRef)action {
31 | FMTAssertNotNil(identifier);
32 | FMTAssertNotNil(label);
33 | FMTAssert(uiTag > 0, @"uiTag must be greater than 0");
34 | FMTAssertNotNil(action);
35 |
36 | if (![super init]) {
37 | return nil;
38 | }
39 |
40 | identifier_ = [identifier retain];
41 | label_ = [label retain];
42 | uiTag_ = uiTag;
43 | action_ = action;
44 |
45 | return self;
46 | }
47 |
48 | - (void) dealloc {
49 | [identifier_ release];
50 | [label_ release];
51 |
52 | [super dealloc];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/ShiftIt/ShiftItAppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import
21 |
22 | @class WindowSizer;
23 | @class PreferencesWindowController;
24 | @class FMTHotKeyManager;
25 |
26 | @interface ShiftItAppDelegate : NSObject {
27 | @private
28 | PreferencesWindowController *preferencesController_;
29 | FMTHotKeyManager *hotKeyManager_;
30 | WindowSizer *windowSizer_;
31 |
32 | NSMutableDictionary *allHotKeys_;
33 | BOOL paused_;
34 |
35 | IBOutlet NSMenu *statusMenu_;
36 | NSStatusItem *statusItem_;
37 | NSImage *statusMenuItemIcon_;
38 | }
39 |
40 | - (IBAction)showPreferences:(id)sender;
41 |
42 | @end
--------------------------------------------------------------------------------
/ShiftIt/ShiftIt_Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #ifdef __OBJC__
21 | #import
22 | #endif
23 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Headers:
--------------------------------------------------------------------------------
1 | Versions/Current/Headers
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Resources:
--------------------------------------------------------------------------------
1 | Versions/Current/Resources
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/ShortcutRecorder:
--------------------------------------------------------------------------------
1 | Versions/Current/ShortcutRecorder
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SRCommon.h:
--------------------------------------------------------------------------------
1 | //
2 | // SRCommon.h
3 | // ShortcutRecorder
4 | //
5 | // Copyright 2006-2007 Contributors. All rights reserved.
6 | //
7 | // License: BSD
8 | //
9 | // Contributors:
10 | // David Dauer
11 | // Jesper
12 | // Jamie Kirkpatrick
13 |
14 | #import
15 | #import
16 | #import
17 |
18 | #pragma mark Dummy class
19 |
20 | @interface SRDummyClass : NSObject {} @end
21 |
22 | #pragma mark -
23 | #pragma mark Typedefs
24 |
25 | typedef struct _KeyCombo {
26 | NSUInteger flags; // 0 for no flags
27 | NSInteger code; // -1 for no code
28 | } KeyCombo;
29 |
30 | #pragma mark -
31 | #pragma mark Enums
32 |
33 | // Unicode values of some keyboard glyphs
34 | enum {
35 | KeyboardTabRightGlyph = 0x21E5,
36 | KeyboardTabLeftGlyph = 0x21E4,
37 | KeyboardCommandGlyph = kCommandUnicode,
38 | KeyboardOptionGlyph = kOptionUnicode,
39 | KeyboardShiftGlyph = kShiftUnicode,
40 | KeyboardControlGlyph = kControlUnicode,
41 | KeyboardReturnGlyph = 0x2305,
42 | KeyboardReturnR2LGlyph = 0x21A9,
43 | KeyboardDeleteLeftGlyph = 0x232B,
44 | KeyboardDeleteRightGlyph = 0x2326,
45 | KeyboardPadClearGlyph = 0x2327,
46 | KeyboardLeftArrowGlyph = 0x2190,
47 | KeyboardRightArrowGlyph = 0x2192,
48 | KeyboardUpArrowGlyph = 0x2191,
49 | KeyboardDownArrowGlyph = 0x2193,
50 | KeyboardPageDownGlyph = 0x21DF,
51 | KeyboardPageUpGlyph = 0x21DE,
52 | KeyboardNorthwestArrowGlyph = 0x2196,
53 | KeyboardSoutheastArrowGlyph = 0x2198,
54 | KeyboardEscapeGlyph = 0x238B,
55 | KeyboardHelpGlyph = 0x003F,
56 | KeyboardUpArrowheadGlyph = 0x2303,
57 | };
58 |
59 | // Special keys
60 | enum {
61 | kSRKeysF1 = 122,
62 | kSRKeysF2 = 120,
63 | kSRKeysF3 = 99,
64 | kSRKeysF4 = 118,
65 | kSRKeysF5 = 96,
66 | kSRKeysF6 = 97,
67 | kSRKeysF7 = 98,
68 | kSRKeysF8 = 100,
69 | kSRKeysF9 = 101,
70 | kSRKeysF10 = 109,
71 | kSRKeysF11 = 103,
72 | kSRKeysF12 = 111,
73 | kSRKeysF13 = 105,
74 | kSRKeysF14 = 107,
75 | kSRKeysF15 = 113,
76 | kSRKeysF16 = 106,
77 | kSRKeysF17 = 64,
78 | kSRKeysF18 = 79,
79 | kSRKeysF19 = 80,
80 | kSRKeysSpace = 49,
81 | kSRKeysDeleteLeft = 51,
82 | kSRKeysDeleteRight = 117,
83 | kSRKeysPadClear = 71,
84 | kSRKeysLeftArrow = 123,
85 | kSRKeysRightArrow = 124,
86 | kSRKeysUpArrow = 126,
87 | kSRKeysDownArrow = 125,
88 | kSRKeysSoutheastArrow = 119,
89 | kSRKeysNorthwestArrow = 115,
90 | kSRKeysEscape = 53,
91 | kSRKeysPageDown = 121,
92 | kSRKeysPageUp = 116,
93 | kSRKeysReturnR2L = 36,
94 | kSRKeysReturn = 76,
95 | kSRKeysTabRight = 48,
96 | kSRKeysHelp = 114
97 | };
98 |
99 | #pragma mark -
100 | #pragma mark Macros
101 |
102 | // Localization macros, for use in any bundle
103 | #define SRLoc(key) SRLocalizedString(key, nil)
104 | #define SRLocalizedString(key, comment) NSLocalizedStringFromTableInBundle(key, @"ShortcutRecorder", [NSBundle bundleForClass: [SRDummyClass class]], comment)
105 |
106 | // Image macros, for use in any bundle
107 | //#define SRImage(name) [[[NSImage alloc] initWithContentsOfFile: [[NSBundle bundleForClass: [self class]] pathForImageResource: name]] autorelease]
108 | #define SRResIndImage(name) [SRSharedImageProvider supportingImageWithName:name]
109 | #define SRImage(name) SRResIndImage(name)
110 |
111 | //#define SRCommonWriteDebugImagery
112 |
113 | // Macros for glyps
114 | #define SRInt(x) [NSNumber numberWithInteger:x]
115 | #define SRChar(x) [NSString stringWithFormat: @"%C", x]
116 |
117 | // Some default values
118 | #define ShortcutRecorderEmptyFlags 0
119 | #define ShortcutRecorderAllFlags ShortcutRecorderEmptyFlags | (NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask | NSShiftKeyMask | NSFunctionKeyMask)
120 | #define ShortcutRecorderEmptyCode -1
121 |
122 | // These keys will cancel the recoding mode if not pressed with any modifier
123 | #define ShortcutRecorderEscapeKey 53
124 | #define ShortcutRecorderBackspaceKey 51
125 | #define ShortcutRecorderDeleteKey 117
126 |
127 | #pragma mark -
128 | #pragma mark Getting a string of the key combination
129 |
130 | //
131 | // ################### +- Returns string from keyCode like NSEvent's -characters
132 | // # EXPLANATORY # | +- Returns string from keyCode like NSEvent's -charactersUsingModifiers
133 | // # CHART # | | +- Returns fully readable and localized name of modifier (if modifier given)
134 | // ################### | | | +- Returns glyph of modifier (if modifier given)
135 | // SRString... X - - X
136 | // SRReadableString... X - X -
137 | // SRCharacter... - X - -
138 | //
139 | NSString * SRStringForKeyCode( NSInteger keyCode );
140 | NSString * SRStringForCarbonModifierFlags( NSUInteger flags );
141 | NSString * SRStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode );
142 | NSString * SRStringForCocoaModifierFlags( NSUInteger flags );
143 | NSString * SRStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode );
144 | NSString * SRReadableStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode );
145 | NSString * SRReadableStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode );
146 | NSString *SRCharacterForKeyCodeAndCarbonFlags(NSInteger keyCode, NSUInteger carbonFlags);
147 | NSString *SRCharacterForKeyCodeAndCocoaFlags(NSInteger keyCode, NSUInteger cocoaFlags);
148 |
149 | #pragma mark Converting between Cocoa and Carbon modifier flags
150 |
151 | NSUInteger SRCarbonToCocoaFlags( NSUInteger carbonFlags );
152 | NSUInteger SRCocoaToCarbonFlags( NSUInteger cocoaFlags );
153 |
154 | #pragma mark -
155 | #pragma mark Animation pace function
156 |
157 | CGFloat SRAnimationEaseInOut(CGFloat t);
158 |
159 | #pragma mark -
160 | #pragma mark Inlines
161 |
162 | FOUNDATION_STATIC_INLINE KeyCombo SRMakeKeyCombo(NSInteger code, NSUInteger flags) {
163 | KeyCombo kc;
164 | kc.code = code;
165 | kc.flags = flags;
166 | return kc;
167 | }
168 |
169 | FOUNDATION_STATIC_INLINE BOOL SRIsSpecialKey(NSInteger keyCode) {
170 | return (keyCode == kSRKeysF1 || keyCode == kSRKeysF2 || keyCode == kSRKeysF3 || keyCode == kSRKeysF4 || keyCode == kSRKeysF5 || keyCode == kSRKeysF6 || keyCode == kSRKeysF7 || keyCode == kSRKeysF8 || keyCode == kSRKeysF9 || keyCode == kSRKeysF10 || keyCode == kSRKeysF11 || keyCode == kSRKeysF12 || keyCode == kSRKeysF13 || keyCode == kSRKeysF14 || keyCode == kSRKeysF15 || keyCode == kSRKeysF16 || keyCode == kSRKeysSpace || keyCode == kSRKeysDeleteLeft || keyCode == kSRKeysDeleteRight || keyCode == kSRKeysPadClear || keyCode == kSRKeysLeftArrow || keyCode == kSRKeysRightArrow || keyCode == kSRKeysUpArrow || keyCode == kSRKeysDownArrow || keyCode == kSRKeysSoutheastArrow || keyCode == kSRKeysNorthwestArrow || keyCode == kSRKeysEscape || keyCode == kSRKeysPageDown || keyCode == kSRKeysPageUp || keyCode == kSRKeysReturnR2L || keyCode == kSRKeysReturn || keyCode == kSRKeysTabRight || keyCode == kSRKeysHelp);
171 | }
172 |
173 | #pragma mark -
174 | #pragma mark Additions
175 |
176 | @interface NSAlert( SRAdditions )
177 | + (NSAlert *) alertWithNonRecoverableError:(NSError *)error;
178 | @end
179 |
180 | #pragma mark -
181 | #pragma mark Image provider
182 |
183 | @interface SRSharedImageProvider : NSObject
184 | + (NSImage *)supportingImageWithName:(NSString *)name;
185 | @end
186 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SRKeyCodeTransformer.h:
--------------------------------------------------------------------------------
1 | //
2 | // SRKeyCodeTransformer.h
3 | // ShortcutRecorder
4 | //
5 | // Copyright 2006-2007 Contributors. All rights reserved.
6 | //
7 | // License: BSD
8 | //
9 | // Contributors:
10 | // David Dauer
11 | // Jesper
12 | // Jamie Kirkpatrick
13 |
14 | #import
15 |
16 | @interface SRKeyCodeTransformer : NSValueTransformer {} @end
17 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SRRecorderCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SRRecorderCell.h
3 | // ShortcutRecorder
4 | //
5 | // Copyright 2006-2007 Contributors. All rights reserved.
6 | //
7 | // License: BSD
8 | //
9 | // Contributors:
10 | // David Dauer
11 | // Jesper
12 | // Jamie Kirkpatrick
13 |
14 | #import
15 | #import "SRCommon.h"
16 |
17 | #define SRMinWidth 50
18 | #define SRMaxHeight 22
19 |
20 | #define SRTransitionFPS 30.0f
21 | #define SRTransitionDuration 0.35f
22 | //#define SRTransitionDuration 2.35
23 | #define SRTransitionFrames (SRTransitionFPS*SRTransitionDuration)
24 | #define SRAnimationAxisIsY YES
25 | #define ShortcutRecorderNewStyleDrawing
26 |
27 | #define SRAnimationOffsetRect(X,Y) (SRAnimationAxisIsY ? NSOffsetRect(X,0.0f,-NSHeight(Y)) : NSOffsetRect(X,NSWidth(Y),0.0f))
28 |
29 | @class SRRecorderControl, SRValidator;
30 |
31 | enum SRRecorderStyle {
32 | SRGradientBorderStyle = 0,
33 | SRGreyStyle = 1
34 | };
35 | typedef enum SRRecorderStyle SRRecorderStyle;
36 |
37 | @interface SRRecorderCell : NSActionCell
38 | {
39 | NSGradient *recordingGradient;
40 | NSString *autosaveName;
41 |
42 | BOOL isRecording;
43 | BOOL mouseInsideTrackingArea;
44 | BOOL mouseDown;
45 |
46 | SRRecorderStyle style;
47 |
48 | BOOL isAnimating;
49 | CGFloat transitionProgress;
50 | BOOL isAnimatingNow;
51 | BOOL isAnimatingTowardsRecording;
52 | BOOL comboJustChanged;
53 |
54 | NSTrackingRectTag removeTrackingRectTag;
55 | NSTrackingRectTag snapbackTrackingRectTag;
56 |
57 | KeyCombo keyCombo;
58 | BOOL hasKeyChars;
59 | NSString *keyChars;
60 | NSString *keyCharsIgnoringModifiers;
61 |
62 | NSUInteger allowedFlags;
63 | NSUInteger requiredFlags;
64 | NSUInteger recordingFlags;
65 |
66 | BOOL allowsKeyOnly;
67 | BOOL escapeKeysRecord;
68 |
69 | NSSet *cancelCharacterSet;
70 |
71 | SRValidator *validator;
72 |
73 | IBOutlet id delegate;
74 | BOOL globalHotKeys;
75 | void *hotKeyModeToken;
76 | }
77 |
78 | - (void)resetTrackingRects;
79 |
80 | #pragma mark *** Aesthetics ***
81 |
82 | + (BOOL)styleSupportsAnimation:(SRRecorderStyle)style;
83 |
84 | - (BOOL)animates;
85 | - (void)setAnimates:(BOOL)an;
86 | - (SRRecorderStyle)style;
87 | - (void)setStyle:(SRRecorderStyle)nStyle;
88 |
89 | #pragma mark *** Delegate ***
90 |
91 | - (id)delegate;
92 | - (void)setDelegate:(id)aDelegate;
93 |
94 | #pragma mark *** Responder Control ***
95 |
96 | - (BOOL)becomeFirstResponder;
97 | - (BOOL)resignFirstResponder;
98 |
99 | #pragma mark *** Key Combination Control ***
100 |
101 | - (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
102 | - (void)flagsChanged:(NSEvent *)theEvent;
103 |
104 | - (NSUInteger)allowedFlags;
105 | - (void)setAllowedFlags:(NSUInteger)flags;
106 |
107 | - (NSUInteger)requiredFlags;
108 | - (void)setRequiredFlags:(NSUInteger)flags;
109 |
110 | - (BOOL)allowsKeyOnly;
111 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord;
112 | - (BOOL)escapeKeysRecord;
113 |
114 | - (BOOL)canCaptureGlobalHotKeys;
115 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState;
116 |
117 | - (KeyCombo)keyCombo;
118 | - (void)setKeyCombo:(KeyCombo)aKeyCombo;
119 |
120 | #pragma mark *** Autosave Control ***
121 |
122 | - (NSString *)autosaveName;
123 | - (void)setAutosaveName:(NSString *)aName;
124 |
125 | // Returns the displayed key combination if set
126 | - (NSString *)keyComboString;
127 |
128 | - (NSString *)keyChars;
129 | - (NSString *)keyCharsIgnoringModifiers;
130 |
131 | @end
132 |
133 | // Delegate Methods
134 | @interface NSObject (SRRecorderCellDelegate)
135 | - (BOOL)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason;
136 | - (void)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell keyComboDidChange:(KeyCombo)newCombo;
137 | @end
138 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SRRecorderControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // SRRecorderControl.h
3 | // ShortcutRecorder
4 | //
5 | // Copyright 2006-2007 Contributors. All rights reserved.
6 | //
7 | // License: BSD
8 | //
9 | // Contributors:
10 | // David Dauer
11 | // Jesper
12 | // Jamie Kirkpatrick
13 |
14 | #import
15 | #import "SRRecorderCell.h"
16 |
17 | @interface SRRecorderControl : NSControl
18 | {
19 | IBOutlet id delegate;
20 | }
21 |
22 | #pragma mark *** Aesthetics ***
23 | - (BOOL)animates;
24 | - (void)setAnimates:(BOOL)an;
25 | - (SRRecorderStyle)style;
26 | - (void)setStyle:(SRRecorderStyle)nStyle;
27 |
28 | #pragma mark *** Delegate ***
29 | - (id)delegate;
30 | - (void)setDelegate:(id)aDelegate;
31 |
32 | #pragma mark *** Key Combination Control ***
33 |
34 | - (NSUInteger)allowedFlags;
35 | - (void)setAllowedFlags:(NSUInteger)flags;
36 |
37 | - (BOOL)allowsKeyOnly;
38 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord;
39 | - (BOOL)escapeKeysRecord;
40 |
41 | - (BOOL)canCaptureGlobalHotKeys;
42 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState;
43 |
44 | - (NSUInteger)requiredFlags;
45 | - (void)setRequiredFlags:(NSUInteger)flags;
46 |
47 | - (KeyCombo)keyCombo;
48 | - (void)setKeyCombo:(KeyCombo)aKeyCombo;
49 |
50 | - (NSString *)keyChars;
51 | - (NSString *)keyCharsIgnoringModifiers;
52 |
53 | #pragma mark *** Autosave Control ***
54 |
55 | - (NSString *)autosaveName;
56 | - (void)setAutosaveName:(NSString *)aName;
57 |
58 | #pragma mark -
59 |
60 | // Returns the displayed key combination if set
61 | - (NSString *)keyComboString;
62 |
63 | #pragma mark *** Conversion Methods ***
64 |
65 | - (NSUInteger)cocoaToCarbonFlags:(NSUInteger)cocoaFlags;
66 | - (NSUInteger)carbonToCocoaFlags:(NSUInteger)carbonFlags;
67 |
68 | #pragma mark *** Binding Methods ***
69 |
70 | - (NSDictionary *)objectValue;
71 | - (void)setObjectValue:(NSDictionary *)shortcut;
72 |
73 | @end
74 |
75 | // Delegate Methods
76 | @interface NSObject (SRRecorderDelegate)
77 | - (BOOL)shortcutRecorder:(SRRecorderControl *)aRecorder isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason;
78 | - (void)shortcutRecorder:(SRRecorderControl *)aRecorder keyComboDidChange:(KeyCombo)newKeyCombo;
79 | @end
80 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SRValidator.h:
--------------------------------------------------------------------------------
1 | //
2 | // SRValidator.h
3 | // ShortcutRecorder
4 | //
5 | // Copyright 2006-2007 Contributors. All rights reserved.
6 | //
7 | // License: BSD
8 | //
9 | // Contributors:
10 | // David Dauer
11 | // Jesper
12 | // Jamie Kirkpatrick
13 |
14 | #import
15 |
16 | @interface SRValidator : NSObject {
17 | id delegate;
18 | }
19 |
20 | - (id) initWithDelegate:(id)theDelegate;
21 |
22 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags error:(NSError **)error;
23 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags takenInMenu:(NSMenu *)menu error:(NSError **)error;
24 |
25 | - (id) delegate;
26 | - (void) setDelegate: (id) theDelegate;
27 |
28 | @end
29 |
30 | #pragma mark -
31 |
32 | @interface NSObject( SRValidation )
33 | - (BOOL) shortcutValidator:(SRValidator *)validator isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason;
34 | @end
35 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/SR_LeopardView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SR_LeopardView.h
3 | // SR Leopard
4 | //
5 | // Created by Jesper on 2007-10-19.
6 | // Copyright 2007 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SR_LeopardView : NSView {
12 |
13 | }
14 |
15 | @end
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Headers/ShortcutRecorder.h:
--------------------------------------------------------------------------------
1 | //
2 | // ShortcutRecorder.h
3 | // ShortcutRecorder
4 | // - 10.5 version only; master framework header
5 | //
6 | // Copyright 2007 Contributors. All rights reserved.
7 | //
8 | // License: BSD
9 | //
10 | // Contributors to this file:
11 | // Jesper
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 | #import
18 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ShortcutRecorder
9 | CFBundleIdentifier
10 | net.wafflesoftware.ShortcutRecorder.framework.Leopard
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | FMWK
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ShortcutRecorder
9 | CFBundleIdentifier
10 | net.wafflesoftware.ShortcutRecorder.IB.Leopard
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ShortcutRecorder
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | NSPrincipalClass
24 | SR_Leopard
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/MacOS/ShortcutRecorder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/MacOS/ShortcutRecorder
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/InfoPlist.strings
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/SR_LeopardInspector.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/SR_LeopardInspector.nib
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/SR_LeopardLibrary.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/English.lproj/SR_LeopardLibrary.nib
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/Resources/ShortcutRecorder.ibplugin/Contents/Resources/SRRecorderControl.classdescription:
--------------------------------------------------------------------------------
1 | {
2 | Actions = {
3 | };
4 | Outlets = {
5 | delegate = id;
6 | };
7 | ClassName = SRRecorderControl;
8 | SuperClass = NSControl;
9 | }
10 |
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/A/ShortcutRecorder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/ShortcutRecorder.framework/Versions/A/ShortcutRecorder
--------------------------------------------------------------------------------
/ShiftIt/ShortcutRecorder.framework/Versions/Current:
--------------------------------------------------------------------------------
1 | A
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Headers:
--------------------------------------------------------------------------------
1 | Versions/Current/Headers
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Resources:
--------------------------------------------------------------------------------
1 | Versions/Current/Resources
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Sparkle:
--------------------------------------------------------------------------------
1 | Versions/Current/Sparkle
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Headers/SUAppcast.h:
--------------------------------------------------------------------------------
1 | //
2 | // SUAppcast.h
3 | // Sparkle
4 | //
5 | // Created by Andy Matuschak on 3/12/06.
6 | // Copyright 2006 Andy Matuschak. All rights reserved.
7 | //
8 |
9 | #ifndef SUAPPCAST_H
10 | #define SUAPPCAST_H
11 |
12 | @class SUAppcastItem;
13 | @interface SUAppcast : NSObject {
14 | NSArray *items;
15 | NSString *userAgentString;
16 | id delegate;
17 | NSMutableData *incrementalData;
18 | }
19 |
20 | - (void)fetchAppcastFromURL:(NSURL *)url;
21 | - (void)setDelegate:delegate;
22 | - (void)setUserAgentString:(NSString *)userAgentString;
23 |
24 | - (NSArray *)items;
25 |
26 | @end
27 |
28 | @interface NSObject (SUAppcastDelegate)
29 | - (void)appcastDidFinishLoading:(SUAppcast *)appcast;
30 | - (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
31 | @end
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // SUAppcastItem.h
3 | // Sparkle
4 | //
5 | // Created by Andy Matuschak on 3/12/06.
6 | // Copyright 2006 Andy Matuschak. All rights reserved.
7 | //
8 |
9 | #ifndef SUAPPCASTITEM_H
10 | #define SUAPPCASTITEM_H
11 |
12 | @interface SUAppcastItem : NSObject {
13 | NSString *title;
14 | NSDate *date;
15 | NSString *itemDescription;
16 |
17 | NSURL *releaseNotesURL;
18 |
19 | NSString *DSASignature;
20 | NSString *minimumSystemVersion;
21 |
22 | NSURL *fileURL;
23 | NSString *versionString;
24 | NSString *displayVersionString;
25 |
26 | NSDictionary *propertiesDictionary;
27 | }
28 |
29 | // Initializes with data from a dictionary provided by the RSS class.
30 | - initWithDictionary:(NSDictionary *)dict;
31 |
32 | - (NSString *)title;
33 | - (NSString *)versionString;
34 | - (NSString *)displayVersionString;
35 | - (NSDate *)date;
36 | - (NSString *)itemDescription;
37 | - (NSURL *)releaseNotesURL;
38 | - (NSURL *)fileURL;
39 | - (NSString *)DSASignature;
40 | - (NSString *)minimumSystemVersion;
41 |
42 | // Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
43 | - (NSDictionary *)propertiesDictionary;
44 |
45 | @end
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Headers/SUUpdater.h:
--------------------------------------------------------------------------------
1 | //
2 | // SUUpdater.h
3 | // Sparkle
4 | //
5 | // Created by Andy Matuschak on 1/4/06.
6 | // Copyright 2006 Andy Matuschak. All rights reserved.
7 | //
8 |
9 | #ifndef SUUPDATER_H
10 | #define SUUPDATER_H
11 |
12 | #import
13 |
14 | @class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
15 | @interface SUUpdater : NSObject {
16 | NSTimer *checkTimer;
17 | SUUpdateDriver *driver;
18 |
19 | SUHost *host;
20 | IBOutlet id delegate;
21 | }
22 |
23 | + (SUUpdater *)sharedUpdater;
24 | + (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
25 | - (NSBundle *)hostBundle;
26 |
27 | - (void)setDelegate:(id)delegate;
28 | - delegate;
29 |
30 | - (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
31 | - (BOOL)automaticallyChecksForUpdates;
32 |
33 | - (void)setUpdateCheckInterval:(NSTimeInterval)interval;
34 | - (NSTimeInterval)updateCheckInterval;
35 |
36 | - (void)setFeedURL:(NSURL *)feedURL;
37 | - (NSURL *)feedURL;
38 |
39 | - (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
40 | - (BOOL)sendsSystemProfile;
41 |
42 | - (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
43 | - (BOOL)automaticallyDownloadsUpdates;
44 |
45 | // This IBAction is meant for a main menu item. Hook up any menu item to this action,
46 | // and Sparkle will check for updates and report back its findings verbosely.
47 | - (IBAction)checkForUpdates:sender;
48 |
49 | // This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
50 | // in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
51 | // update is found, it will be downloaded and prepped for installation.
52 | - (void)checkForUpdatesInBackground;
53 |
54 | // Date of last update check. Returns null if no check has been performed.
55 | - (NSDate*)lastUpdateCheckDate;
56 |
57 | // This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
58 | // (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
59 | - (void)checkForUpdateInformation;
60 |
61 | // Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
62 | - (void)resetUpdateCycle;
63 |
64 | - (BOOL)updateInProgress;
65 | @end
66 |
67 | @interface NSObject (SUUpdaterDelegateInformalProtocol)
68 | // This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
69 | - (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
70 |
71 | // Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
72 | - (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
73 |
74 | // Implement this if you want to do some special handling with the appcast once it finishes loading.
75 | - (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
76 |
77 | // If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
78 | // a valid update, if any, in the given appcast.
79 | - (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
80 |
81 | // Sent when a valid update is found by the update driver.
82 | - (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
83 |
84 | // Sent when a valid update is not found.
85 | - (void)updaterDidNotFindUpdate:(SUUpdater *)update;
86 |
87 | // Sent immediately before installing the specified update.
88 | - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
89 |
90 | // Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
91 | - (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
92 |
93 | // Called immediately before relaunching.
94 | - (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
95 |
96 | // This method allows you to provide a custom version comparator.
97 | // If you don't implement this method or return nil, the standard version comparator will be used.
98 | - (id )versionComparatorForUpdater:(SUUpdater *)updater;
99 |
100 | // Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
101 | - (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
102 |
103 | @end
104 |
105 | // Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
106 | #ifdef DEBUG
107 | #define SU_MIN_CHECK_INTERVAL 60
108 | #else
109 | #define SU_MIN_CHECK_INTERVAL 60*60
110 | #endif
111 |
112 | #ifdef DEBUG
113 | #define SU_DEFAULT_CHECK_INTERVAL 60
114 | #else
115 | #define SU_DEFAULT_CHECK_INTERVAL 60*60*24
116 | #endif
117 |
118 | #endif
119 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // SUVersionComparisonProtocol.h
3 | // Sparkle
4 | //
5 | // Created by Andy Matuschak on 12/21/07.
6 | // Copyright 2007 Andy Matuschak. All rights reserved.
7 | //
8 |
9 | #ifndef SUVERSIONCOMPARISONPROTOCOL_H
10 | #define SUVERSIONCOMPARISONPROTOCOL_H
11 |
12 | /*!
13 | @protocol
14 | @abstract Implement this protocol to provide version comparison facilities for Sparkle.
15 | */
16 | @protocol SUVersionComparison
17 |
18 | /*!
19 | @method
20 | @abstract An abstract method to compare two version strings.
21 | @discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
22 | */
23 | - (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
24 |
25 | @end
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Headers/Sparkle.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sparkle.h
3 | // Sparkle
4 | //
5 | // Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
6 | // Copyright 2006 Andy Matuschak. All rights reserved.
7 | //
8 |
9 | #ifndef SPARKLE_H
10 | #define SPARKLE_H
11 |
12 | // This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
13 | // there are name-space collisions) so we can list all of them to start with:
14 |
15 | #import
16 |
17 | #import
18 | #import
19 | #import
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | Sparkle
9 | CFBundleIdentifier
10 | org.andymatuschak.Sparkle
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | Sparkle
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.5 Beta 6
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 313
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/License.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006 Andy Matuschak
2 |
3 | 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:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | 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.
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ADP2,1
6 | Developer Transition Kit
7 | MacBook1,1
8 | MacBook (Core Duo)
9 | MacBook2,1
10 | MacBook (Core 2 Duo)
11 | MacBook4,1
12 | MacBook (Core 2 Duo Feb 2008)
13 | MacBookAir1,1
14 | MacBook Air (January 2008)
15 | MacBookPro1,1
16 | MacBook Pro Core Duo (15-inch)
17 | MacBookPro1,2
18 | MacBook Pro Core Duo (17-inch)
19 | MacBookPro2,1
20 | MacBook Pro Core 2 Duo (17-inch)
21 | MacBookPro2,2
22 | MacBook Pro Core 2 Duo (15-inch)
23 | MacBookPro3,1
24 | MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)
25 | MacBookPro3,2
26 | MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)
27 | MacBookPro4,1
28 | MacBook Pro (Core 2 Duo Feb 2008)
29 | MacPro1,1
30 | Mac Pro (four-core)
31 | MacPro2,1
32 | Mac Pro (eight-core)
33 | MacPro3,1
34 | Mac Pro (January 2008 4- or 8- core "Harpertown")
35 | Macmini1,1
36 | Mac Mini (Core Solo/Duo)
37 | PowerBook1,1
38 | PowerBook G3
39 | PowerBook2,1
40 | iBook G3
41 | PowerBook2,2
42 | iBook G3 (FireWire)
43 | PowerBook2,3
44 | iBook G3
45 | PowerBook2,4
46 | iBook G3
47 | PowerBook3,1
48 | PowerBook G3 (FireWire)
49 | PowerBook3,2
50 | PowerBook G4
51 | PowerBook3,3
52 | PowerBook G4 (Gigabit Ethernet)
53 | PowerBook3,4
54 | PowerBook G4 (DVI)
55 | PowerBook3,5
56 | PowerBook G4 (1GHz / 867MHz)
57 | PowerBook4,1
58 | iBook G3 (Dual USB, Late 2001)
59 | PowerBook4,2
60 | iBook G3 (16MB VRAM)
61 | PowerBook4,3
62 | iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)
63 | PowerBook5,1
64 | PowerBook G4 (17 inch)
65 | PowerBook5,2
66 | PowerBook G4 (15 inch FW 800)
67 | PowerBook5,3
68 | PowerBook G4 (17-inch 1.33GHz)
69 | PowerBook5,4
70 | PowerBook G4 (15 inch 1.5/1.33GHz)
71 | PowerBook5,5
72 | PowerBook G4 (17-inch 1.5GHz)
73 | PowerBook5,6
74 | PowerBook G4 (15 inch 1.67GHz/1.5GHz)
75 | PowerBook5,7
76 | PowerBook G4 (17-inch 1.67GHz)
77 | PowerBook5,8
78 | PowerBook G4 (Double layer SD, 15 inch)
79 | PowerBook5,9
80 | PowerBook G4 (Double layer SD, 17 inch)
81 | PowerBook6,1
82 | PowerBook G4 (12 inch)
83 | PowerBook6,2
84 | PowerBook G4 (12 inch, DVI)
85 | PowerBook6,3
86 | iBook G4
87 | PowerBook6,4
88 | PowerBook G4 (12 inch 1.33GHz)
89 | PowerBook6,5
90 | iBook G4 (Early-Late 2004)
91 | PowerBook6,7
92 | iBook G4 (Mid 2005)
93 | PowerBook6,8
94 | PowerBook G4 (12 inch 1.5GHz)
95 | PowerMac1,1
96 | Power Macintosh G3 (Blue & White)
97 | PowerMac1,2
98 | Power Macintosh G4 (PCI Graphics)
99 | PowerMac10,1
100 | Mac Mini G4
101 | PowerMac10,2
102 | Mac Mini (Late 2005)
103 | PowerMac11,2
104 | Power Macintosh G5 (Late 2005)
105 | PowerMac12,1
106 | iMac G5 (iSight)
107 | PowerMac2,1
108 | iMac G3 (Slot-loading CD-ROM)
109 | PowerMac2,2
110 | iMac G3 (Summer 2000)
111 | PowerMac3,1
112 | Power Macintosh G4 (AGP Graphics)
113 | PowerMac3,2
114 | Power Macintosh G4 (AGP Graphics)
115 | PowerMac3,3
116 | Power Macintosh G4 (Gigabit Ethernet)
117 | PowerMac3,4
118 | Power Macintosh G4 (Digital Audio)
119 | PowerMac3,5
120 | Power Macintosh G4 (Quick Silver)
121 | PowerMac3,6
122 | Power Macintosh G4 (Mirrored Drive Door)
123 | PowerMac4,1
124 | iMac G3 (Early/Summer 2001)
125 | PowerMac4,2
126 | iMac G4 (Flat Panel)
127 | PowerMac4,4
128 | eMac
129 | PowerMac4,5
130 | iMac G4 (17-inch Flat Panel)
131 | PowerMac5,1
132 | Power Macintosh G4 Cube
133 | PowerMac6,1
134 | iMac G4 (USB 2.0)
135 | PowerMac6,3
136 | iMac G4 (20-inch Flat Panel)
137 | PowerMac6,4
138 | eMac (USB 2.0, 2005)
139 | PowerMac7,2
140 | Power Macintosh G5
141 | PowerMac7,3
142 | Power Macintosh G5
143 | PowerMac8,1
144 | iMac G5
145 | PowerMac8,2
146 | iMac G5 (Ambient Light Sensor)
147 | PowerMac9,1
148 | Power Macintosh G5 (Late 2005)
149 | RackMac1,1
150 | Xserve G4
151 | RackMac1,2
152 | Xserve G4 (slot-loading, cluster node)
153 | RackMac3,1
154 | Xserve G5
155 | Xserve1,1
156 | Xserve (Intel Xeon)
157 | Xserve2,1
158 | Xserve (January 2008 quad-core)
159 | iMac1,1
160 | iMac G3 (Rev A-D)
161 | iMac4,1
162 | iMac (Core Duo)
163 | iMac4,2
164 | iMac for Education (17-inch, Core Duo)
165 | iMac5,1
166 | iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)
167 | iMac5,2
168 | iMac (Core 2 Duo, 17 inch, Combo Drive)
169 | iMac6,1
170 | iMac (Core 2 Duo, 24 inch, SuperDrive)
171 | iMac8,1
172 | iMac (April 2008)
173 |
174 |
175 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/SUStatus.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | CLASS
25 | FirstResponder
26 | LANGUAGE
27 | ObjC
28 | SUPERCLASS
29 | NSObject
30 |
31 |
32 | CLASS
33 | NSObject
34 | LANGUAGE
35 | ObjC
36 |
37 |
38 | CLASS
39 | SUStatusController
40 | LANGUAGE
41 | ObjC
42 | OUTLETS
43 |
44 | actionButton
45 | NSButton
46 | progressBar
47 | NSProgressIndicator
48 |
49 | SUPERCLASS
50 | SUWindowController
51 |
52 |
53 | IBVersion
54 | 1
55 |
56 |
57 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/SUStatus.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 10A96
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/SUStatus.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 658
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9C7010
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 18
14 |
15 | IBSystem Version
16 | 10A96
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 | 41
15 |
16 | IBSystem Version
17 | 10A96
18 | targetFramework
19 | IBCocoaFramework
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | IBSystem Version
12 | 9D34
13 | targetFramework
14 | IBCocoaFramework
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | IBSystem Version
12 | 9E17
13 | targetFramework
14 | IBCocoaFramework
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | IBSystem Version
12 | 9E17
13 | targetFramework
14 | IBCocoaFramework
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr.lproj/fr.lproj:
--------------------------------------------------------------------------------
1 | /Users/andym/Development/Build Products/Release/Sparkle.framework/Resources/fr.lproj
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/fr_CA.lproj:
--------------------------------------------------------------------------------
1 | /Users/andym/Development/Build Products/Release/Sparkle.framework/Resources/fr.lproj
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 667
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 5
14 |
15 | IBSystem Version
16 | 9D34
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | 6
12 |
13 | IBSystem Version
14 | 9D34
15 | targetFramework
16 | IBCocoaFramework
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | IBSystem Version
12 | 9E17
13 | targetFramework
14 | IBCocoaFramework
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 629
7 | IBOldestOS
8 | 5
9 | IBOpenObjects
10 |
11 | IBSystem Version
12 | 9E17
13 | targetFramework
14 | IBCocoaFramework
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/relaunch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/relaunch
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9E17
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | CLASS
17 | NSApplication
18 | LANGUAGE
19 | ObjC
20 | SUPERCLASS
21 | NSResponder
22 |
23 |
24 | ACTIONS
25 |
26 | installUpdate
27 | id
28 | remindMeLater
29 | id
30 | skipThisVersion
31 | id
32 |
33 | CLASS
34 | SUUpdateAlert
35 | LANGUAGE
36 | ObjC
37 | OUTLETS
38 |
39 | delegate
40 | id
41 | description
42 | NSTextField
43 | releaseNotesView
44 | WebView
45 |
46 | SUPERCLASS
47 | SUWindowController
48 |
49 |
50 | CLASS
51 | FirstResponder
52 | LANGUAGE
53 | ObjC
54 | SUPERCLASS
55 | NSObject
56 |
57 |
58 | CLASS
59 | NSObject
60 | LANGUAGE
61 | ObjC
62 |
63 |
64 | IBVersion
65 | 1
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 9E17
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | NSObject
10 | LANGUAGE
11 | ObjC
12 |
13 |
14 | CLASS
15 | SUWindowController
16 | LANGUAGE
17 | ObjC
18 | SUPERCLASS
19 | NSWindowController
20 |
21 |
22 | ACTIONS
23 |
24 | finishPrompt
25 | id
26 | toggleMoreInfo
27 | id
28 |
29 | CLASS
30 | SUUpdatePermissionPrompt
31 | LANGUAGE
32 | ObjC
33 | OUTLETS
34 |
35 | delegate
36 | id
37 | descriptionTextField
38 | NSTextField
39 | moreInfoButton
40 | NSButton
41 | moreInfoView
42 | NSView
43 |
44 | SUPERCLASS
45 | SUWindowController
46 |
47 |
48 | CLASS
49 | FirstResponder
50 | LANGUAGE
51 | ObjC
52 | SUPERCLASS
53 | NSObject
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | IBSystem Version
14 | 9E17
15 | targetFramework
16 | IBCocoaFramework
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | doNotInstall
19 | id
20 | installLater
21 | id
22 | installNow
23 | id
24 |
25 | CLASS
26 | SUAutomaticUpdateAlert
27 | LANGUAGE
28 | ObjC
29 | SUPERCLASS
30 | SUWindowController
31 |
32 |
33 | CLASS
34 | FirstResponder
35 | LANGUAGE
36 | ObjC
37 | SUPERCLASS
38 | NSObject
39 |
40 |
41 | CLASS
42 | NSObject
43 | LANGUAGE
44 | ObjC
45 |
46 |
47 | IBVersion
48 | 1
49 |
50 |
51 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 10A96
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/classes.nib:
--------------------------------------------------------------------------------
1 | {
2 | IBClasses = (
3 | {
4 | CLASS = FirstResponder;
5 | LANGUAGE = ObjC;
6 | SUPERCLASS = NSObject;
7 | },
8 | {
9 | CLASS = NSApplication;
10 | LANGUAGE = ObjC;
11 | SUPERCLASS = NSResponder;
12 | },
13 | {
14 | CLASS = NSObject;
15 | LANGUAGE = ObjC;
16 | },
17 | {
18 | ACTIONS = {
19 | installUpdate = id;
20 | remindMeLater = id;
21 | skipThisVersion = id;
22 | };
23 | CLASS = SUUpdateAlert;
24 | LANGUAGE = ObjC;
25 | OUTLETS = {
26 | delegate = id;
27 | description = NSTextField;
28 | releaseNotesView = WebView;
29 | };
30 | SUPERCLASS = SUWindowController;
31 | },
32 | {
33 | CLASS = SUWindowController;
34 | LANGUAGE = ObjC;
35 | SUPERCLASS = NSWindowController;
36 | }
37 | );
38 | IBVersion = 1;
39 | }
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBDocumentLocation
6 | 69 14 356 240 0 0 1280 778
7 | IBFramework Version
8 | 489.0
9 | IBLastKnownRelativeProjectPath
10 | ../Sparkle.xcodeproj
11 | IBOldestOS
12 | 5
13 | IBSystem Version
14 | 9D34
15 | targetFramework
16 | IBCocoaFramework
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/classes.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBClasses
6 |
7 |
8 | CLASS
9 | SUWindowController
10 | LANGUAGE
11 | ObjC
12 | SUPERCLASS
13 | NSWindowController
14 |
15 |
16 | ACTIONS
17 |
18 | finishPrompt
19 | id
20 | toggleMoreInfo
21 | id
22 |
23 | CLASS
24 | SUUpdatePermissionPrompt
25 | LANGUAGE
26 | ObjC
27 | OUTLETS
28 |
29 | delegate
30 | id
31 | descriptionTextField
32 | NSTextField
33 | moreInfoButton
34 | NSButton
35 | moreInfoView
36 | NSView
37 |
38 | SUPERCLASS
39 | SUWindowController
40 |
41 |
42 | CLASS
43 | FirstResponder
44 | LANGUAGE
45 | ObjC
46 | SUPERCLASS
47 | NSObject
48 |
49 |
50 | CLASS
51 | NSObject
52 | LANGUAGE
53 | ObjC
54 |
55 |
56 | IBVersion
57 | 1
58 |
59 |
60 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBFramework Version
6 | 670
7 | IBLastKnownRelativeProjectPath
8 | ../Sparkle.xcodeproj
9 | IBOldestOS
10 | 5
11 | IBOpenObjects
12 |
13 | 6
14 |
15 | IBSystem Version
16 | 10A96
17 | targetFramework
18 | IBCocoaFramework
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/A/Sparkle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/ShiftIt/Sparkle.framework/Versions/A/Sparkle
--------------------------------------------------------------------------------
/ShiftIt/Sparkle.framework/Versions/Current:
--------------------------------------------------------------------------------
1 | A
--------------------------------------------------------------------------------
/ShiftIt/WindowSizer.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 |
21 | #import
22 |
23 | /**
24 | * This unit provides support for sizing application using Apple accessibiity API
25 | *
26 | */
27 |
28 | @class ShiftItAction;
29 |
30 | @interface WindowSizer : NSObject {
31 | @private
32 | AXUIElementRef axSystemWideElement_;
33 |
34 | int menuBarHeight_;
35 | NSString *lastActionExecuted;
36 | }
37 |
38 | + (WindowSizer *) sharedWindowSize;
39 |
40 | - (void) shiftFocusedWindowUsing:(ShiftItAction *)action error:(NSError **)error;
41 | //- (void) reduceWindowFivePercent:(void *)window winRect:(NSRect)windowRect error:(NSError **)error;
42 | - (NSScreen *)chooseScreenForWindow_:(NSRect)windowRect;
43 | - (NSScreen *)nextScreenForAction:(ShiftItAction*)action window:(NSRect)windowRect;
44 |
45 | @property (nonatomic, retain) NSString *lastActionExecuted;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/ShiftIt/WindowSizer.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #import
21 |
22 | #import "WindowSizer.h"
23 | #import "ShiftIt.h"
24 | #import "ShiftItAction.h"
25 | #import "FMTDefines.h"
26 | #import "AXUIUtils.h"
27 | #import "X11Utils.h"
28 |
29 | #define RECT_STR(rect) FMTStr(@"[%f %f] [%f %f]", (rect).origin.x, (rect).origin.y, (rect).size.width, (rect).size.height)
30 |
31 | // reference to the carbon GetMBarHeight() function
32 | extern short GetMBarHeight(void);
33 |
34 | @interface NSScreen (Private)
35 |
36 | + (NSScreen *)primaryScreen;
37 | - (BOOL)isPrimary;
38 |
39 | @end
40 |
41 | @implementation NSScreen (Private)
42 |
43 | + (NSScreen *)primaryScreen {
44 | return [[NSScreen screens] objectAtIndex:0];
45 | }
46 |
47 | - (BOOL)isPrimary {
48 | return self == [NSScreen primaryScreen];
49 | }
50 |
51 | @end
52 |
53 | #define COCOA_TO_SCREEN_COORDINATES(rect) (rect).origin.y = [[NSScreen primaryScreen] frame].size.height - (rect).size.height - (rect).origin.y
54 |
55 | @interface WindowSizer (Private)
56 |
57 | - (NSScreen *)chooseScreenForWindow_:(NSRect)windowRect;
58 | - (NSScreen *)nextScreenForAction:(ShiftItAction*)action window:(NSRect)windowRect;
59 |
60 | @end
61 |
62 |
63 | @implementation WindowSizer
64 |
65 | SINGLETON_BOILERPLATE(WindowSizer, sharedWindowSize);
66 |
67 | @synthesize lastActionExecuted;
68 |
69 | // TODO: remove
70 | - (id)init {
71 | if (![super init]) {
72 | return nil;
73 | }
74 |
75 | return self;
76 | }
77 |
78 |
79 | /**
80 | * The method is the heart of the ShiftIt app. It takes an
81 | * ShiftItAction and applies it to the current window.
82 | *
83 | * In order to understand what exactly what is going on it is important
84 | * to understand how the graphic coordinates works in OSX. There are two
85 | * coordinates systems: screen (quartz core graphics) and cocoa. The
86 | * former one has and origin on the top left corner of the primary
87 | * screen (the one with a menu bar) and the coordinates grows in east
88 | * and south direction. The latter has origin in the bottom left corner
89 | * of the primary window and grows in east and north direction. The
90 | * overview of the cocoa coordinates is in [1]. X11 on the other
91 | * hand have its coordinate system originating on the
92 | * top left corner of the most top left window [2].
93 | *
94 | * In this method all coordinates are translated to be the screen
95 | * coordinates.
96 | *
97 | * [1] http://bit.ly/aSmfae (apple official docs)
98 | *
99 | * [2] http://www.linuxjournal.com/article/4879
100 | */
101 | - (void) shiftFocusedWindowUsing:(ShiftItAction *)action error:(NSError **)error {
102 | FMTAssertNotNil(action);
103 |
104 | #ifdef X11
105 | bool activeWindowX11 = NO;
106 | NSRect X11Ref;
107 | #endif // X11
108 |
109 | // window reference - windowing system agnostic
110 | void *window = NULL;
111 |
112 | // coordinates vars
113 | int x = 0, y = 0;
114 | unsigned int width = 0, height = 0;
115 |
116 | // error handling vars
117 | int errorCode = 0;
118 |
119 | // active window geometry
120 |
121 | // first try to get the window using accessibility API
122 | errorCode = AXUIGetActiveWindow(&window);
123 |
124 | if (errorCode != 0) {
125 | #ifdef X11
126 | window = NULL;
127 | // try X11
128 | int errorCodeX11 = X11GetActiveWindow(&window);
129 | if (errorCodeX11 != 0) {
130 | NSString *message = FMTStr(@"%@, %@",FMTStrc(AXUIGetErrorMessage(errorCode)),FMTStrc(X11GetErrorMessage(errorCodeX11)));
131 |
132 | *error = SICreateError(message, kUnableToGetActiveWindowErrorCode);
133 | return;
134 | }
135 |
136 | int errorCode = X11GetWindowGeometry(window, &x, &y, &width, &height);
137 | if (errorCode != 0) {
138 | *error = SICreateError(FMTStrc(X11GetErrorMessage(errorCode)), kUnableToGetWindowGeometryErrorCode);
139 | return;
140 | }
141 | FMTDevLog(@"window rect (x11): [%d %d] [%d %d]", x, y, width, height);
142 |
143 | // following will make the X11 reference coordinate system
144 | // X11 coordinates starts at the very top left corner of the most top left window
145 | // basically it is a union of all screens with the beginning at the top left
146 | X11Ref = [[NSScreen primaryScreen] frame];
147 | for (NSScreen *screen in [NSScreen screens]) {
148 | X11Ref = NSUnionRect(X11Ref, [screen frame]);
149 | }
150 | // translate
151 | COCOA_TO_SCREEN_COORDINATES(X11Ref);
152 | FMTDevLog(@"X11 reference rect: %@", RECT_STR(X11Ref));
153 |
154 | // convert from X11 coordinates to Quartz CG coodinates
155 | x += X11Ref.origin.x;
156 | y += X11Ref.origin.y;
157 |
158 | activeWindowX11 = YES;
159 | #else
160 | *error = SICreateError(FMTStrc(AXUIGetErrorMessage(errorCode)), kUnableToGetActiveWindowErrorCode);
161 | return;
162 | #endif // X11
163 | } else {
164 | int errorCode = AXUIGetWindowGeometry(window, &x, &y, &width, &height);
165 |
166 | if (errorCode != 0) {
167 | *error = SICreateError(FMTStrc(AXUIGetErrorMessage(errorCode)), kUnableToGetWindowGeometryErrorCode);
168 | return;
169 | }
170 | }
171 |
172 | // the window rect in screen coordinates
173 | NSRect windowRect = {
174 | {x, y},
175 | {width, height}
176 | };
177 | FMTDevLog(@"window rect: %@", RECT_STR(windowRect));
178 |
179 | #ifndef NDEBUG
180 | // dump screen info
181 | for (NSScreen *screen in [NSScreen screens]) {
182 | NSRect frame = [screen frame];
183 | NSRect visibleFrame = [screen visibleFrame];
184 |
185 | COCOA_TO_SCREEN_COORDINATES(frame);
186 | COCOA_TO_SCREEN_COORDINATES(visibleFrame);
187 | FMTDevLog(@"Screen info: %@ frame: %@ visible frame: %@",screen, RECT_STR(frame), RECT_STR(visibleFrame));
188 | }
189 | #endif
190 |
191 | // get the screen which is the best fit for the window
192 | // check to see if the user has repeated a left or right shift
193 | // if so, move window to the screen next current one
194 | NSScreen *screen;
195 | screen = [self chooseScreenForWindow_:windowRect];
196 |
197 | // screen coordinates of the best fit window
198 | NSRect screenRect = [screen frame];
199 | FMTDevLog(@"screen rect (cocoa): %@", RECT_STR(screenRect));
200 | COCOA_TO_SCREEN_COORDINATES(screenRect);
201 | FMTDevLog(@"screen rect: %@", RECT_STR(screenRect));
202 |
203 | // visible screen coordinates of the best fit window
204 | // the visible screen denotes some inner rect of the screen rect which is visible - not occupied by menu bar or dock
205 | NSRect visibleScreenRect = [screen visibleFrame];
206 | FMTDevLog(@"visible screen rect (cocoa): %@", RECT_STR(visibleScreenRect));
207 | COCOA_TO_SCREEN_COORDINATES(visibleScreenRect);
208 | FMTDevLog(@"visible screen rect: %@", RECT_STR(visibleScreenRect));
209 |
210 | // execute shift it action to reposition the application window
211 | ShiftItFunctionRef actionFunction = [action action];
212 | NSRect shiftedRect = actionFunction(visibleScreenRect.size, windowRect);
213 | FMTDevLog(@"shifted window rect: %@", RECT_STR(shiftedRect));
214 |
215 |
216 | // readjust adjust the visibility
217 | // the shiftedRect is the new application window geometry relative to the screen originating at [0,0]
218 | // we need to shift it accordingly that is to the origin of the best fit screen (screenRect) and
219 | // take into account the visible area of such a screen - menu, dock, etc. which is in the visibleScreenRect
220 | shiftedRect.origin.x += screenRect.origin.x + visibleScreenRect.origin.x - screenRect.origin.x;
221 | shiftedRect.origin.y += screenRect.origin.y + visibleScreenRect.origin.y - screenRect.origin.y;
222 |
223 | // we need to translate from cocoa coordinates
224 | FMTDevLog(@"shifted window within screen: %@", RECT_STR(shiftedRect));
225 |
226 | #ifdef X11
227 | if (activeWindowX11) {
228 | // translate into X11 coordinates
229 | shiftedRect.origin.x -= X11Ref.origin.x;
230 | shiftedRect.origin.y -= X11Ref.origin.y;
231 |
232 | // it seems that the X11 server 2.3.5 on snow leopard 10.6.4 on mac book pro
233 | // changes the origin of the coordinates depending on the relative
234 | // positions of the screens next to each other if there is a screen
235 | // that is below the primary screen, than the X11 coordnates starts at
236 | // [0,m] of the screen coordinates (quartz) where m is the height of the
237 | // menu bar (GetMBarHeight()) otherwise it starts at [0,0].
238 | BOOL screenBelowPrimary = NO;
239 | for (NSScreen *s in [NSScreen screens]) {
240 | NSRect r = [s frame];
241 | COCOA_TO_SCREEN_COORDINATES(r);
242 | if (r.origin.y > 0) {
243 | screenBelowPrimary = YES;
244 | break;
245 | }
246 | }
247 |
248 | if (screenBelowPrimary || [screen isPrimary]) {
249 | shiftedRect.origin.y -= GetMBarHeight();
250 | }
251 | }
252 | #endif // X11
253 |
254 | FMTDevLog(@"translated shifted rect: %@", RECT_STR(shiftedRect));
255 |
256 | x = (int) shiftedRect.origin.x;
257 | y = (int) shiftedRect.origin.y;
258 | width = (unsigned int) shiftedRect.size.width;
259 | height = (unsigned int) shiftedRect.size.height;
260 |
261 | // adjust window geometry
262 | // there are apps that does not size continuously but rather discretely so
263 | // they have to be re-adjusted hence first set the size and then position
264 | #ifdef X11
265 | if (activeWindowX11) {
266 | FMTDevLog(@"adjusting position to %dx%d", x, y);
267 | errorCode = X11SetWindowPosition(window, x, y);
268 | if (errorCode != 0) {
269 | *error = SICreateError(FMTStrc(X11GetErrorMessage(errorCode)), kUnableToChangeWindowPositionErrorCode);
270 | return;
271 | }
272 |
273 | FMTDevLog(@"adjusting size to %dx%d", width, height);
274 | errorCode = X11SetWindowSize(window, width, height);
275 | if (errorCode != 0) {
276 | *error = SICreateError(FMTStrc(X11GetErrorMessage(errorCode)), kUnableToChangeWindowSizeErrorCode);
277 | return;
278 | }
279 | } else {
280 | #endif // X11
281 | FMTDevLog(@"adjusting position to %dx%d", x, y);
282 | errorCode = AXUISetWindowPosition(window, x, y);
283 | if (errorCode != 0) {
284 | *error = SICreateError(FMTStrc(AXUIGetErrorMessage(errorCode)), kUnableToChangeWindowPositionErrorCode);
285 | return;
286 | }
287 |
288 | FMTDevLog(@"adjusting size to %dx%d", width, height);
289 | errorCode = AXUISetWindowSize(window, width, height);
290 | if (errorCode != 0) {
291 | *error = SICreateError(FMTStrc(AXUIGetErrorMessage(errorCode)), kUnableToChangeWindowSizeErrorCode);
292 | return;
293 | }
294 | #ifdef X11
295 | }
296 | #endif // X11
297 |
298 | #ifdef X11
299 | if (activeWindowX11) {
300 | X11FreeWindowRef(window);
301 | } else {
302 | AXUIFreeWindowRef(window);
303 | }
304 | #else
305 | AXUIFreeWindowRef(window);
306 | #endif
307 |
308 | // this variable should only be stored if we're doing 1 of the 4 main shifts
309 | if ([action identifier] == @"left" || [action identifier] == @"right" || [action identifier] == @"top" || [action identifier] == @"bottom")
310 | lastActionExecuted = [action identifier];
311 | }
312 |
313 | /**
314 | * Chooses the best screen for the given window rect (screen coord).
315 | *
316 | * For each screen it computes the intersecting rectangle and its size.
317 | * The biggest is the screen where is the most of the window hence the best fit.
318 | */
319 | - (NSScreen *)chooseScreenForWindow_:(NSRect)windowRect {
320 | // TODO: rename intgersect
321 | // TODO: all should be ***Rect
322 |
323 | NSScreen *fitScreen = [NSScreen mainScreen];
324 | float maxSize = 0;
325 |
326 | for (NSScreen *screen in [NSScreen screens]) {
327 | NSRect screenRect = [screen frame];
328 | // need to convert coordinates
329 | COCOA_TO_SCREEN_COORDINATES(screenRect);
330 |
331 | NSRect intersectRect = NSIntersectionRect(screenRect, windowRect);
332 |
333 | if (intersectRect.size.width > 0 ) {
334 | float size = intersectRect.size.width * intersectRect.size.height;
335 | if (size > maxSize) {
336 | fitScreen = screen;
337 | maxSize = size;
338 | }
339 | }
340 | }
341 |
342 | return fitScreen;
343 | }
344 |
345 | - (NSScreen *)nextScreenForAction:(ShiftItAction*)action window:(NSRect)windowRect{
346 | // TODO: rename intgersect
347 | // TODO: all should be ***Rect
348 |
349 | //First find which screen the window is in
350 | float maxSize = 0;
351 | int currentScreenIndex = 0;
352 | for(int i = 0; i < [[NSScreen screens] count]; i++){
353 | NSRect screenRect = [[[NSScreen screens] objectAtIndex:i] frame];
354 | // need to convert coordinates
355 | COCOA_TO_SCREEN_COORDINATES(screenRect);
356 |
357 | NSRect intersectRect = NSIntersectionRect(screenRect, windowRect);
358 |
359 | if (intersectRect.size.width > 0 ) {
360 | float size = intersectRect.size.width * intersectRect.size.height;
361 | if (size > maxSize) {
362 | maxSize = size;
363 | currentScreenIndex = i;
364 | }
365 | }
366 | }
367 |
368 | NSScreen *currentScreen = [[NSScreen screens] objectAtIndex:currentScreenIndex];
369 |
370 | // Now find the adjascent screen
371 | NSString *whichDirection = [action identifier];
372 |
373 | float leftClosestOffset = FLT_MAX; //arbitrarily large value
374 | float rightClosestOffset = FLT_MAX; //arbitrarily large value
375 | float leftFarthestOffset = 0;
376 | float rightFarthestOffset = 0;
377 |
378 | int leftClosestIndex = -1;
379 | int rightClosestIndex = -1;
380 | int leftFarthestIndex = -1;
381 | int rightFarthestIndex = -1;
382 |
383 | //this gives the screen in which the active window resides
384 | for(int i = 0; i < [[NSScreen screens] count]; i++){
385 | NSScreen *otherScreen = [[NSScreen screens] objectAtIndex:i];
386 | if (otherScreen == currentScreen) // if it's the same screen
387 | continue;
388 |
389 | float screenOffset = otherScreen.frame.origin.x - currentScreen.frame.origin.x;
390 |
391 | //find the closest screens to left and right
392 | if (screenOffset < 0) { // screen is left of current
393 | if (fabs(screenOffset) < fabs(leftClosestOffset)) {
394 | leftClosestOffset = screenOffset;
395 | leftClosestIndex = i;
396 | }
397 |
398 | if (fabs(screenOffset) > fabs(leftFarthestOffset)) {
399 | leftFarthestOffset = screenOffset;
400 | leftFarthestIndex = i;
401 | }
402 | }
403 | else { //screen is right of current
404 | if (fabs(screenOffset) < fabs(rightClosestOffset)){
405 | rightClosestOffset = screenOffset;
406 | rightClosestIndex = i;
407 | }
408 |
409 | if (fabs(screenOffset) > fabs(rightFarthestOffset)) {
410 | rightFarthestOffset = screenOffset;
411 | rightFarthestIndex = i;
412 | }
413 | }
414 |
415 | }
416 |
417 | int target = 0;
418 | if (whichDirection == @"left")
419 | (leftClosestIndex == -1) ? (target = rightFarthestIndex) : (target = leftClosestIndex);
420 | else if (whichDirection == @"right")
421 | (rightClosestIndex == -1) ? (target = leftFarthestIndex) : (target = rightClosestIndex);
422 | else //action must be left or right-- if not, bail
423 | return [NSScreen mainScreen]; // return the current screen
424 |
425 | return [[NSScreen screens] objectAtIndex:target];
426 | }
427 |
428 | @end
--------------------------------------------------------------------------------
/ShiftIt/X11Utils.c:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include "X11Utils.h"
26 |
27 | static const char *const kErrorMessages_[] = {
28 | "X11Error: Unable to to connect to X11 display",
29 | "X11Error: Unable to get active window (XGetWindowProperty)",
30 | "X11Error: No X11 active window found",
31 | "X11Error: Unable to get window attributes (XGetWindowAttributes)",
32 | "X11Error: Unable to translate coordinated (XTranslateCoordinates)",
33 | "X11Error: Unable to get geometry (XGetGeometry)",
34 | "X11Error: Unable to change window geometry (XMoveResizeWindow)",
35 | "X11Error: Unable to sync X11 (XSync)"
36 | };
37 |
38 | static int kErrorMessageCount_ = sizeof(kErrorMessages_)/sizeof(kErrorMessages_[0]);
39 |
40 | static int ShiftItX11ErrorHandler(Display *dpy, XErrorEvent *err) {
41 | char msg[256];
42 |
43 | XGetErrorText(dpy, err->error_code, msg, sizeof(msg));
44 | printf("ShiftIt: X11Error: %s (code: %d)\n", msg, err->request_code);
45 |
46 | return 0;
47 | }
48 |
49 | int X11SetWindowPosition(void *window, int x, int y) {
50 | assert (window != NULL);
51 |
52 | Display *dpy = XOpenDisplay(NULL);
53 |
54 | if (!dpy) {
55 | return -1;
56 | }
57 |
58 | XSetErrorHandler(&ShiftItX11ErrorHandler);
59 |
60 | // we don't need to adjust the x and y since they are from the top left window
61 | if (!XMoveWindow(dpy, *((Window *)window), x, y)){
62 | return -6;
63 | }
64 |
65 | // do it now - this will block
66 | if (!XSync(dpy, False)) {
67 | return -7;
68 | }
69 |
70 | XCloseDisplay(dpy);
71 | return 0;
72 | }
73 |
74 | int X11SetWindowSize(void *window, unsigned int width, unsigned int height) {
75 | assert (window != NULL);
76 |
77 | Display *dpy = XOpenDisplay(NULL);
78 |
79 | if (!dpy) {
80 | return -1;
81 | }
82 |
83 | XSetErrorHandler(&ShiftItX11ErrorHandler);
84 |
85 | XWindowAttributes wa;
86 | if(!XGetWindowAttributes(dpy, *((Window *)window), &wa)) {
87 | return -4;
88 | }
89 |
90 | // the WindowSizer will pass the size of the entire window including its decoration
91 | // we need to subtract that
92 | width -= wa.x;
93 | height -= wa.y;
94 |
95 | if (!XResizeWindow(dpy, *((Window *)window), width, height)){
96 | return -6;
97 | }
98 |
99 | if (!XSync(dpy, False)) {
100 | return -7;
101 | }
102 |
103 | XCloseDisplay(dpy);
104 | return 0;
105 | }
106 |
107 | int X11GetActiveWindow(void **activeWindow) {
108 | Display* dpy = NULL;
109 | dpy = XOpenDisplay(NULL);
110 |
111 | if (!dpy) {
112 | return -1;
113 | }
114 |
115 | XSetErrorHandler(&ShiftItX11ErrorHandler);
116 |
117 | Window root = DefaultRootWindow(dpy);
118 |
119 | // following are for the params that are not used
120 | int not_used_int;
121 | unsigned long not_used_long;
122 |
123 | Atom actual_type = 0;
124 | unsigned char *prop_return = NULL;
125 |
126 | if(XGetWindowProperty(dpy, root, XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False), 0, 0x7fffffff, False,
127 | XA_WINDOW, &actual_type, ¬_used_int, ¬_used_long, ¬_used_long,
128 | &prop_return) != Success) {
129 | return -2;
130 | }
131 |
132 | if (prop_return == NULL || *((Window *) prop_return) == 0) {
133 | return -3;
134 | }
135 |
136 | *activeWindow = (void *) prop_return;
137 |
138 | XCloseDisplay(dpy);
139 | return 0;
140 | }
141 |
142 | int X11GetWindowGeometry(void *window, int *x, int *y, unsigned int *width, unsigned int *height) {
143 | assert (x != NULL && y != NULL && width != NULL && height != NULL);
144 |
145 | Display* dpy = NULL;
146 | dpy = XOpenDisplay(NULL);
147 |
148 | if (!dpy) {
149 | return -1;
150 | }
151 |
152 | XSetErrorHandler(&ShiftItX11ErrorHandler);
153 |
154 | Window root = DefaultRootWindow(dpy);
155 | XWindowAttributes wa;
156 |
157 | if(!XGetWindowAttributes(dpy, *((Window *)window), &wa)) {
158 | return -4;
159 | }
160 |
161 | Window not_used_window;
162 | if(!XTranslateCoordinates(dpy, *((Window *)window), root, -wa.border_width, -wa.border_width, x, y, ¬_used_window)) {
163 | return -5;
164 | }
165 |
166 | // the height returned is without the window manager decoration - the OSX top bar with buttons, window label and stuff
167 | // so we need to add it to the height as well because the WindowSize expects the full window
168 | // the same might be potentially apply to the width
169 | *width = wa.width + wa.x;
170 | *height = wa.height + wa.y;
171 |
172 | *x -= wa.x;
173 | *y -= wa.y;
174 |
175 | XCloseDisplay(dpy);
176 | return 0;
177 | }
178 |
179 | void X11FreeWindowRef(void *window) {
180 | assert(window != NULL);
181 |
182 | XFree(window);
183 | }
184 |
185 | const char *X11GetErrorMessage(int code) {
186 | assert (code < 0 && code >= -kErrorMessageCount_);
187 |
188 | return kErrorMessages_[-code-1];
189 | }
190 |
--------------------------------------------------------------------------------
/ShiftIt/X11Utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Filip Krikava
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 | #ifndef _X11UTIL_H_
21 |
22 | #define _X11UTIL_H_
23 |
24 | /**
25 | * This unit defines necessary functions to support sizing of X11 windows
26 | * It is based upon the Xlib library [1].
27 | *
28 | * [1] http://tronche.com/gui/x/xlib/
29 | *
30 | */
31 |
32 | int X11SetWindowPosition(void *window, int x, int y);
33 | int X11SetWindowSize(void *window, unsigned int width, unsigned int height);
34 | int X11GetActiveWindow(void **activeWindow);
35 | int X11GetWindowGeometry(void *window, int *x, int *y, unsigned int *width, unsigned int *height);
36 | void X11FreeWindowRef(void *window);
37 |
38 | const char *X11GetErrorMessage(int code);
39 |
40 | #endif // _X11UTIL_H_
41 |
--------------------------------------------------------------------------------
/ShiftIt/dsa_pub.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PUBLIC KEY-----
2 | MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQDjToUI2Y53evDHD8Pqy9IKwgK7Gwju
3 | YbrJl58URCzTJOTPkR/JKeLd3bbZxHY4OwN6PfBhWw2jwhURMncZA1WMgHpuTEfa
4 | eOyat0Xedv3o+Lcdf3Yy8KrKSjI9aobpULfYi7xJVbabbR781BN/Dtl3Mt7d3RSI
5 | rs32tT61JZL0Nq2jLjvSrm4pR/nV72y5vow3D8FAZV7x7+Lop3TieF98uuHuHcWF
6 | 1ot5FPOmO4JICAmeEBqkrUxFXUydjwk1AMjVcDBNT93c1Gtt6Y0MI+XeCpR8h1vZ
7 | XkLgeoNKJy74TGpITqSBRokbfufwd0raLzJ6VkXKGUNBfwrFRkwNFj9rAhUA1Izw
8 | Tb26hipCFo9yffpIbUtvajcCggEAGMfx9NmXW43ifLnjRTBIT52P9cPpHaC6+lNX
9 | utDpcCzWsb3h/95CytQQvw/MVJbwKMLLknn2zclKaKGzyDk8/GeZLmHeB59hCgu5
10 | Yt0d7UN8BXyj4+rBJ3+qbfh109a9tY5Lr7elWSZrCtuRwToAcKBuq4g42oDL+1pc
11 | Z3xwTpvk2oj1m5PMyTNcbopFFZrDbS3IcqeJim6oJNINnUGpO9/izGEzqrFYbewF
12 | ST8iXsykfGgpyWRxIRdjiNTu82QGNZLpOBuAOFMAAKMCRrzqqs6iTnudA6YayDkQ
13 | 2cv8uIm6Y36zMzufZ69rFRm2f74+yDC3J7zJOd7BuHsVlTZPbQOCAQYAAoIBAQCb
14 | 1fZo3Fc9gJCL4Oh1tZPXmA9IeINPAYKePfDP9y/PbE6SGSkRMmJ97ZgJxBn3hSDa
15 | KiWCXT5bZ0MnlxMMI4aFm21uM0feeMlukTxt3rM6OeYerCNdkPWCgrF6rhr2CPnB
16 | RjOBkukCqPDEscAv1UPMb4TMss72aVo71HLzjlZPgMHgEfdGorF/4ez+BCQrqHc5
17 | hHW+srToisGAzrKtzASCegjWcXiuarHfrh2jL6BZqk3+KISVg15v8ROK6pOJAzTl
18 | FuVk1tY8owm32lYPjpGGyeB5XdV2szpjiP7B+JaLh51+RboFXIz/qYPJZG2PGCb4
19 | c5r1ieqppZmRioMQ5OqP
20 | -----END PUBLIC KEY-----
21 |
--------------------------------------------------------------------------------
/ShiftIt/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | ShiftIt: Resize windows with Hotkeys
3 | Copyright (C) 2010 Aravind
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | */
19 |
20 |
21 | #import
22 |
23 | int main(int argc, char *argv[])
24 | {
25 | return NSApplicationMain(argc, (const char **) argv);
26 | }
27 |
--------------------------------------------------------------------------------
/artwork/ShiftIt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chriscrowe/ShiftIt/92a136c4747bdfac1c6f8cedd49d8814a81ff2e7/artwork/ShiftIt.png
--------------------------------------------------------------------------------
/scripts/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ########################################################################
3 | # release.sh
4 | #
5 | # - makes a release of a xcode project compatible with Sparkle
6 | # - makes the release in the diectory from which it were executed
7 | #
8 | ########################################################################
9 |
10 | # configuration
11 |
12 | PROJECT_NAME="ShiftIt"
13 | PRIV_KEY="$HOME/Dropbox/Personal/Keys/ShiftIt/dsa_priv.pem"
14 | URL="http://nkuyu.net/apps/shiftit"
15 | APPCAST_URL="$URL/appcast.xml"
16 | DOWNLOAD_URL="$URL/downloads"
17 | OPENSSL="/usr/bin/openssl"
18 |
19 | # below is the logic
20 | src_dir="$(dirname $0)/../$PROJECT_NAME"
21 | app_dir="$src_dir/build/Release/$PROJECT_NAME.app"
22 |
23 | # build
24 | pushd . > /dev/null
25 | cd "$src_dir"
26 | xcodebuild -target $PROJECT_NAME -configuration Release
27 | if [ $? != 0 ]; then
28 | echo "XCode build failed"
29 | popd
30 | exit 2
31 | fi
32 | popd > /dev/null
33 |
34 | # version
35 | # note: defaults have to be (from whatever reason) called with full path
36 | version=$(defaults read $(pwd)/"$app_dir/Contents/Info" CFBundleVersion)
37 | if [ $? != 0 ]; then
38 | echo "Unable to get version info"
39 | exit 2
40 | fi
41 |
42 | archive_name="$PROJECT_NAME-$version.zip"
43 | archive_path="$archive_name"
44 | rel_notes_file="release-notes-$version.html"
45 |
46 | # create an archive
47 | if [ -f $archive_path ]; then
48 | echo "Removing previously built archive"
49 | rm -fr $archive_path
50 | fi
51 |
52 | echo
53 |
54 | echo "Version: $version"
55 | echo "Name: $archive_name"
56 | echo "Path: $(pwd)/$archive_path"
57 |
58 | ditto -ck --keepParent "$app_dir" "$archive_path"
59 | if [ $? != 0 ]; then
60 | echo "Unable to make an archive"
61 | exit 2
62 | fi
63 |
64 | # size
65 | size=$(stat -c %s "$archive_path")
66 | echo "Size: $size"
67 |
68 | # date
69 | pub_date=$(LC_TIME=en_US date +"%a, %d %b %G %T %z")
70 | echo "Date: $pub_date"
71 |
72 | # sign
73 | # this comes from Sparkle
74 | sign_file="$archive_name.sign"
75 | "$OPENSSL" dgst -sha1 -binary < "$archive_path" | "$OPENSSL" dgst -dss1 -sign "$PRIV_KEY" > "$sign_file"
76 | if [ $? != 0 ]; then
77 | echo "Unable to sign an archive"
78 | exit 2
79 | fi
80 | "$OPENSSL" dgst -sha1 -binary < "$archive_path" | "$OPENSSL" dgst -dss1 -verify "$src_dir/dsa_pub.pem" -signature "$sign_file"
81 | if [ $? != 0 ]; then
82 | echo "Unable to verify signature an archive"
83 | exit 2
84 | fi
85 |
86 | signature=$(cat "$sign_file" | "$OPENSSL" enc -base64)
87 | echo "Sig: $signature"
88 | rm "$sign_file"
89 |
90 | echo
91 | echo "Appcast:"
92 | echo
93 |
94 | # item
95 | cat <
97 |
98 |
99 | $PROJECT_NAME Changelog
100 | $APPCAST_URL
101 | Most recent changes with links to updates.
102 | en
103 | -
104 | Version $version
105 |
106 | http://nkuyu.net/apps/shiftit/release-notes-$version.html
107 |
108 | $pub_date
109 |
110 |
111 |
112 |
113 | EOF
114 |
115 | echo
116 | echo "Release notes: $rel_notes_file"
117 | echo
118 |
119 | # release notes
120 | cat < $rel_notes_file
121 |
122 |
123 |
124 | Version $version
125 |
126 | Changes
127 |
130 |
131 | If you find any bug please report them in github
132 |
133 |
134 |
135 | EOF
136 |
137 | cat $rel_notes_file
138 | echo
139 |
--------------------------------------------------------------------------------