Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replace the existing four window actions for moving between displays …

…with two. Spectacle will now iterate over the next or previous display.
  • Loading branch information...
commit baf1579c8d53c08681176c6bc0f07ecd40f8d9f0 1 parent fc56f51
@eczarny eczarny authored
View
273 Languages/en.lproj/SpectaclePreferencesWindow.xib
@@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
- <int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">11C74</string>
- <string key="IBDocument.InterfaceBuilderVersion">1938</string>
- <string key="IBDocument.AppKitVersion">1138.23</string>
- <string key="IBDocument.HIToolboxVersion">567.00</string>
+ <int key="IBDocument.SystemTarget">1070</int>
+ <string key="IBDocument.SystemVersion">11E53</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2549</string>
+ <string key="IBDocument.AppKitVersion">1138.47</string>
+ <string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">1938</string>
+ <string key="NS.object.0">2549</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
- <string>NSPopUpButton</string>
+ <string>NSBox</string>
<string>NSButton</string>
- <string>NSMenu</string>
+ <string>NSButtonCell</string>
+ <string>NSCustomObject</string>
+ <string>NSCustomView</string>
+ <string>NSImageCell</string>
<string>NSImageView</string>
+ <string>NSMenu</string>
<string>NSMenuItem</string>
+ <string>NSPopUpButton</string>
+ <string>NSPopUpButtonCell</string>
+ <string>NSTextField</string>
<string>NSTextFieldCell</string>
- <string>NSBox</string>
- <string>NSButtonCell</string>
- <string>NSImageCell</string>
- <string>NSCustomView</string>
- <string>NSCustomObject</string>
<string>NSView</string>
<string>NSWindowTemplate</string>
- <string>NSTextField</string>
- <string>NSPopUpButtonCell</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -74,7 +74,7 @@
<reference key="NSNextKeyView" ref="334450674"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="24816078">
- <int key="NSCellFlags">130560</int>
+ <int key="NSCellFlags">134348288</int>
<int key="NSCellFlags2">33554432</int>
<object class="NSCustomResource" key="NSContents">
<string key="NSClassName">NSImage</string>
@@ -185,7 +185,7 @@
<string key="NSFrame">{{140, 316}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="386598518"/>
+ <reference key="NSNextKeyView" ref="682556037"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="371466113">
@@ -212,7 +212,7 @@
<string key="NSFrame">{{140, 287}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="432102645"/>
+ <reference key="NSNextKeyView" ref="244591005"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="432102645">
@@ -239,7 +239,7 @@
<string key="NSFrame">{{140, 258}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="682556037"/>
+ <reference key="NSNextKeyView" ref="363827317"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="363827317">
@@ -266,7 +266,7 @@
<string key="NSFrame">{{140, 229}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="244591005"/>
+ <reference key="NSNextKeyView" ref="986017371"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="835040599">
@@ -293,7 +293,7 @@
<string key="NSFrame">{{140, 171}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="986017371"/>
+ <reference key="NSNextKeyView" ref="951202879"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="951202879">
@@ -320,7 +320,7 @@
<string key="NSFrame">{{140, 142}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="329619471"/>
+ <reference key="NSNextKeyView" ref="289383272"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="289383272">
@@ -388,7 +388,7 @@
<object class="NSTextFieldCell" key="NSCell" id="220645160">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">71304192</int>
- <string key="NSContents">Left Display:</string>
+ <string key="NSContents">Next Display:</string>
<reference key="NSSupport" ref="451733591"/>
<reference key="NSControlView" ref="889390246"/>
<reference key="NSBackgroundColor" ref="832006892"/>
@@ -407,7 +407,7 @@
<object class="NSTextField" id="619336483">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 376}, {104, 17}}</string>
+ <string key="NSFrame">{{305, 376}, {112, 17}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="292546697"/>
@@ -415,7 +415,7 @@
<object class="NSTextFieldCell" key="NSCell" id="835616882">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">71304192</int>
- <string key="NSContents">Right Display:</string>
+ <string key="NSContents">Previous Display:</string>
<reference key="NSSupport" ref="451733591"/>
<reference key="NSControlView" ref="619336483"/>
<reference key="NSBackgroundColor" ref="832006892"/>
@@ -428,67 +428,13 @@
<string key="NSFrame">{{422, 374}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="660073650"/>
- <string key="NSClassName">ZeroKitHotKeyRecorder</string>
- </object>
- <object class="NSTextField" id="660073650">
- <reference key="NSNextResponder" ref="253082788"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 347}, {104, 17}}</string>
- <reference key="NSSuperview" ref="253082788"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="618846378"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="421946709">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">71304192</int>
- <string key="NSContents">Top Display:</string>
- <reference key="NSSupport" ref="451733591"/>
- <reference key="NSControlView" ref="660073650"/>
- <reference key="NSBackgroundColor" ref="832006892"/>
- <reference key="NSTextColor" ref="1049168080"/>
- </object>
- </object>
- <object class="NSCustomView" id="618846378">
- <reference key="NSNextResponder" ref="253082788"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 345}, {140, 21}}</string>
- <reference key="NSSuperview" ref="253082788"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="580933406"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
- <object class="NSTextField" id="386598518">
- <reference key="NSNextResponder" ref="253082788"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 318}, {104, 17}}</string>
- <reference key="NSSuperview" ref="253082788"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="108195118"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="762742456">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">71304192</int>
- <string key="NSContents">Bottom Display:</string>
- <reference key="NSSupport" ref="451733591"/>
- <reference key="NSControlView" ref="386598518"/>
- <reference key="NSBackgroundColor" ref="832006892"/>
- <reference key="NSTextColor" ref="1049168080"/>
- </object>
- </object>
- <object class="NSCustomView" id="108195118">
- <reference key="NSNextResponder" ref="253082788"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 316}, {140, 21}}</string>
- <reference key="NSSuperview" ref="253082788"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="371466113"/>
- <string key="NSClassName">ZeroKitHotKeyRecorder</string>
- </object>
<object class="NSTextField" id="682556037">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 260}, {104, 17}}</string>
+ <string key="NSFrame">{{313, 318}, {104, 17}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="145974905"/>
@@ -506,16 +452,16 @@
<object class="NSCustomView" id="145974905">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 258}, {140, 21}}</string>
+ <string key="NSFrame">{{422, 316}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="363827317"/>
+ <reference key="NSNextKeyView" ref="371466113"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="244591005">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{318, 231}, {99, 17}}</string>
+ <string key="NSFrame">{{318, 289}, {99, 17}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1070576972"/>
@@ -533,16 +479,16 @@
<object class="NSCustomView" id="1070576972">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 229}, {140, 21}}</string>
+ <string key="NSFrame">{{422, 287}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="835040599"/>
+ <reference key="NSNextKeyView" ref="432102645"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="986017371">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 173}, {104, 17}}</string>
+ <string key="NSFrame">{{313, 231}, {104, 17}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="396480327"/>
@@ -560,16 +506,16 @@
<object class="NSCustomView" id="396480327">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 171}, {140, 21}}</string>
+ <string key="NSFrame">{{422, 229}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="951202879"/>
+ <reference key="NSNextKeyView" ref="329619471"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSTextField" id="329619471">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{313, 144}, {104, 17}}</string>
+ <string key="NSFrame">{{313, 202}, {104, 17}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="703184041"/>
@@ -587,10 +533,10 @@
<object class="NSCustomView" id="703184041">
<reference key="NSNextResponder" ref="253082788"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{422, 142}, {140, 21}}</string>
+ <string key="NSFrame">{{422, 200}, {140, 21}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="289383272"/>
+ <reference key="NSNextKeyView" ref="835040599"/>
<string key="NSClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="NSBox" id="325623976">
@@ -604,7 +550,7 @@
<object class="NSButton" id="1046001229">
<reference key="NSNextResponder" ref="730268159"/>
<int key="NSvFlags">299</int>
- <string key="NSFrame">{{16, 15}, {182, 18}}</string>
+ <string key="NSFrame">{{16, 16}, {182, 18}}</string>
<reference key="NSSuperview" ref="730268159"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="977980798"/>
@@ -633,7 +579,7 @@
<object class="NSTextField" id="977980798">
<reference key="NSNextResponder" ref="730268159"/>
<int key="NSvFlags">302</int>
- <string key="NSFrame">{{335, 16}, {42, 17}}</string>
+ <string key="NSFrame">{{341, 17}, {42, 17}}</string>
<reference key="NSSuperview" ref="730268159"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="275860819"/>
@@ -659,9 +605,10 @@
<object class="NSPopUpButton" id="275860819">
<reference key="NSNextResponder" ref="730268159"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{378, 10}, {227, 26}}</string>
+ <string key="NSFrame">{{384, 12}, {227, 26}}</string>
<reference key="NSSuperview" ref="730268159"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:868</string>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="662458338">
@@ -719,14 +666,14 @@
</object>
</object>
</array>
- <string key="NSFrame">{{1, 1}, {626, 46}}</string>
+ <string key="NSFrame">{{1, 1}, {626, 48}}</string>
<reference key="NSSuperview" ref="325623976"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1046001229"/>
<string key="NSReuseIdentifierKey">_NS:21</string>
</object>
</array>
- <string key="NSFrame">{{-6, -4}, {628, 48}}</string>
+ <string key="NSFrame">{{-6, -6}, {628, 50}}</string>
<reference key="NSSuperview" ref="253082788"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="730268159"/>
@@ -768,7 +715,7 @@
<reference key="NSNextKeyView" ref="567345716"/>
<string key="NSReuseIdentifierKey">_NS:224</string>
</object>
- <string key="NSScreenRect">{{0, 0}, {1680, 1050}}</string>
+ <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
@@ -817,14 +764,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">myMoveToTopDisplayHotKeyRecorder</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="618846378"/>
- </object>
- <int key="connectionID">81</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">myMoveToRightHotKeyRecorder</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="854798695"/>
@@ -833,14 +772,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">myMoveToRightDisplayHotKeyRecorder</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="292546697"/>
- </object>
- <int key="connectionID">79</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">myMoveToLowerRightHotKeyRecorder</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="562089500"/>
@@ -865,14 +796,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">myMoveToLeftDisplayHotKeyRecorder</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1063450049"/>
- </object>
- <int key="connectionID">74</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">myMoveToFullscreenHotKeyRecorder</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="559645078"/>
@@ -897,14 +820,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">myMoveToBottomDisplayHotKeyRecorder</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="108195118"/>
- </object>
- <int key="connectionID">70</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">myLoginItemEnabled</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1046001229"/>
@@ -959,6 +874,22 @@
</object>
<int key="connectionID">122</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">myMoveToNextDisplayHotKeyRecorder</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1063450049"/>
+ </object>
+ <int key="connectionID">123</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">myMoveToPreviousDisplayHotKeyRecorder</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="292546697"/>
+ </object>
+ <int key="connectionID">124</int>
+ </object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -1012,8 +943,6 @@
<reference ref="810368260"/>
<reference ref="889390246"/>
<reference ref="619336483"/>
- <reference ref="660073650"/>
- <reference ref="386598518"/>
<reference ref="682556037"/>
<reference ref="244591005"/>
<reference ref="629140152"/>
@@ -1028,8 +957,6 @@
<reference ref="665817787"/>
<reference ref="1063450049"/>
<reference ref="292546697"/>
- <reference ref="618846378"/>
- <reference ref="108195118"/>
<reference ref="145974905"/>
<reference ref="325623976"/>
<reference ref="986017371"/>
@@ -1204,32 +1131,6 @@
<reference key="parent" ref="253082788"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">30</int>
- <reference key="object" ref="386598518"/>
- <array class="NSMutableArray" key="children">
- <reference ref="762742456"/>
- </array>
- <reference key="parent" ref="253082788"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">31</int>
- <reference key="object" ref="618846378"/>
- <reference key="parent" ref="253082788"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">32</int>
- <reference key="object" ref="660073650"/>
- <array class="NSMutableArray" key="children">
- <reference ref="421946709"/>
- </array>
- <reference key="parent" ref="253082788"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">33</int>
- <reference key="object" ref="108195118"/>
- <reference key="parent" ref="253082788"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="682556037"/>
<array class="NSMutableArray" key="children">
@@ -1337,16 +1238,6 @@
<reference key="parent" ref="682556037"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">50</int>
- <reference key="object" ref="421946709"/>
- <reference key="parent" ref="660073650"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">51</int>
- <reference key="object" ref="762742456"/>
- <reference key="parent" ref="386598518"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">52</int>
<reference key="object" ref="220645160"/>
<reference key="parent" ref="889390246"/>
@@ -1483,10 +1374,6 @@
<boolean value="YES" key="3.IBNSWindowAutoPositionCentersVertical"/>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" key="3.NSWindowTemplate.visibleAtLaunch"/>
- <string key="30.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="31.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="33.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="34.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="35.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1505,8 +1392,6 @@
<string key="48.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="50.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="51.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="52.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="53.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="54.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1529,7 +1414,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">122</int>
+ <int key="maxID">124</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1562,19 +1447,17 @@
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="myLoginItemEnabled">NSButton</string>
- <string key="myMoveToBottomDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToBottomHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToCenterHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToFullscreenHotKeyRecorder">ZeroKitHotKeyRecorder</string>
- <string key="myMoveToLeftDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToLeftHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToLowerLeftHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToLowerRightHotKeyRecorder">ZeroKitHotKeyRecorder</string>
+ <string key="myMoveToNextDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToNextThirdHotKeyRecorder">ZeroKitHotKeyRecorder</string>
+ <string key="myMoveToPreviousDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToPreviousThirdHotKeyRecorder">ZeroKitHotKeyRecorder</string>
- <string key="myMoveToRightDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToRightHotKeyRecorder">ZeroKitHotKeyRecorder</string>
- <string key="myMoveToTopDisplayHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToTopHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToUpperLeftHotKeyRecorder">ZeroKitHotKeyRecorder</string>
<string key="myMoveToUpperRightHotKeyRecorder">ZeroKitHotKeyRecorder</string>
@@ -1587,10 +1470,6 @@
<string key="name">myLoginItemEnabled</string>
<string key="candidateClassName">NSButton</string>
</object>
- <object class="IBToOneOutletInfo" key="myMoveToBottomDisplayHotKeyRecorder">
- <string key="name">myMoveToBottomDisplayHotKeyRecorder</string>
- <string key="candidateClassName">ZeroKitHotKeyRecorder</string>
- </object>
<object class="IBToOneOutletInfo" key="myMoveToBottomHotKeyRecorder">
<string key="name">myMoveToBottomHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
@@ -1603,10 +1482,6 @@
<string key="name">myMoveToFullscreenHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
- <object class="IBToOneOutletInfo" key="myMoveToLeftDisplayHotKeyRecorder">
- <string key="name">myMoveToLeftDisplayHotKeyRecorder</string>
- <string key="candidateClassName">ZeroKitHotKeyRecorder</string>
- </object>
<object class="IBToOneOutletInfo" key="myMoveToLeftHotKeyRecorder">
<string key="name">myMoveToLeftHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
@@ -1619,26 +1494,26 @@
<string key="name">myMoveToLowerRightHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
+ <object class="IBToOneOutletInfo" key="myMoveToNextDisplayHotKeyRecorder">
+ <string key="name">myMoveToNextDisplayHotKeyRecorder</string>
+ <string key="candidateClassName">ZeroKitHotKeyRecorder</string>
+ </object>
<object class="IBToOneOutletInfo" key="myMoveToNextThirdHotKeyRecorder">
<string key="name">myMoveToNextThirdHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
- <object class="IBToOneOutletInfo" key="myMoveToPreviousThirdHotKeyRecorder">
- <string key="name">myMoveToPreviousThirdHotKeyRecorder</string>
+ <object class="IBToOneOutletInfo" key="myMoveToPreviousDisplayHotKeyRecorder">
+ <string key="name">myMoveToPreviousDisplayHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
- <object class="IBToOneOutletInfo" key="myMoveToRightDisplayHotKeyRecorder">
- <string key="name">myMoveToRightDisplayHotKeyRecorder</string>
+ <object class="IBToOneOutletInfo" key="myMoveToPreviousThirdHotKeyRecorder">
+ <string key="name">myMoveToPreviousThirdHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
<object class="IBToOneOutletInfo" key="myMoveToRightHotKeyRecorder">
<string key="name">myMoveToRightHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
</object>
- <object class="IBToOneOutletInfo" key="myMoveToTopDisplayHotKeyRecorder">
- <string key="name">myMoveToTopDisplayHotKeyRecorder</string>
- <string key="candidateClassName">ZeroKitHotKeyRecorder</string>
- </object>
<object class="IBToOneOutletInfo" key="myMoveToTopHotKeyRecorder">
<string key="name">myMoveToTopHotKeyRecorder</string>
<string key="candidateClassName">ZeroKitHotKeyRecorder</string>
@@ -1683,13 +1558,13 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <real value="1060" key="NS.object.0"/>
+ <real value="1070" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NSMenuCheckmark">{9, 8}</string>
- <string key="NSMenuMixedState">{7, 2}</string>
+ <string key="NSMenuCheckmark">{11, 11}</string>
+ <string key="NSMenuMixedState">{10, 3}</string>
<string key="NSSwitch">{15, 15}</string>
<string key="Preferences Window Background">{1024, 1024}</string>
</dictionary>
View
12 Resources/Property Lists/Defaults.plist
@@ -22,14 +22,10 @@
<data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMREQAQfIACXxAQTW92ZVRvVXBwZXJSaWdodNITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNdWmVyb0tpdEhvdEtleaIXGF1aZXJvS2l0SG90S2V5WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktSXGRpa25wcoWKlZ6sr73G2NvgAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOI=</data>
<key>MoveToLowerRight</key>
<data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMREwAQfIACXxAQTW92ZVRvTG93ZXJSaWdodNITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNdWmVyb0tpdEhvdEtleaIXGF1aZXJvS2l0SG90S2V5WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktSXGRpa25wcoWKlZ6sr73G2NvgAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOI=</data>
- <key>MoveToLeftDisplay</key>
- <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQe4ACXxARTW92ZVRvTGVmdERpc3BsYXnSExQVFlokY2xhc3NuYW1lWCRjbGFzc2VzXVplcm9LaXRIb3RLZXmiFxhdWmVyb0tpdEhvdEtleVhOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEbHFRyb290gAEIERojLTI3PEJLUlxkaWtucHKGi5afrbC+x9nc4QAAAAAAAAEBAAAAAAAAAB0AAAAAAAAAAAAAAAAAAADj</data>
- <key>MoveToRightDisplay</key>
- <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQfIACXxASTW92ZVRvUmlnaHREaXNwbGF50hMUFRZaJGNsYXNzbmFtZVgkY2xhc3Nlc11aZXJvS2l0SG90S2V5ohcYXVplcm9LaXRIb3RLZXlYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1JcZGlrbnByh4yXoK6xv8ja3eIAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA5A==</data>
- <key>MoveToTopDisplay</key>
- <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQfoACXxAQTW92ZVRvVG9wRGlzcGxhedITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNdWmVyb0tpdEhvdEtleaIXGF1aZXJvS2l0SG90S2V5WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktSXGRpa25wcoWKlZ6sr73G2NvgAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOI=</data>
- <key>MoveToBottomDisplay</key>
- <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQfYACXxATTW92ZVRvQm90dG9tRGlzcGxhedITFBUWWiRjbGFzc25hbWVYJGNsYXNzZXNdWmVyb0tpdEhvdEtleaIXGF1aZXJvS2l0SG90S2V5WE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RscVHJvb3SAAQgRGiMtMjc8QktSXGRpa25wcoiNmKGvssDJ297jAAAAAAAAAQEAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAOU=</data>
+ <key>MoveToNextDisplay</key>
+ <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQfIACXxARTW92ZVRvTmV4dERpc3BsYXnSExQVFlokY2xhc3NuYW1lWCRjbGFzc2VzXVplcm9LaXRIb3RLZXmiFxhdWmVyb0tpdEhvdEtleVhOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEbHFRyb290gAEIERojLTI3PEJLUlxkaWtucHKGi5afrbC+x9nc4QAAAAAAAAEBAAAAAAAAAB0AAAAAAAAAAAAAAAAAAADj</data>
+ <key>MoveToPreviousDisplay</key>
+ <data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGQAQe4ACXxAVTW92ZVRvUHJldmlvdXNEaXNwbGF50hMUFRZaJGNsYXNzbmFtZVgkY2xhc3Nlc11aZXJvS2l0SG90S2V5ohcYXVplcm9LaXRIb3RLZXlYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1JcZGlrbnByio+ao7G0wsvd4OUAAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA5w==</data>
<key>MoveToNextThird</key>
<data>YnBsaXN0MDDUAQIDBAUGGRpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKQHCBESVSRudWxs1AkKCwwNDg8QViRjbGFzc1ltb2RpZmllcnNXa2V5Q29kZVRuYW1lgAMRGAAQfIACXxAPTW92ZVRvTmV4dFRoaXJk0hMUFRZaJGNsYXNzbmFtZVgkY2xhc3Nlc11aZXJvS2l0SG90S2V5ohcYXVplcm9LaXRIb3RLZXlYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2ZXLRGxxUcm9vdIABCBEaIy0yNzxCS1JcZGlrbnByhImUnauuvMXX2t8AAAAAAAABAQAAAAAAAAAdAAAAAAAAAAAAAAAAAAAA4Q==</data>
<key>MoveToPreviousThird</key>
View
6 Resources/Property Lists/HotKeyNames.plist
@@ -12,10 +12,8 @@
<string>MoveToLowerLeft</string>
<string>MoveToUpperRight</string>
<string>MoveToLowerRight</string>
- <string>MoveToLeftDisplay</string>
- <string>MoveToRightDisplay</string>
- <string>MoveToTopDisplay</string>
- <string>MoveToBottomDisplay</string>
+ <string>MoveToNextDisplay</string>
+ <string>MoveToPreviousDisplay</string>
<string>MoveToNextThird</string>
<string>MoveToPreviousThird</string>
<string>UndoLastMove</string>
View
6 SpectacleConstants.h
@@ -24,10 +24,8 @@
#define SpectacleWindowActionMoveToUpperRight @"MoveToUpperRight"
#define SpectacleWindowActionMoveToLowerRight @"MoveToLowerRight"
-#define SpectacleWindowActionMoveToLeftDisplay @"MoveToLeftDisplay"
-#define SpectacleWindowActionMoveToRightDisplay @"MoveToRightDisplay"
-#define SpectacleWindowActionMoveToTopDisplay @"MoveToTopDisplay"
-#define SpectacleWindowActionMoveToBottomDisplay @"MoveToBottomDisplay"
+#define SpectacleWindowActionMoveToNextDisplay @"MoveToNextDisplay"
+#define SpectacleWindowActionMoveToPreviousDisplay @"MoveToPreviousDisplay"
#define SpectacleWindowActionMoveToNextThird @"MoveToNextThird"
#define SpectacleWindowActionMoveToPreviousThird @"MoveToPreviousThird"
View
6 SpectaclePreferencesController.h
@@ -17,10 +17,8 @@
IBOutlet ZeroKitHotKeyRecorder *myMoveToLowerLeftHotKeyRecorder;
IBOutlet ZeroKitHotKeyRecorder *myMoveToUpperRightHotKeyRecorder;
IBOutlet ZeroKitHotKeyRecorder *myMoveToLowerRightHotKeyRecorder;
- IBOutlet ZeroKitHotKeyRecorder *myMoveToLeftDisplayHotKeyRecorder;
- IBOutlet ZeroKitHotKeyRecorder *myMoveToRightDisplayHotKeyRecorder;
- IBOutlet ZeroKitHotKeyRecorder *myMoveToTopDisplayHotKeyRecorder;
- IBOutlet ZeroKitHotKeyRecorder *myMoveToBottomDisplayHotKeyRecorder;
+ IBOutlet ZeroKitHotKeyRecorder *myMoveToNextDisplayHotKeyRecorder;
+ IBOutlet ZeroKitHotKeyRecorder *myMoveToPreviousDisplayHotKeyRecorder;
IBOutlet ZeroKitHotKeyRecorder *myMoveToNextThirdHotKeyRecorder;
IBOutlet ZeroKitHotKeyRecorder *myMoveToPreviousThirdHotKeyRecorder;
IBOutlet ZeroKitHotKeyRecorder *myUndoLastMoveHotKeyRecorder;
View
34 SpectaclePreferencesController.m
@@ -34,24 +34,22 @@ - (void)windowDidLoad {
BOOL isStatusItemEnabled = [[NSUserDefaults standardUserDefaults] boolForKey: SpectacleStatusItemEnabledPreference];
myHotKeyRecorders = [[NSDictionary alloc] initWithObjectsAndKeys:
- myMoveToCenterHotKeyRecorder, SpectacleWindowActionMoveToCenter,
- myMoveToFullscreenHotKeyRecorder, SpectacleWindowActionMoveToFullscreen,
- myMoveToLeftHotKeyRecorder, SpectacleWindowActionMoveToLeftHalf,
- myMoveToRightHotKeyRecorder, SpectacleWindowActionMoveToRightHalf,
- myMoveToTopHotKeyRecorder, SpectacleWindowActionMoveToTopHalf,
- myMoveToBottomHotKeyRecorder, SpectacleWindowActionMoveToBottomHalf,
- myMoveToUpperLeftHotKeyRecorder, SpectacleWindowActionMoveToUpperLeft,
- myMoveToLowerLeftHotKeyRecorder, SpectacleWindowActionMoveToLowerLeft,
- myMoveToUpperRightHotKeyRecorder, SpectacleWindowActionMoveToUpperRight,
- myMoveToLowerRightHotKeyRecorder, SpectacleWindowActionMoveToLowerRight,
- myMoveToLeftDisplayHotKeyRecorder, SpectacleWindowActionMoveToLeftDisplay,
- myMoveToRightDisplayHotKeyRecorder, SpectacleWindowActionMoveToRightDisplay,
- myMoveToTopDisplayHotKeyRecorder, SpectacleWindowActionMoveToTopDisplay,
- myMoveToBottomDisplayHotKeyRecorder, SpectacleWindowActionMoveToBottomDisplay,
- myMoveToNextThirdHotKeyRecorder, SpectacleWindowActionMoveToNextThird,
- myMoveToPreviousThirdHotKeyRecorder, SpectacleWindowActionMoveToPreviousThird,
- myUndoLastMoveHotKeyRecorder, SpectacleWindowActionUndoLastMove,
- myRedoLastMoveHotKeyRecorder, SpectacleWindowActionRedoLastMove, nil];
+ myMoveToCenterHotKeyRecorder, SpectacleWindowActionMoveToCenter,
+ myMoveToFullscreenHotKeyRecorder, SpectacleWindowActionMoveToFullscreen,
+ myMoveToLeftHotKeyRecorder, SpectacleWindowActionMoveToLeftHalf,
+ myMoveToRightHotKeyRecorder, SpectacleWindowActionMoveToRightHalf,
+ myMoveToTopHotKeyRecorder, SpectacleWindowActionMoveToTopHalf,
+ myMoveToBottomHotKeyRecorder, SpectacleWindowActionMoveToBottomHalf,
+ myMoveToUpperLeftHotKeyRecorder, SpectacleWindowActionMoveToUpperLeft,
+ myMoveToLowerLeftHotKeyRecorder, SpectacleWindowActionMoveToLowerLeft,
+ myMoveToUpperRightHotKeyRecorder, SpectacleWindowActionMoveToUpperRight,
+ myMoveToLowerRightHotKeyRecorder, SpectacleWindowActionMoveToLowerRight,
+ myMoveToNextDisplayHotKeyRecorder, SpectacleWindowActionMoveToNextDisplay,
+ myMoveToPreviousDisplayHotKeyRecorder, SpectacleWindowActionMoveToPreviousDisplay,
+ myMoveToNextThirdHotKeyRecorder, SpectacleWindowActionMoveToNextThird,
+ myMoveToPreviousThirdHotKeyRecorder, SpectacleWindowActionMoveToPreviousThird,
+ myUndoLastMoveHotKeyRecorder, SpectacleWindowActionUndoLastMove,
+ myRedoLastMoveHotKeyRecorder, SpectacleWindowActionRedoLastMove, nil];
[self loadRegisteredHotKeys];
View
73 SpectacleScreenDetection.m
@@ -3,14 +3,16 @@
@interface SpectacleScreenDetection (SpectacleScreenDetectionPrivate)
-+ (NSScreen *)screenAdjacentToFrameOfScreen: (CGRect)frameOfScreen inDirectionOfAction: (SpectacleWindowAction)action;
-
+ (NSScreen *)screenContainingRect: (CGRect)rect;
#pragma mark -
+ (CGFloat)percentageOfRect: (CGRect)rect withinFrameOfScreen: (CGRect)frameOfScreen;
+#pragma mark -
+
++ (NSScreen *)nextOrPreviousScreenToFrameOfScreen: (CGRect)frameOfScreen inDirectionOfAction: (SpectacleWindowAction)action;
+
@end
#pragma mark -
@@ -20,8 +22,8 @@ @implementation SpectacleScreenDetection
+ (NSScreen *)screenWithAction: (SpectacleWindowAction)action andRect: (CGRect)rect {
NSScreen *result = [self screenContainingRect: rect];
- if (MovingToDisplay(action)) {
- result = [self screenAdjacentToFrameOfScreen: NSRectToCGRect([result frame]) inDirectionOfAction: action];
+ if (MovingToNextOrPreviousDisplay(action)) {
+ result = [self nextOrPreviousScreenToFrameOfScreen: NSRectToCGRect([result frame]) inDirectionOfAction: action];
}
return result;
@@ -33,30 +35,6 @@ + (NSScreen *)screenWithAction: (SpectacleWindowAction)action andRect: (CGRect)r
@implementation SpectacleScreenDetection (SpectacleScreenDetectionPrivate)
-+ (NSScreen *)screenAdjacentToFrameOfScreen: (CGRect)frameOfScreen inDirectionOfAction: (SpectacleWindowAction)action {
- NSScreen *result = nil;
-
- for (NSScreen *currentScreen in [NSScreen screens]) {
- CGRect currentFrameOfScreen = NSRectToCGRect([currentScreen frame]);
-
- if (CGRectEqualToRect(currentFrameOfScreen, frameOfScreen)) {
- continue;
- }
-
- if ((action == SpectacleWindowActionLeftDisplay) && RectIsLeftOfRect(currentFrameOfScreen, frameOfScreen)) {
- result = currentScreen;
- } else if ((action == SpectacleWindowActionRightDisplay) && RectIsRightOfRect(currentFrameOfScreen, frameOfScreen)) {
- result = currentScreen;
- } else if ((action == SpectacleWindowActionTopDisplay) && RectIsAboveRect(currentFrameOfScreen, frameOfScreen)) {
- result = currentScreen;
- } else if ((action == SpectacleWindowActionBottomDisplay) && RectIsBelowRect(currentFrameOfScreen, frameOfScreen)) {
- result = currentScreen;
- }
- }
-
- return result;
-}
-
+ (NSScreen *)screenContainingRect: (CGRect)rect {
CGFloat largestPercentageOfRectWithinFrameOfScreen = 0.0f;
NSScreen *result = [NSScreen mainScreen];
@@ -99,4 +77,43 @@ + (CGFloat)percentageOfRect: (CGRect)rect withinFrameOfScreen: (CGRect)frameOfSc
return result;
}
+#pragma mark -
+
++ (NSScreen *)nextOrPreviousScreenToFrameOfScreen: (CGRect)frameOfScreen inDirectionOfAction: (SpectacleWindowAction)action {
+ NSArray *screens = [NSScreen screens];
+ NSScreen *result = nil;
+
+ if ([screens count] <= 1) {
+ return result;
+ }
+
+ for (NSInteger i = 0; i < [screens count]; i++) {
+ NSScreen *currentScreen = [screens objectAtIndex: i];
+ CGRect currentFrameOfScreen = NSRectToCGRect([currentScreen frame]);
+ NSInteger nextOrPreviousIndex = i;
+
+ if (!CGRectEqualToRect(currentFrameOfScreen, frameOfScreen)) {
+ continue;
+ }
+
+ if (action == SpectacleWindowActionNextDisplay) {
+ nextOrPreviousIndex++;
+ } else if (action == SpectacleWindowActionPreviousDisplay) {
+ nextOrPreviousIndex--;
+ }
+
+ if (nextOrPreviousIndex < 0) {
+ nextOrPreviousIndex = [screens count] - 1;
+ } else if (nextOrPreviousIndex >= [screens count]) {
+ nextOrPreviousIndex = 0;
+ }
+
+ result = [screens objectAtIndex: nextOrPreviousIndex];
+
+ break;
+ }
+
+ return result;
+}
+
@end
View
2  SpectacleUtilities.h
@@ -20,7 +20,7 @@
#pragma mark -
-#define MovingToDisplay(action) ((action >= SpectacleWindowActionLeftDisplay) && (action <= SpectacleWindowActionBottomDisplay))
+#define MovingToNextOrPreviousDisplay(action) ((action == SpectacleWindowActionNextDisplay) || (action == SpectacleWindowActionPreviousDisplay))
#pragma mark -
View
12 SpectacleUtilities.m
@@ -123,14 +123,10 @@ + (ZeroKitHotKeyAction *)actionForHotKeyWithName: (NSString *)name target: (id)t
selector = @selector(moveFrontMostWindowToUpperRight:);
} else if ([name isEqualToString: SpectacleWindowActionMoveToLowerRight]) {
selector = @selector(moveFrontMostWindowToLowerRight:);
- } else if ([name isEqualToString: SpectacleWindowActionMoveToLeftDisplay]) {
- selector = @selector(moveFrontMostWindowToLeftDisplay:);
- } else if ([name isEqualToString: SpectacleWindowActionMoveToRightDisplay]) {
- selector = @selector(moveFrontMostWindowToRightDisplay:);
- } else if ([name isEqualToString: SpectacleWindowActionMoveToTopDisplay]) {
- selector = @selector(moveFrontMostWindowToTopDisplay:);
- } else if ([name isEqualToString: SpectacleWindowActionMoveToBottomDisplay]) {
- selector = @selector(moveFrontMostWindowToBottomDisplay:);
+ } else if ([name isEqualToString: SpectacleWindowActionMoveToNextDisplay]) {
+ selector = @selector(moveFrontMostWindowToNextDisplay:);
+ } else if ([name isEqualToString: SpectacleWindowActionMoveToPreviousDisplay]) {
+ selector = @selector(moveFrontMostWindowToPreviousDisplay:);
} else if ([name isEqualToString: SpectacleWindowActionMoveToNextThird]) {
selector = @selector(moveFrontMostWindowToNextThird:);
} else if ([name isEqualToString: SpectacleWindowActionMoveToPreviousThird]) {
View
8 SpectacleWindowActionController.h
@@ -41,13 +41,9 @@
#pragma mark -
-- (IBAction)moveFrontMostWindowToLeftDisplay: (id)sender;
+- (IBAction)moveFrontMostWindowToNextDisplay: (id)sender;
-- (IBAction)moveFrontMostWindowToRightDisplay: (id)sender;
-
-- (IBAction)moveFrontMostWindowToTopDisplay: (id)sender;
-
-- (IBAction)moveFrontMostWindowToBottomDisplay: (id)sender;
+- (IBAction)moveFrontMostWindowToPreviousDisplay: (id)sender;
#pragma mark -
View
16 SpectacleWindowActionController.m
@@ -79,20 +79,12 @@ - (IBAction)moveFrontMostWindowToLowerRight: (id)sender {
#pragma mark -
-- (IBAction)moveFrontMostWindowToLeftDisplay: (id)sender {
- [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionLeftDisplay];
+- (IBAction)moveFrontMostWindowToNextDisplay: (id)sender {
+ [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionNextDisplay];
}
-- (IBAction)moveFrontMostWindowToRightDisplay: (id)sender {
- [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionRightDisplay];
-}
-
-- (IBAction)moveFrontMostWindowToTopDisplay: (id)sender {
- [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionTopDisplay];
-}
-
-- (IBAction)moveFrontMostWindowToBottomDisplay: (id)sender {
- [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionBottomDisplay];
+- (IBAction)moveFrontMostWindowToPreviousDisplay: (id)sender {
+ [myWindowPositionManager moveFrontMostWindowWithAction: SpectacleWindowActionPreviousDisplay];
}
#pragma mark -
View
6 SpectacleWindowPositionManager.h
@@ -15,10 +15,8 @@ typedef enum {
SpectacleWindowActionLowerRight,
SpectacleWindowActionTopHalf,
SpectacleWindowActionBottomHalf,
- SpectacleWindowActionLeftDisplay,
- SpectacleWindowActionRightDisplay,
- SpectacleWindowActionTopDisplay,
- SpectacleWindowActionBottomDisplay,
+ SpectacleWindowActionNextDisplay,
+ SpectacleWindowActionPreviousDisplay,
SpectacleWindowActionNextThird,
SpectacleWindowActionPreviousThird
} SpectacleWindowAction;
View
2  SpectacleWindowPositionManager.m
@@ -139,7 +139,7 @@ - (void)moveFrontMostWindowWithAction: (SpectacleWindowAction)action {
frontMostWindowRect.origin.y = FlipVerticalOriginOfRectInRect(frontMostWindowRect, frameOfScreen);
- if (MovingToDisplay(action) && RectFitsInRect(frontMostWindowRect, visibleFrameOfScreen)) {
+ if (MovingToNextOrPreviousDisplay(action) && RectFitsInRect(frontMostWindowRect, visibleFrameOfScreen)) {
action = SpectacleWindowActionCenter;
}

0 comments on commit baf1579

Please sign in to comment.
Something went wrong with that request. Please try again.