Updated SideView, split into SideBar and SideWindow.
parent
3daa06ebae
commit
2606a20020
|
@ -21,6 +21,8 @@
|
||||||
17342A9A0D5FD20B00E8D854 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17342A980D5FD20B00E8D854 /* MainMenu.xib */; };
|
17342A9A0D5FD20B00E8D854 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17342A980D5FD20B00E8D854 /* MainMenu.xib */; };
|
||||||
17342ABF0D5FD36400E8D854 /* OpenURLPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17342ABD0D5FD36400E8D854 /* OpenURLPanel.xib */; };
|
17342ABF0D5FD36400E8D854 /* OpenURLPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17342ABD0D5FD36400E8D854 /* OpenURLPanel.xib */; };
|
||||||
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */; };
|
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */; };
|
||||||
|
1738589B0E0D92DD00488CD4 /* SideBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 173858950E0D92DD00488CD4 /* SideBarController.m */; };
|
||||||
|
1738589D0E0D92DD00488CD4 /* SideWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 173858990E0D92DD00488CD4 /* SideWindowController.m */; };
|
||||||
1755E1F90BA0D2B600CA3560 /* PlaylistLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1755E1F70BA0D2B600CA3560 /* PlaylistLoader.m */; };
|
1755E1F90BA0D2B600CA3560 /* PlaylistLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1755E1F70BA0D2B600CA3560 /* PlaylistLoader.m */; };
|
||||||
1766C6930B911DF1004A7AE4 /* AudioScrobbler.m in Sources */ = {isa = PBXBuildFile; fileRef = 1766C68F0B911DF1004A7AE4 /* AudioScrobbler.m */; };
|
1766C6930B911DF1004A7AE4 /* AudioScrobbler.m in Sources */ = {isa = PBXBuildFile; fileRef = 1766C68F0B911DF1004A7AE4 /* AudioScrobbler.m */; };
|
||||||
1766C6950B911DF1004A7AE4 /* AudioScrobblerClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1766C6910B911DF1004A7AE4 /* AudioScrobblerClient.m */; };
|
1766C6950B911DF1004A7AE4 /* AudioScrobblerClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 1766C6910B911DF1004A7AE4 /* AudioScrobblerClient.m */; };
|
||||||
|
@ -506,6 +508,10 @@
|
||||||
17342ABE0D5FD36400E8D854 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/OpenURLPanel.xib; sourceTree = "<group>"; };
|
17342ABE0D5FD36400E8D854 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/OpenURLPanel.xib; sourceTree = "<group>"; };
|
||||||
173855FD0E0CC81F00488CD4 /* FileTreeOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTreeOutlineView.h; path = FileTree/FileTreeOutlineView.h; sourceTree = "<group>"; };
|
173855FD0E0CC81F00488CD4 /* FileTreeOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTreeOutlineView.h; path = FileTree/FileTreeOutlineView.h; sourceTree = "<group>"; };
|
||||||
173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTreeOutlineView.m; path = FileTree/FileTreeOutlineView.m; sourceTree = "<group>"; };
|
173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTreeOutlineView.m; path = FileTree/FileTreeOutlineView.m; sourceTree = "<group>"; };
|
||||||
|
173858940E0D92DD00488CD4 /* SideBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SideBarController.h; path = SideView/SideBarController.h; sourceTree = "<group>"; };
|
||||||
|
173858950E0D92DD00488CD4 /* SideBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SideBarController.m; path = SideView/SideBarController.m; sourceTree = "<group>"; };
|
||||||
|
173858980E0D92DD00488CD4 /* SideWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SideWindowController.h; path = SideView/SideWindowController.h; sourceTree = "<group>"; };
|
||||||
|
173858990E0D92DD00488CD4 /* SideWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SideWindowController.m; path = SideView/SideWindowController.m; sourceTree = "<group>"; };
|
||||||
1755E1F60BA0D2B600CA3560 /* PlaylistLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlaylistLoader.h; sourceTree = "<group>"; };
|
1755E1F60BA0D2B600CA3560 /* PlaylistLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PlaylistLoader.h; sourceTree = "<group>"; };
|
||||||
1755E1F70BA0D2B600CA3560 /* PlaylistLoader.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PlaylistLoader.m; sourceTree = "<group>"; };
|
1755E1F70BA0D2B600CA3560 /* PlaylistLoader.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PlaylistLoader.m; sourceTree = "<group>"; };
|
||||||
1766C68E0B911DF1004A7AE4 /* AudioScrobbler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AudioScrobbler.h; sourceTree = "<group>"; };
|
1766C68E0B911DF1004A7AE4 /* AudioScrobbler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AudioScrobbler.h; sourceTree = "<group>"; };
|
||||||
|
@ -907,10 +913,14 @@
|
||||||
179DFCDF0E0C5A130064A77A /* SideView */ = {
|
179DFCDF0E0C5A130064A77A /* SideView */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
179D02EA0E0CB0B00064A77A /* SideView.h */,
|
173858940E0D92DD00488CD4 /* SideBarController.h */,
|
||||||
179D02EB0E0CB0B00064A77A /* SideView.m */,
|
173858950E0D92DD00488CD4 /* SideBarController.m */,
|
||||||
|
173858980E0D92DD00488CD4 /* SideWindowController.h */,
|
||||||
|
173858990E0D92DD00488CD4 /* SideWindowController.m */,
|
||||||
179D02EC0E0CB0B00064A77A /* SideViewController.h */,
|
179D02EC0E0CB0B00064A77A /* SideViewController.h */,
|
||||||
179D02ED0E0CB0B00064A77A /* SideViewController.m */,
|
179D02ED0E0CB0B00064A77A /* SideViewController.m */,
|
||||||
|
179D02EA0E0CB0B00064A77A /* SideView.h */,
|
||||||
|
179D02EB0E0CB0B00064A77A /* SideView.m */,
|
||||||
);
|
);
|
||||||
name = SideView;
|
name = SideView;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -1758,6 +1768,8 @@
|
||||||
179D03270E0CB2500064A77A /* PathWatcher.m in Sources */,
|
179D03270E0CB2500064A77A /* PathWatcher.m in Sources */,
|
||||||
179D03280E0CB2500064A77A /* SmartFolderNode.m in Sources */,
|
179D03280E0CB2500064A77A /* SmartFolderNode.m in Sources */,
|
||||||
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */,
|
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */,
|
||||||
|
1738589B0E0D92DD00488CD4 /* SideBarController.m in Sources */,
|
||||||
|
1738589D0E0D92DD00488CD4 /* SideWindowController.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
<string key="IBDocument.HIToolboxVersion">352.00</string>
|
<string key="IBDocument.HIToolboxVersion">352.00</string>
|
||||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<integer value="1324"/>
|
|
||||||
<integer value="1849"/>
|
<integer value="1849"/>
|
||||||
<integer value="463"/>
|
|
||||||
<integer value="2123"/>
|
|
||||||
<integer value="1063"/>
|
|
||||||
<integer value="513"/>
|
<integer value="513"/>
|
||||||
|
<integer value="463"/>
|
||||||
|
<integer value="1324"/>
|
||||||
|
<integer value="1063"/>
|
||||||
|
<integer value="2123"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
@ -1694,23 +1694,38 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMenuItem" id="702725944">
|
<object class="NSMenuItem" id="702725944">
|
||||||
<reference key="NSMenu" ref="130084864"/>
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
<string key="NSTitle">Side View</string>
|
<string key="NSTitle">Sidebar</string>
|
||||||
<string key="NSKeyEquiv"/>
|
<string key="NSKeyEquiv"/>
|
||||||
<int key="NSMnemonicLoc">2147483647</int>
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
<reference key="NSOnImage" ref="448348853"/>
|
<reference key="NSOnImage" ref="448348853"/>
|
||||||
<reference key="NSMixedImage" ref="415275279"/>
|
<reference key="NSMixedImage" ref="415275279"/>
|
||||||
<string key="NSAction">submenuAction:</string>
|
<string key="NSAction">submenuAction:</string>
|
||||||
<object class="NSMenu" key="NSSubmenu" id="188765993">
|
<object class="NSMenu" key="NSSubmenu" id="188765993">
|
||||||
<string key="NSTitle">Side View</string>
|
<string key="NSTitle">Sidebar</string>
|
||||||
<object class="NSMutableArray" key="NSMenuItems">
|
<object class="NSMutableArray" key="NSMenuItems">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
<bool key="NSNoAutoenable">YES</bool>
|
<bool key="NSNoAutoenable">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="NSMenuItem" id="157922357">
|
||||||
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
|
<string key="NSTitle">Window</string>
|
||||||
|
<string key="NSKeyEquiv"/>
|
||||||
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
|
<reference key="NSOnImage" ref="448348853"/>
|
||||||
|
<reference key="NSMixedImage" ref="415275279"/>
|
||||||
|
<string key="NSAction">submenuAction:</string>
|
||||||
|
<object class="NSMenu" key="NSSubmenu" id="121209843">
|
||||||
|
<string key="NSTitle">Window</string>
|
||||||
|
<object class="NSMutableArray" key="NSMenuItems">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="NSMenuItem" id="665562447">
|
<object class="NSMenuItem" id="665562447">
|
||||||
<reference key="NSMenu" ref="130084864"/>
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
<string key="NSTitle">Toggle Orientation</string>
|
<string key="NSTitle">Toggle Sidebar Orientation</string>
|
||||||
<string key="NSKeyEquiv"/>
|
<string key="NSKeyEquiv"/>
|
||||||
<int key="NSMnemonicLoc">2147483647</int>
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
<reference key="NSOnImage" ref="448348853"/>
|
<reference key="NSOnImage" ref="448348853"/>
|
||||||
|
@ -1718,7 +1733,7 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMenuItem" id="268734593">
|
<object class="NSMenuItem" id="268734593">
|
||||||
<reference key="NSMenu" ref="130084864"/>
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
<string key="NSTitle">Show/Hide Side View</string>
|
<string key="NSTitle">Show/Hide Sidebar</string>
|
||||||
<string key="NSKeyEquiv">d</string>
|
<string key="NSKeyEquiv">d</string>
|
||||||
<int key="NSKeyEquivModMask">1048576</int>
|
<int key="NSKeyEquivModMask">1048576</int>
|
||||||
<int key="NSMnemonicLoc">2147483647</int>
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
|
@ -1735,6 +1750,16 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<reference key="NSOnImage" ref="448348853"/>
|
<reference key="NSOnImage" ref="448348853"/>
|
||||||
<reference key="NSMixedImage" ref="415275279"/>
|
<reference key="NSMixedImage" ref="415275279"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="NSMenuItem" id="261953318">
|
||||||
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
|
<bool key="NSIsDisabled">YES</bool>
|
||||||
|
<bool key="NSIsSeparator">YES</bool>
|
||||||
|
<string key="NSTitle"/>
|
||||||
|
<string key="NSKeyEquiv"/>
|
||||||
|
<int key="NSMnemonicLoc">2147483647</int>
|
||||||
|
<reference key="NSOnImage" ref="448348853"/>
|
||||||
|
<reference key="NSMixedImage" ref="415275279"/>
|
||||||
|
</object>
|
||||||
<object class="NSMenuItem" id="517860479">
|
<object class="NSMenuItem" id="517860479">
|
||||||
<reference key="NSMenu" ref="130084864"/>
|
<reference key="NSMenu" ref="130084864"/>
|
||||||
<string key="NSTitle">Hide Playlist</string>
|
<string key="NSTitle">Hide Playlist</string>
|
||||||
|
@ -3333,8 +3358,11 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
|
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
|
||||||
<bool key="NSFilterRestrictsInsertion">YES</bool>
|
<bool key="NSFilterRestrictsInsertion">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSCustomObject" id="219305080">
|
<object class="NSCustomObject" id="366497202">
|
||||||
<string key="NSClassName">SideViewController</string>
|
<string key="NSClassName">SideBarController</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSCustomObject" id="597913418">
|
||||||
|
<string key="NSClassName">SideWindowController</string>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||||
|
@ -5890,59 +5918,67 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBOutletConnection" key="connection">
|
<object class="IBOutletConnection" key="connection">
|
||||||
<string key="label">splitView</string>
|
<string key="label">sideViewMenu</string>
|
||||||
<reference key="source" ref="219305080"/>
|
<reference key="source" ref="597913418"/>
|
||||||
<reference key="destination" ref="640589646"/>
|
<reference key="destination" ref="121209843"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">2153</int>
|
<int key="connectionID">2174</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBOutletConnection" key="connection">
|
<object class="IBOutletConnection" key="connection">
|
||||||
<string key="label">sideViewMenu</string>
|
<string key="label">sideViewMenu</string>
|
||||||
<reference key="source" ref="219305080"/>
|
<reference key="source" ref="366497202"/>
|
||||||
<reference key="destination" ref="188765993"/>
|
<reference key="destination" ref="188765993"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">2159</int>
|
<int key="connectionID">2175</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">toggleVertical:</string>
|
<string key="label">toggleVertical:</string>
|
||||||
<reference key="source" ref="219305080"/>
|
<reference key="source" ref="366497202"/>
|
||||||
<reference key="destination" ref="665562447"/>
|
<reference key="destination" ref="665562447"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">2161</int>
|
<int key="connectionID">2176</int>
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">playlistView</string>
|
|
||||||
<reference key="source" ref="219305080"/>
|
|
||||||
<reference key="destination" ref="381323260"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">2163</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">delegate</string>
|
|
||||||
<reference key="source" ref="640589646"/>
|
|
||||||
<reference key="destination" ref="219305080"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">2164</int>
|
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBActionConnection" key="connection">
|
<object class="IBActionConnection" key="connection">
|
||||||
<string key="label">toggleSideView:</string>
|
<string key="label">toggleSideBar:</string>
|
||||||
<reference key="source" ref="219305080"/>
|
<reference key="source" ref="366497202"/>
|
||||||
<reference key="destination" ref="268734593"/>
|
<reference key="destination" ref="268734593"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">2166</int>
|
<int key="connectionID">2177</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBConnectionRecord">
|
<object class="IBConnectionRecord">
|
||||||
<object class="IBOutletConnection" key="connection">
|
<object class="IBOutletConnection" key="connection">
|
||||||
<string key="label">playlistLoader</string>
|
<string key="label">playlistLoader</string>
|
||||||
<reference key="source" ref="219305080"/>
|
<reference key="source" ref="597913418"/>
|
||||||
<reference key="destination" ref="362908833"/>
|
<reference key="destination" ref="362908833"/>
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">2167</int>
|
<int key="connectionID">2178</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">playlistLoader</string>
|
||||||
|
<reference key="source" ref="366497202"/>
|
||||||
|
<reference key="destination" ref="362908833"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">2179</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">playlistView</string>
|
||||||
|
<reference key="source" ref="366497202"/>
|
||||||
|
<reference key="destination" ref="381323260"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">2180</int>
|
||||||
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">splitView</string>
|
||||||
|
<reference key="source" ref="366497202"/>
|
||||||
|
<reference key="destination" ref="640589646"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">2181</int>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
|
@ -7453,6 +7489,8 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<reference ref="702725944"/>
|
<reference ref="702725944"/>
|
||||||
<reference ref="665562447"/>
|
<reference ref="665562447"/>
|
||||||
<reference ref="268734593"/>
|
<reference ref="268734593"/>
|
||||||
|
<reference ref="261953318"/>
|
||||||
|
<reference ref="157922357"/>
|
||||||
</object>
|
</object>
|
||||||
<reference key="parent" ref="313099820"/>
|
<reference key="parent" ref="313099820"/>
|
||||||
</object>
|
</object>
|
||||||
|
@ -7807,11 +7845,6 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<reference key="object" ref="982563044"/>
|
<reference key="object" ref="982563044"/>
|
||||||
<reference key="parent" ref="756482179"/>
|
<reference key="parent" ref="756482179"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">2151</int>
|
|
||||||
<reference key="object" ref="219305080"/>
|
|
||||||
<reference key="parent" ref="293114310"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
<object class="IBObjectRecord">
|
||||||
<int key="objectID">1853</int>
|
<int key="objectID">1853</int>
|
||||||
<reference key="object" ref="1070603681"/>
|
<reference key="object" ref="1070603681"/>
|
||||||
|
@ -7854,6 +7887,38 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<reference key="object" ref="268734593"/>
|
<reference key="object" ref="268734593"/>
|
||||||
<reference key="parent" ref="130084864"/>
|
<reference key="parent" ref="130084864"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">2168</int>
|
||||||
|
<reference key="object" ref="261953318"/>
|
||||||
|
<reference key="parent" ref="130084864"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">2169</int>
|
||||||
|
<reference key="object" ref="157922357"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="121209843"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="130084864"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">2170</int>
|
||||||
|
<reference key="object" ref="121209843"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="157922357"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">2172</int>
|
||||||
|
<reference key="object" ref="366497202"/>
|
||||||
|
<reference key="parent" ref="293114310"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">2173</int>
|
||||||
|
<reference key="object" ref="597913418"/>
|
||||||
|
<reference key="parent" ref="293114310"/>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
@ -8207,13 +8272,18 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<string>21.editorWindowContentRectSynchronizationRect</string>
|
<string>21.editorWindowContentRectSynchronizationRect</string>
|
||||||
<string>21.windowTemplate.hasMaxSize</string>
|
<string>21.windowTemplate.hasMaxSize</string>
|
||||||
<string>21.windowTemplate.maxSize</string>
|
<string>21.windowTemplate.maxSize</string>
|
||||||
<string>2151.IBPluginDependency</string>
|
|
||||||
<string>2155.IBPluginDependency</string>
|
<string>2155.IBPluginDependency</string>
|
||||||
<string>2156.IBPluginDependency</string>
|
<string>2156.IBPluginDependency</string>
|
||||||
<string>2157.IBEditorWindowLastContentRect</string>
|
<string>2157.IBEditorWindowLastContentRect</string>
|
||||||
<string>2157.IBPluginDependency</string>
|
<string>2157.IBPluginDependency</string>
|
||||||
<string>2160.IBPluginDependency</string>
|
<string>2160.IBPluginDependency</string>
|
||||||
<string>2165.IBPluginDependency</string>
|
<string>2165.IBPluginDependency</string>
|
||||||
|
<string>2168.IBPluginDependency</string>
|
||||||
|
<string>2169.IBPluginDependency</string>
|
||||||
|
<string>2170.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>2170.IBPluginDependency</string>
|
||||||
|
<string>2172.IBPluginDependency</string>
|
||||||
|
<string>2173.IBPluginDependency</string>
|
||||||
<string>218.CustomClassName</string>
|
<string>218.CustomClassName</string>
|
||||||
<string>218.IBPluginDependency</string>
|
<string>218.IBPluginDependency</string>
|
||||||
<string>218.ImportedFromIB2</string>
|
<string>218.ImportedFromIB2</string>
|
||||||
|
@ -8677,7 +8747,7 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<reference ref="9"/>
|
<reference ref="9"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{342, 763}, {237, 213}}</string>
|
<string>{{342, 733}, {277, 243}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{257, 573}, {237, 163}}</string>
|
<string>{{257, 573}, {237, 163}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
@ -8729,9 +8799,9 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<reference ref="9"/>
|
<reference ref="9"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<reference ref="9"/>
|
<reference ref="9"/>
|
||||||
<string>{{218, 272}, {691, 397}}</string>
|
<string>{{347, 268}, {691, 397}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{218, 272}, {691, 397}}</string>
|
<string>{{347, 268}, {691, 397}}</string>
|
||||||
<reference ref="9"/>
|
<reference ref="9"/>
|
||||||
<reference ref="9"/>
|
<reference ref="9"/>
|
||||||
<string>{{25, 14}, {683, 396}}</string>
|
<string>{{25, 14}, {683, 396}}</string>
|
||||||
|
@ -8739,8 +8809,13 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
<string>{3.40282e+38, 3.40282e+38}</string>
|
<string>{3.40282e+38, 3.40282e+38}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>{{619, 920}, {64, 6}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{579, 920}, {64, 6}}</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>{{619, 900}, {64, 6}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
@ -8939,7 +9014,7 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<nil key="sourceID"/>
|
<nil key="sourceID"/>
|
||||||
<int key="maxID">2167</int>
|
<int key="maxID">2181</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
@ -9513,43 +9588,66 @@ ZSwgSW5jLiwgMjAwOAA</bytes>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
<string key="className">SideViewController</string>
|
<string key="className">SideBarController</string>
|
||||||
<string key="superclassName">NSObject</string>
|
<string key="superclassName">SideController</string>
|
||||||
<object class="NSMutableDictionary" key="actions">
|
<object class="NSMutableDictionary" key="actions">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>selectSideView:</string>
|
<string>toggleSideBar:</string>
|
||||||
<string>toggleSideView:</string>
|
|
||||||
<string>toggleVertical:</string>
|
<string>toggleVertical:</string>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableArray" key="dict.values">
|
<object class="NSMutableArray" key="dict.values">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>id</string>
|
<string>id</string>
|
||||||
<string>id</string>
|
<string>id</string>
|
||||||
<string>id</string>
|
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableDictionary" key="outlets">
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>playlistLoader</string>
|
|
||||||
<string>playlistView</string>
|
<string>playlistView</string>
|
||||||
<string>sideViewMenu</string>
|
|
||||||
<string>splitView</string>
|
<string>splitView</string>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableArray" key="dict.values">
|
<object class="NSMutableArray" key="dict.values">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>PlaylistLoader</string>
|
|
||||||
<string>NSView</string>
|
<string>NSView</string>
|
||||||
<string>NSMenu</string>
|
|
||||||
<string>NSSplitView</string>
|
<string>NSSplitView</string>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
<string key="majorKey">IBProjectSource</string>
|
<string key="majorKey">IBProjectSource</string>
|
||||||
<string key="minorKey">SideView/SideViewController.h</string>
|
<string key="minorKey">SideBarController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">SideController</string>
|
||||||
|
<string key="superclassName">NSObject</string>
|
||||||
|
<object class="NSMutableDictionary" key="outlets">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>playlistLoader</string>
|
||||||
|
<string>sideViewMenu</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSMutableArray" key="dict.values">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>PlaylistLoader</string>
|
||||||
|
<string>NSMenu</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">SideView/SideController.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">SideWindowController</string>
|
||||||
|
<string key="superclassName">SideController</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">SideWindowController.h</string>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
//
|
||||||
|
// SideBarController.h
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/21/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#import "SideViewController.h"
|
||||||
|
|
||||||
|
@class SideView;
|
||||||
|
|
||||||
|
@interface SideBarController : SideViewController {
|
||||||
|
IBOutlet NSSplitView *splitView;
|
||||||
|
IBOutlet NSView *playlistView;
|
||||||
|
SideView *sideView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)toggleSideBar:(id)sender;
|
||||||
|
- (IBAction)toggleVertical:(id)sender;
|
||||||
|
|
||||||
|
- (void)showSideBar;
|
||||||
|
- (void)hideSideBar;
|
||||||
|
- (BOOL)sideBarIsHidden;
|
||||||
|
|
||||||
|
- (void)setDividerPosition:(float)position;
|
||||||
|
- (float)dividerPosition;
|
||||||
|
|
||||||
|
- (SideView *)sideView;
|
||||||
|
- (void)setSideView:(SideView *)sideView;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,261 @@
|
||||||
|
//
|
||||||
|
// SplitViewController.m
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/20/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "SideBarController.h"
|
||||||
|
|
||||||
|
#import "SideView.h"
|
||||||
|
|
||||||
|
@implementation SideBarController
|
||||||
|
|
||||||
|
+ (void)initialize
|
||||||
|
{
|
||||||
|
NSMutableDictionary *userDefaultsValuesDict = [NSMutableDictionary dictionary];
|
||||||
|
|
||||||
|
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"sideBarVertical"];
|
||||||
|
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:NO] forKey:@"showSideBar"];
|
||||||
|
[userDefaultsValuesDict setObject:[NSNumber numberWithFloat:100.0] forKey:@"sideBarDividerPosition"];
|
||||||
|
[userDefaultsValuesDict setObject:@"File Tree" forKey:@"lastSideBar"];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (id)init
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self)
|
||||||
|
{
|
||||||
|
[sideViewNibs setObject:@"FileTree" forKey:@"File Tree"];
|
||||||
|
[sideViewNibs setObject:@"FileTree" forKey:@"Another File Tree!"];
|
||||||
|
|
||||||
|
sideView = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[sideView release];
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)awakeFromNib
|
||||||
|
{
|
||||||
|
[super awakeFromNib];
|
||||||
|
|
||||||
|
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"showSideBar"])
|
||||||
|
{
|
||||||
|
[self showSideBar];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"sideBarVertical"])
|
||||||
|
{
|
||||||
|
[self toggleVertical:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)selectSideViewWithTitle:(NSString *)title
|
||||||
|
{
|
||||||
|
SideView *newSideView = [self sideViewForTitle:title];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setObject:title forKey:@"lastSideBar"];
|
||||||
|
|
||||||
|
if (newSideView == [self sideView])
|
||||||
|
{
|
||||||
|
[self toggleSideBar:self];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self setSideView: newSideView];
|
||||||
|
[self showSideBar];
|
||||||
|
}
|
||||||
|
|
||||||
|
[splitView adjustSubviews];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)toggleSideBar:(id)sender
|
||||||
|
{
|
||||||
|
//Show/hide current
|
||||||
|
if ([self sideBarIsHidden])
|
||||||
|
{
|
||||||
|
[self showSideBar];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self hideSideBar];
|
||||||
|
}
|
||||||
|
|
||||||
|
[splitView adjustSubviews];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (IBAction)toggleVertical:(id)sender
|
||||||
|
{
|
||||||
|
[splitView setVertical:![splitView isVertical]];
|
||||||
|
|
||||||
|
if (![self sideBarIsHidden])
|
||||||
|
{
|
||||||
|
[self setSideView:[self sideView]];
|
||||||
|
[self showSideBar];
|
||||||
|
}
|
||||||
|
|
||||||
|
[splitView adjustSubviews];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:[splitView isVertical] forKey:@"sideBarVertical"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (SideView *)sideView
|
||||||
|
{
|
||||||
|
if (sideView == nil)
|
||||||
|
{
|
||||||
|
[self setSideView:[self sideViewForTitle:[[NSUserDefaults standardUserDefaults] objectForKey:@"lastSideBar"]]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return sideView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setSideView:(SideView *)newSideView
|
||||||
|
{
|
||||||
|
[newSideView retain];
|
||||||
|
sideView = newSideView;
|
||||||
|
[sideView release];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showSideBar
|
||||||
|
{
|
||||||
|
if ([splitView isVertical]) {
|
||||||
|
[splitView setSubviews:[NSArray arrayWithObjects:[[self sideView] view], playlistView, nil]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[splitView setSubviews:[NSArray arrayWithObjects:playlistView, [[self sideView] view], nil]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self setDividerPosition: [[NSUserDefaults standardUserDefaults] floatForKey:@"sideBarDividerPosition"]];
|
||||||
|
|
||||||
|
[[[sideView view] window] makeFirstResponder:[sideView firstResponder]];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showSideBar"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)hideSideBar
|
||||||
|
{
|
||||||
|
[splitView setSubviews:[NSArray arrayWithObject:playlistView]];
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showSideBar"];
|
||||||
|
|
||||||
|
[[playlistView window] makeFirstResponder:playlistView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)sideBarIsHidden
|
||||||
|
{
|
||||||
|
return ([[splitView subviews] count] == 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)splitView:(NSSplitView *)aSplitView canCollapseSubview:(NSView *)subview
|
||||||
|
{
|
||||||
|
return (subview != playlistView);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (BOOL)splitView:(NSSplitView *)aSplitView shouldCollapseSubview:(NSView *)subview forDoubleClickOnDividerAtIndex:(NSInteger)dividerIndex
|
||||||
|
{
|
||||||
|
return (subview != playlistView);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
//Update default
|
||||||
|
if (![self sideBarIsHidden])
|
||||||
|
{
|
||||||
|
[[NSUserDefaults standardUserDefaults] setFloat:[self dividerPosition] forKey:@"sideBarDividerPosition"];
|
||||||
|
NSLog(@"DIVIDER POSITION: %f", [self dividerPosition]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize: (NSSize)oldSize
|
||||||
|
{
|
||||||
|
if ([self sideBarIsHidden])
|
||||||
|
{
|
||||||
|
[splitView adjustSubviews];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CGFloat dividerThickness = [splitView dividerThickness];
|
||||||
|
|
||||||
|
NSRect sideRect = [[sideView view] frame];
|
||||||
|
NSRect playlistRect = [playlistView frame];
|
||||||
|
|
||||||
|
NSRect newFrame = [splitView frame];
|
||||||
|
|
||||||
|
if ([splitView isVertical])
|
||||||
|
{
|
||||||
|
NSLog(@"VERTICAL");
|
||||||
|
sideRect.size.width = [[NSUserDefaults standardUserDefaults] floatForKey:@"sideBarDividerPosition"];
|
||||||
|
sideRect.size.height = newFrame.size.height;
|
||||||
|
sideRect.origin = NSMakePoint(0, 0);
|
||||||
|
|
||||||
|
playlistRect.size.width = newFrame.size.width - sideRect.size.width - dividerThickness;
|
||||||
|
playlistRect.size.height = newFrame.size.height;
|
||||||
|
playlistRect.origin.x = sideRect.size.width + dividerThickness;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSLog(@"NOT VERTICAL");
|
||||||
|
sideRect.size.height = [[NSUserDefaults standardUserDefaults] floatForKey:@"sideBarDividerPosition"];
|
||||||
|
sideRect.size.width = newFrame.size.width;
|
||||||
|
|
||||||
|
playlistRect.origin = NSMakePoint(0, 0);
|
||||||
|
playlistRect.size.width = newFrame.size.width;
|
||||||
|
playlistRect.size.height = newFrame.size.height - sideRect.size.height - dividerThickness;
|
||||||
|
|
||||||
|
sideRect.origin.y = playlistRect.size.height + dividerThickness;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NSLog(@"SIDE: %f,%f %fx%f", sideRect.origin.x, sideRect.origin.y, sideRect.size.width, sideRect.size.height);
|
||||||
|
NSLog(@"Playlist: %f,%f %fx%f", playlistRect.origin.x, playlistRect.origin.y, playlistRect.size.width, playlistRect.size.height);
|
||||||
|
|
||||||
|
[[sideView view] setFrame:sideRect];
|
||||||
|
[playlistView setFrame:playlistRect];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (float)dividerPosition
|
||||||
|
{
|
||||||
|
if ([splitView isVertical])
|
||||||
|
{
|
||||||
|
return [[sideView view] frame].size.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [[sideView view] frame].size.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setDividerPosition:(float)position
|
||||||
|
{
|
||||||
|
float actualPosition = position;
|
||||||
|
if (![splitView isVertical])
|
||||||
|
{
|
||||||
|
actualPosition = ([splitView frame].size.height - position);
|
||||||
|
}
|
||||||
|
|
||||||
|
[splitView adjustSubviews];
|
||||||
|
[splitView setPosition:actualPosition ofDividerAtIndex:0];
|
||||||
|
|
||||||
|
[[NSUserDefaults standardUserDefaults] setFloat:position forKey:@"sideBarDividerPosition"];
|
||||||
|
NSLog(@"SETTING POSITION: %f (%f) == %f?", actualPosition, position, [self dividerPosition]);
|
||||||
|
|
||||||
|
NSRect sideRect = [[sideView view] frame];
|
||||||
|
NSRect playlistRect = [playlistView frame];
|
||||||
|
NSLog(@"SIDE: %f,%f %fx%f", sideRect.origin.x, sideRect.origin.y, sideRect.size.width, sideRect.size.height);
|
||||||
|
NSLog(@"Playlist: %f,%f %fx%f", playlistRect.origin.x, playlistRect.origin.y, playlistRect.size.width, playlistRect.size.height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
|
@ -18,8 +18,7 @@
|
||||||
{
|
{
|
||||||
controller = c;
|
controller = c;
|
||||||
|
|
||||||
BOOL r = [NSBundle loadNibNamed:nibName owner:self];
|
[NSBundle loadNibNamed:nibName owner:self];
|
||||||
NSLog(@"LOADED NIB: %i", r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -39,4 +38,5 @@
|
||||||
{
|
{
|
||||||
[controller addToPlaylist:urls];
|
[controller addToPlaylist:urls];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -12,33 +12,17 @@
|
||||||
@class PlaylistLoader;
|
@class PlaylistLoader;
|
||||||
|
|
||||||
@interface SideViewController : NSObject {
|
@interface SideViewController : NSObject {
|
||||||
IBOutlet NSSplitView *splitView;
|
|
||||||
IBOutlet NSView *playlistView;
|
|
||||||
IBOutlet NSMenu *sideViewMenu;
|
IBOutlet NSMenu *sideViewMenu;
|
||||||
IBOutlet PlaylistLoader *playlistLoader;
|
IBOutlet PlaylistLoader *playlistLoader;
|
||||||
|
|
||||||
NSMutableDictionary *sideViewNibs;
|
NSMutableDictionary *sideViewNibs;
|
||||||
NSMutableDictionary *sideViews;
|
NSMutableDictionary *sideViews;
|
||||||
SideView *sideView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)toggleVertical:(id)sender;
|
|
||||||
- (IBAction)selectSideView:(id)sender;
|
|
||||||
- (IBAction)toggleSideView:(id)sender;
|
|
||||||
|
|
||||||
- (void)showSideView;
|
|
||||||
- (void)hideSideView;
|
|
||||||
- (BOOL)sideViewIsHidden;
|
|
||||||
|
|
||||||
|
|
||||||
- (SideView *)sideViewForTitle:(NSString *)title;
|
- (SideView *)sideViewForTitle:(NSString *)title;
|
||||||
|
- (void)selectSideViewWithTitle:(NSString *)title; //To be overridden by subclass
|
||||||
- (SideView *)sideView;
|
|
||||||
- (void)setSideView:(SideView *)newSideView;
|
|
||||||
|
|
||||||
- (float)dividerPosition;
|
|
||||||
- (void)setDividerPosition:(float)position;
|
|
||||||
|
|
||||||
//Helper for adding files to the playlist
|
//Helper for adding files to the playlist
|
||||||
- (void) addToPlaylist:(NSArray *)urls;
|
- (void) addToPlaylist:(NSArray *)urls;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -13,19 +13,6 @@
|
||||||
|
|
||||||
@implementation SideViewController
|
@implementation SideViewController
|
||||||
|
|
||||||
+ (void)initialize
|
|
||||||
{
|
|
||||||
NSMutableDictionary *userDefaultsValuesDict = [NSMutableDictionary dictionary];
|
|
||||||
|
|
||||||
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"sideViewVertical"];
|
|
||||||
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:NO] forKey:@"showSideView"];
|
|
||||||
[userDefaultsValuesDict setObject:[NSNumber numberWithFloat:100.0] forKey:@"sideViewDividerPosition"];
|
|
||||||
[userDefaultsValuesDict setObject:@"File Tree" forKey:@"lastSideViewTitle"];
|
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
@ -33,8 +20,6 @@
|
||||||
{
|
{
|
||||||
sideViewNibs = [[NSMutableDictionary alloc] init];
|
sideViewNibs = [[NSMutableDictionary alloc] init];
|
||||||
sideViews = [[NSMutableDictionary alloc] init];
|
sideViews = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
sideView = nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -45,15 +30,11 @@
|
||||||
[sideViews release];
|
[sideViews release];
|
||||||
[sideViewNibs release];
|
[sideViewNibs release];
|
||||||
|
|
||||||
[sideView release];
|
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)awakeFromNib
|
- (void)awakeFromNib
|
||||||
{
|
{
|
||||||
[sideViewNibs setObject:@"FileTree" forKey:@"File Tree"];
|
|
||||||
|
|
||||||
for (NSString *title in sideViewNibs)
|
for (NSString *title in sideViewNibs)
|
||||||
{
|
{
|
||||||
//Create menu item
|
//Create menu item
|
||||||
|
@ -62,19 +43,6 @@
|
||||||
[item setRepresentedObject:title];
|
[item setRepresentedObject:title];
|
||||||
[sideViewMenu addItem:item];
|
[sideViewMenu addItem:item];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"showSideView"])
|
|
||||||
{
|
|
||||||
[self showSideView];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:@"sideViewVertical"])
|
|
||||||
{
|
|
||||||
[self toggleVertical:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
NSLog(@"TWICE?!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SideView *)sideViewForTitle:(NSString *)title
|
- (SideView *)sideViewForTitle:(NSString *)title
|
||||||
|
@ -89,8 +57,6 @@
|
||||||
|
|
||||||
[newSideView release];
|
[newSideView release];
|
||||||
}
|
}
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:title forKey:@"lastSideViewTitle"];
|
|
||||||
|
|
||||||
return newSideView;
|
return newSideView;
|
||||||
}
|
}
|
||||||
|
@ -98,194 +64,13 @@
|
||||||
- (IBAction)selectSideView:(id)sender
|
- (IBAction)selectSideView:(id)sender
|
||||||
{
|
{
|
||||||
NSString *title = [sender representedObject];
|
NSString *title = [sender representedObject];
|
||||||
SideView *newSideView = [self sideViewForTitle:title];
|
|
||||||
|
|
||||||
if (newSideView == [self sideView])
|
[self selectSideViewWithTitle:title];
|
||||||
{
|
|
||||||
[self toggleSideView:self];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self setSideView: newSideView];
|
|
||||||
[self showSideView];
|
|
||||||
}
|
|
||||||
|
|
||||||
[splitView adjustSubviews];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)toggleSideView:(id)sender
|
- (void)selectSideViewWithTitle:(NSString *)title
|
||||||
{
|
{
|
||||||
//Show/hide current
|
//To be overridden
|
||||||
if ([self sideViewIsHidden])
|
|
||||||
{
|
|
||||||
[self showSideView];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self hideSideView];
|
|
||||||
}
|
|
||||||
|
|
||||||
[splitView adjustSubviews];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleVertical:(id)sender
|
|
||||||
{
|
|
||||||
[splitView setVertical:![splitView isVertical]];
|
|
||||||
|
|
||||||
if (![self sideViewIsHidden])
|
|
||||||
{
|
|
||||||
[self setSideView:[self sideView]];
|
|
||||||
[self showSideView];
|
|
||||||
}
|
|
||||||
|
|
||||||
[splitView adjustSubviews];
|
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:[splitView isVertical] forKey:@"sideViewVertical"];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (SideView *)sideView
|
|
||||||
{
|
|
||||||
if (sideView == nil)
|
|
||||||
{
|
|
||||||
[self setSideView:[self sideViewForTitle:[[NSUserDefaults standardUserDefaults] objectForKey:@"lastSideViewTitle"]]];
|
|
||||||
}
|
|
||||||
|
|
||||||
return sideView;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setSideView:(SideView *)newSideView
|
|
||||||
{
|
|
||||||
[newSideView retain];
|
|
||||||
sideView = newSideView;
|
|
||||||
[sideView release];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)showSideView
|
|
||||||
{
|
|
||||||
if ([splitView isVertical]) {
|
|
||||||
[splitView setSubviews:[NSArray arrayWithObjects:[[self sideView] view], playlistView, nil]];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[splitView setSubviews:[NSArray arrayWithObjects:playlistView, [[self sideView] view], nil]];
|
|
||||||
}
|
|
||||||
|
|
||||||
[self setDividerPosition: [[NSUserDefaults standardUserDefaults] floatForKey:@"sideViewDividerPosition"]];
|
|
||||||
|
|
||||||
[[[sideView view] window] makeFirstResponder:[sideView firstResponder]];
|
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showSideView"];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)hideSideView
|
|
||||||
{
|
|
||||||
[splitView setSubviews:[NSArray arrayWithObject:playlistView]];
|
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"showSideView"];
|
|
||||||
|
|
||||||
[[playlistView window] makeFirstResponder:playlistView];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)sideViewIsHidden
|
|
||||||
{
|
|
||||||
return ([[splitView subviews] count] == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)splitView:(NSSplitView *)aSplitView canCollapseSubview:(NSView *)subview
|
|
||||||
{
|
|
||||||
return (subview != playlistView);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (BOOL)splitView:(NSSplitView *)aSplitView shouldCollapseSubview:(NSView *)subview forDoubleClickOnDividerAtIndex:(NSInteger)dividerIndex
|
|
||||||
{
|
|
||||||
return (subview != playlistView);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
//Update default
|
|
||||||
if (![self sideViewIsHidden])
|
|
||||||
{
|
|
||||||
[[NSUserDefaults standardUserDefaults] setFloat:[self dividerPosition] forKey:@"sideViewDividerPosition"];
|
|
||||||
NSLog(@"DIVIDER POSITION: %f", [self dividerPosition]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize: (NSSize)oldSize
|
|
||||||
{
|
|
||||||
if ([self sideViewIsHidden])
|
|
||||||
{
|
|
||||||
[splitView adjustSubviews];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CGFloat dividerThickness = [splitView dividerThickness];
|
|
||||||
|
|
||||||
NSRect sideRect = [[sideView view] frame];
|
|
||||||
NSRect playlistRect = [playlistView frame];
|
|
||||||
|
|
||||||
NSRect newFrame = [splitView frame];
|
|
||||||
|
|
||||||
if ([splitView isVertical])
|
|
||||||
{
|
|
||||||
NSLog(@"VERTICAL");
|
|
||||||
sideRect.size.width = [[NSUserDefaults standardUserDefaults] floatForKey:@"sideViewDividerPosition"];
|
|
||||||
sideRect.size.height = newFrame.size.height;
|
|
||||||
sideRect.origin = NSMakePoint(0, 0);
|
|
||||||
|
|
||||||
playlistRect.size.width = newFrame.size.width - sideRect.size.width - dividerThickness;
|
|
||||||
playlistRect.size.height = newFrame.size.height;
|
|
||||||
playlistRect.origin.x = sideRect.size.width + dividerThickness;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSLog(@"NOT VERTICAL");
|
|
||||||
sideRect.size.height = [[NSUserDefaults standardUserDefaults] floatForKey:@"sideViewDividerPosition"];
|
|
||||||
sideRect.size.width = newFrame.size.width;
|
|
||||||
|
|
||||||
playlistRect.origin = NSMakePoint(0, 0);
|
|
||||||
playlistRect.size.width = newFrame.size.width;
|
|
||||||
playlistRect.size.height = newFrame.size.height - sideRect.size.height - dividerThickness;
|
|
||||||
|
|
||||||
sideRect.origin.y = playlistRect.size.height + dividerThickness;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NSLog(@"SIDE: %f,%f %fx%f", sideRect.origin.x, sideRect.origin.y, sideRect.size.width, sideRect.size.height);
|
|
||||||
NSLog(@"Playlist: %f,%f %fx%f", playlistRect.origin.x, playlistRect.origin.y, playlistRect.size.width, playlistRect.size.height);
|
|
||||||
|
|
||||||
[[sideView view] setFrame:sideRect];
|
|
||||||
[playlistView setFrame:playlistRect];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (float)dividerPosition
|
|
||||||
{
|
|
||||||
if ([splitView isVertical])
|
|
||||||
{
|
|
||||||
return [[sideView view] frame].size.width;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [[sideView view] frame].size.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setDividerPosition:(float)position
|
|
||||||
{
|
|
||||||
float actualPosition = position;
|
|
||||||
if (![splitView isVertical])
|
|
||||||
{
|
|
||||||
actualPosition = ([splitView frame].size.height - position);
|
|
||||||
}
|
|
||||||
|
|
||||||
[splitView adjustSubviews];
|
|
||||||
[splitView setPosition:actualPosition ofDividerAtIndex:0];
|
|
||||||
|
|
||||||
[[NSUserDefaults standardUserDefaults] setFloat:position forKey:@"sideViewDividerPosition"];
|
|
||||||
NSLog(@"SETTING POSITION: %f (%f) == %f?", actualPosition, position, [self dividerPosition]);
|
|
||||||
|
|
||||||
NSRect sideRect = [[sideView view] frame];
|
|
||||||
NSRect playlistRect = [playlistView frame];
|
|
||||||
NSLog(@"SIDE: %f,%f %fx%f", sideRect.origin.x, sideRect.origin.y, sideRect.size.width, sideRect.size.height);
|
|
||||||
NSLog(@"Playlist: %f,%f %fx%f", playlistRect.origin.x, playlistRect.origin.y, playlistRect.size.width, playlistRect.size.height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addToPlaylist:(NSArray *)urls
|
- (void) addToPlaylist:(NSArray *)urls
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
//
|
||||||
|
// SideWindowController.h
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/21/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#import "SideViewController.h"
|
||||||
|
|
||||||
|
@interface SideWindowController : SideViewController {
|
||||||
|
NSMutableDictionary *windows;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,54 @@
|
||||||
|
//
|
||||||
|
// SideWindowController.m
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/21/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "SideWindowController.h"
|
||||||
|
|
||||||
|
|
||||||
|
@implementation SideWindowController
|
||||||
|
|
||||||
|
- (id)init
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self)
|
||||||
|
{
|
||||||
|
[sideViewNibs setObject:@"FileTree" forKey:@"File Tree In a Window!"];
|
||||||
|
[sideViewNibs setObject:@"FileTree" forKey:@"Another File Tree (In a window)!"];
|
||||||
|
|
||||||
|
windows = [[NSMutableDictionary alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[windows release];
|
||||||
|
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)selectSideViewWithTitle:(NSString *)title
|
||||||
|
{
|
||||||
|
NSPanel *window = [windows objectForKey:title];
|
||||||
|
if (window == nil)
|
||||||
|
{
|
||||||
|
SideView *newSideView = [self sideViewForTitle:title];
|
||||||
|
|
||||||
|
NSUInteger styleMask = (NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask|NSTitledWindowMask|NSUtilityWindowMask);
|
||||||
|
|
||||||
|
window = [[NSPanel alloc] initWithContentRect:[[newSideView view] frame] styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
|
||||||
|
[window setContentView:[newSideView view]];
|
||||||
|
|
||||||
|
[windows setObject:window forKey:title];
|
||||||
|
}
|
||||||
|
|
||||||
|
[window makeKeyAndOrderFront:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
Loading…
Reference in New Issue