Enhancements to File Tree (contextual menu, sort order, etc.).

Added File Tree contextual menu (Add to Playlist, Show in Finder, etc.).
File Tree and additions to play list now use Finder sort order.
File Tree Root can be set via its popup menu or drag and drop from File Tree.
Alias names are now shown in File Tree (aliases are still resolved).
Added option to skip reading of cue sheets when adding a folder to play list.
CQTexperiment
mscott 2009-08-16 11:49:34 -05:00
parent 90ae894156
commit 11352ab6de
18 changed files with 770 additions and 154 deletions

View File

@ -168,6 +168,7 @@
8E9A30160BA792DC0091081B /* NSFileHandle+CreateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */; };
99EAACA80DD1BB7A00423C38 /* APL.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 566D321B0D538550004466A5 /* APL.bundle */; };
B09E96630D74A7BC0064F138 /* stop_current.png in Resources */ = {isa = PBXBuildFile; fileRef = B09E96620D74A7BC0064F138 /* stop_current.png */; };
F6F96719102C709000D2C9B4 /* NSString+FinderCompare.m in Sources */ = {isa = PBXBuildFile; fileRef = F6F96718102C709000D2C9B4 /* NSString+FinderCompare.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -768,6 +769,8 @@
8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileHandle+CreateFile.m"; sourceTree = "<group>"; };
B09E94300D747F7B0064F138 /* WMA.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WMA.xcodeproj; path = Plugins/WMA/WMA.xcodeproj; sourceTree = "<group>"; };
B09E96620D74A7BC0064F138 /* stop_current.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stop_current.png; path = Images/stop_current.png; sourceTree = "<group>"; };
F6F96718102C709000D2C9B4 /* NSString+FinderCompare.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+FinderCompare.m"; sourceTree = "<group>"; };
F6F9671A102C70C800D2C9B4 /* NSString+FinderCompare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+FinderCompare.h"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -936,6 +939,8 @@
178456110F631E31007E8021 /* SideViewController.m */,
172A12A70F59AF8A0078EF0C /* NSString+CogSort.h */,
172A12A80F59AF8A0078EF0C /* NSString+CogSort.m */,
F6F9671A102C70C800D2C9B4 /* NSString+FinderCompare.h */,
F6F96718102C709000D2C9B4 /* NSString+FinderCompare.m */,
8E9A30130BA792DC0091081B /* NSFileHandle+CreateFile.h */,
8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */,
07E18DF10D62B38400BB0E11 /* NSArray+ShuffleUtils.h */,
@ -1936,6 +1941,7 @@
171CB3DC0F63670D0047EF0A /* PreferencesWindow.m in Sources */,
1778D3CA0F645BF00037E7A0 /* MissingAlbumArtTransformer.m in Sources */,
17FAEBAC0F662985007C8707 /* ToolTipTextField.m in Sources */,
F6F96719102C709000D2C9B4 /* NSString+FinderCompare.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -2,13 +2,14 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9G55</string>
<string key="IBDocument.SystemVersion">9L30</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.43</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="64"/>
<integer value="70"/>
<integer value="110"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -231,6 +232,78 @@
<object class="NSCustomObject" id="787785768">
<string key="NSClassName">FileTreeController</string>
</object>
<object class="NSMenu" id="678143084">
<string key="NSTitle">Menu</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="32540513">
<reference key="NSMenu" ref="678143084"/>
<string key="NSTitle">Add to Playlist</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSOnImage" id="910204761">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuCheckmark</string>
</object>
<object class="NSCustomResource" key="NSMixedImage" id="445753600">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuMixedState</string>
</object>
<int key="NSTag">1</int>
</object>
<object class="NSMenuItem" id="963515567">
<reference key="NSMenu" ref="678143084"/>
<string key="NSTitle">Set as Playlist</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="910204761"/>
<reference key="NSMixedImage" ref="445753600"/>
<int key="NSTag">2</int>
</object>
<object class="NSMenuItem" id="861316845">
<reference key="NSMenu" ref="678143084"/>
<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="910204761"/>
<reference key="NSMixedImage" ref="445753600"/>
</object>
<object class="NSMenuItem" id="1058871911">
<reference key="NSMenu" ref="678143084"/>
<string key="NSTitle">Show in Finder</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="910204761"/>
<reference key="NSMixedImage" ref="445753600"/>
<int key="NSTag">3</int>
</object>
<object class="NSMenuItem" id="1058107516">
<reference key="NSMenu" ref="678143084"/>
<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="910204761"/>
<reference key="NSMixedImage" ref="445753600"/>
</object>
<object class="NSMenuItem" id="825861932">
<reference key="NSMenu" ref="678143084"/>
<string key="NSTitle">Set as Root</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="910204761"/>
<reference key="NSMixedImage" ref="445753600"/>
<int key="NSTag">4</int>
</object>
</object>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@ -287,26 +360,6 @@
</object>
<int key="connectionID">88</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.fileTreeRootURL</string>
<reference key="source" ref="299841028"/>
<reference key="destination" ref="419060898"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="299841028"/>
<reference key="NSDestination" ref="419060898"/>
<string key="NSLabel">value: values.fileTreeRootURL</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">values.fileTreeRootURL</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSValueTransformerName</string>
<string key="NS.object.0">StringToURLTransformer</string>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">89</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">fontSize: values.fontSize</string>
@ -371,6 +424,90 @@
</object>
<int key="connectionID">106</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.fileTreeRootURL</string>
<reference key="source" ref="299841028"/>
<reference key="destination" ref="419060898"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="299841028"/>
<reference key="NSDestination" ref="419060898"/>
<string key="NSLabel">value: values.fileTreeRootURL</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">values.fileTreeRootURL</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSValueTransformerName</string>
<string key="NS.object.0">StringToURLTransformer</string>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">108</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">pathControl</string>
<reference key="source" ref="381152635"/>
<reference key="destination" ref="299841028"/>
</object>
<int key="connectionID">109</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">menu</string>
<reference key="source" ref="357233152"/>
<reference key="destination" ref="678143084"/>
</object>
<int key="connectionID">121</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">addToPlaylist:</string>
<reference key="source" ref="787785768"/>
<reference key="destination" ref="32540513"/>
</object>
<int key="connectionID">122</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showEntryInFinder:</string>
<reference key="source" ref="787785768"/>
<reference key="destination" ref="1058871911"/>
</object>
<int key="connectionID">123</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setAsRoot:</string>
<reference key="source" ref="787785768"/>
<reference key="destination" ref="825861932"/>
</object>
<int key="connectionID">125</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setAsPlaylist:</string>
<reference key="source" ref="787785768"/>
<reference key="destination" ref="963515567"/>
</object>
<int key="connectionID">130</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="787785768"/>
<reference key="destination" ref="381152635"/>
</object>
<int key="connectionID">137</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="678143084"/>
<reference key="destination" ref="357233152"/>
</object>
<int key="connectionID">139</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -422,8 +559,8 @@
<reference key="object" ref="904413865"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="801512230"/>
<reference ref="299841028"/>
<reference ref="801512230"/>
</object>
<reference key="parent" ref="1002"/>
<string key="objectName">File Tree View</string>
@ -491,6 +628,51 @@
<reference key="object" ref="787785768"/>
<reference key="parent" ref="1002"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">110</int>
<reference key="object" ref="678143084"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1058107516"/>
<reference ref="825861932"/>
<reference ref="1058871911"/>
<reference ref="32540513"/>
<reference ref="861316845"/>
<reference ref="963515567"/>
</object>
<reference key="parent" ref="1002"/>
<string key="objectName">ContextualMenu</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">112</int>
<reference key="object" ref="1058871911"/>
<reference key="parent" ref="678143084"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">119</int>
<reference key="object" ref="32540513"/>
<reference key="parent" ref="678143084"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">124</int>
<reference key="object" ref="825861932"/>
<reference key="parent" ref="678143084"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">126</int>
<reference key="object" ref="1058107516"/>
<reference key="parent" ref="678143084"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">128</int>
<reference key="object" ref="861316845"/>
<reference key="parent" ref="678143084"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">129</int>
<reference key="object" ref="963515567"/>
<reference key="parent" ref="678143084"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -500,6 +682,17 @@
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>110.IBEditorWindowLastContentRect</string>
<string>110.IBPluginDependency</string>
<string>110.ImportedFromIB2</string>
<string>110.editorWindowContentRectSynchronizationRect</string>
<string>112.IBPluginDependency</string>
<string>112.ImportedFromIB2</string>
<string>119.IBPluginDependency</string>
<string>124.IBPluginDependency</string>
<string>126.IBPluginDependency</string>
<string>128.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>27.IBPluginDependency</string>
<string>31.IBPluginDependency</string>
<string>55.IBEditorWindowLastContentRect</string>
@ -529,12 +722,23 @@
<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>{{554, 263}, {307, 399}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{310, 530}, {169, 103}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1" id="9"/>
<string>{{482, 640}, {187, 133}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<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>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{582, 558}, {307, 399}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -574,7 +778,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">106</int>
<int key="maxID">139</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -611,19 +815,34 @@
<string key="className">FileTreeController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">addToPlaylist:</string>
<string key="NS.object.0">id</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addToPlaylist:</string>
<string>setAsPlaylist:</string>
<string>setAsRoot:</string>
<string>showEntryInFinder:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>controller</string>
<string>dataSource</string>
<string>outlineView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>SideViewController</string>
<string>FileTreeDataSource</string>
<string>NSOutlineView</string>
</object>
</object>
@ -640,11 +859,13 @@
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>outlineView</string>
<string>pathControl</string>
<string>watcher</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSOutlineView</string>
<string>NSPathControl</string>
<string>PathWatcher</string>
</object>
</object>
@ -673,8 +894,17 @@
<string key="className">FileTreeViewController</string>
<string key="superclassName">SideViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">playlistLoader</string>
<string key="NS.object.0">PlaylistLoader</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>playbackController</string>
<string>playlistLoader</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>PlaybackController</string>
<string>PlaylistLoader</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@ -847,6 +1077,10 @@
<object class="IBPartialClassDescription">
<string key="className">PlaylistLoader</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">clear:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">playlistController</string>
<string key="NS.object.0">PlaylistController</string>

View File

@ -2,16 +2,16 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9G55</string>
<string key="IBDocument.SystemVersion">9J61</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.43</string>
<string key="IBDocument.AppKitVersion">949.46</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1063"/>
<integer value="2439"/>
<integer value="2234"/>
<integer value="21"/>
<integer value="1063"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -891,44 +891,78 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ</bytes>
<reference ref="8"/>
<object class="NSCachedImageRep">
<object class="NSData" key="NSTIFFRepresentation">
<bytes key="NS.bytes">TU0AKgAABAiAACBQOCQWDQeEQmBAaBAEEwJ/vGFROKRWFBwJgkqCMHgAesFvPc3xaSQoFwMIQMGgMCgU
JAcFAsRnUnDM7g13NwNJ1yBNiNtqtM+Px+PtpQSWgYMgSmCAEAkFCIJVMPhEIhMOA6rBgLBcLBsQiEQB
UMBkOhIMhcKg15vV6gIcvhcgB/uBvABjCEyAA3nE4G57PN3JOCB8Q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kAAAAAAAAEKwAAPARMDg4TMYC6wAAAAAAAAAAAAAAAAAAAAAAA</bytes>
</object>
<string key="NSCacheWindowColorSpace">NSCalibratedRGBColorSpace</string>
<int key="NSCacheWindowBPS">8</int>
@ -5887,6 +5921,14 @@ OQA</bytes>
</object>
<int key="connectionID">2451</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">playbackController</string>
<reference key="source" ref="366497202"/>
<reference key="destination" ref="936098491"/>
</object>
<int key="connectionID">2452</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -8516,7 +8558,7 @@ OQA</bytes>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{823, 609}, {142, 63}}</string>
<string>{{809, 609}, {142, 63}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -8607,7 +8649,7 @@ OQA</bytes>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{524, 599}, {299, 293}}</string>
<string>{{524, 599}, {285, 293}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{376, 543}, {299, 293}}</string>
@ -8635,7 +8677,7 @@ OQA</bytes>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">2451</int>
<int key="maxID">2452</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -8841,8 +8883,17 @@ OQA</bytes>
<string key="className">FileTreeViewController</string>
<string key="superclassName">SideViewController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">playlistLoader</string>
<string key="NS.object.0">PlaylistLoader</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>playbackController</string>
<string>playlistLoader</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>PlaybackController</string>
<string>PlaylistLoader</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>

View File

@ -20,7 +20,7 @@
- (void)updatePath
{
NSArray *contents = [[[NSFileManager defaultManager] directoryContentsAtPath:[url path]] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSArray *contents = [[[NSFileManager defaultManager] directoryContentsAtPath:[url path]] sortedArrayUsingSelector:@selector(finderCompare:)];
NSMutableArray *fullPaths = [[NSMutableArray alloc] init];
for (NSString *s in contents)

View File

@ -7,13 +7,18 @@
//
#import <Cocoa/Cocoa.h>
#import "FileTreeDataSource.h"
@class SideViewController;
@interface FileTreeController : NSObject {
IBOutlet SideViewController *controller;
IBOutlet NSOutlineView *outlineView;
IBOutlet FileTreeDataSource *dataSource;
}
- (IBAction)addToPlaylist:(id)sender;
- (IBAction)setAsPlaylist:(id)sender;
- (IBAction)showEntryInFinder:(id)sender;
- (IBAction)setAsRoot:(id)sender;
@end

View File

@ -28,5 +28,39 @@
[urls release];
}
- (IBAction)setAsPlaylist:(id)sender
{
[controller clear:sender];
[self addToPlaylist:sender];
}
- (IBAction)playPauseResume:(NSObject *)id
{
[controller playPauseResume:id];
}
- (IBAction)showEntryInFinder:(id)sender
{
unsigned int index;
NSWorkspace* ws = [NSWorkspace sharedWorkspace];
NSIndexSet *selectedIndexes = [outlineView selectedRowIndexes];
for (index = [selectedIndexes firstIndex];
index != NSNotFound; index = [selectedIndexes indexGreaterThanIndex: index])
{
NSURL *url = [[outlineView itemAtRow:index] URL];
[ws selectFile:[url path] inFileViewerRootedAtPath:[url path]];
}
}
- (IBAction)setAsRoot:(id)sender
{
unsigned int index = [[outlineView selectedRowIndexes] firstIndex];
if (index != NSNotFound)
{
[dataSource changeURL:[[outlineView itemAtRow:index] URL]];
}
}
@end

View File

@ -13,13 +13,15 @@
@interface FileTreeDataSource : NSObject {
PathNode *rootNode;
IBOutlet NSPathControl *pathControl;
IBOutlet PathWatcher *watcher;
IBOutlet NSOutlineView *outlineView;
}
- (NSURL *)rootURL;
- (void)setRootURL:(NSURL *)rootURL;
- (void)changeURL:(NSURL *)rootURL;
- (void)reloadPathNode:(PathNode *)item;

View File

@ -30,6 +30,8 @@
[self setRootURL: [NSURL URLWithString:[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"fileTreeRootURL"]]];
[pathControl setTarget:self];
[pathControl setAction:@selector(pathControlAction:)];
}
- (void) observeValueForKeyPath:(NSString *)keyPath
@ -37,11 +39,27 @@
change:(NSDictionary *)change
context:(void *)context
{
NSLog([[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"fileTreeRootURL"]);
if ([keyPath isEqualToString:@"values.fileTreeRootURL"]) {
[self setRootURL:[NSURL URLWithString:[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"fileTreeRootURL"]]];
}
}
- (void)changeURL:(NSURL *)url
{
if (url != nil)
{
[[[NSUserDefaultsController sharedUserDefaultsController] defaults] setObject:[url absoluteString] forKey:@"fileTreeRootURL"];
}
}
- (void)pathControlAction:(id)sender
{
if ([pathControl clickedPathComponentCell] != nil && [[pathControl clickedPathComponentCell] URL] != nil)
{
[self changeURL:[[pathControl clickedPathComponentCell] URL]];
}
}
- (NSURL *)rootURL
{
@ -131,13 +149,17 @@
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray*)items toPasteboard:(NSPasteboard*)pboard {
//Get selected paths
NSMutableArray *urls = [NSMutableArray arrayWithCapacity:[items count]];
NSMutableArray *paths = [NSMutableArray arrayWithCapacity:[items count]];
for (id p in items) {
[urls addObject:[p URL]];
[paths addObject:[[p URL] path]];
}
NSLog(@"URLS: %@", urls);
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
NSLog(@"Paths: %@", paths);
[pboard declareTypes:[NSArray arrayWithObjects:CogUrlsPboardType,nil] owner:nil]; //add it to pboard
[pboard setData:[NSArchiver archivedDataWithRootObject:urls] forType:CogUrlsPboardType];
[pboard addTypes:[NSArray arrayWithObject:NSFilenamesPboardType] owner:self];
[pboard setPropertyList:paths forType:NSFilenamesPboardType];
return YES;
}

View File

@ -8,11 +8,13 @@
#import "FileTreeOutlineView.h"
#import "FileTreeViewController.h"
#import "PlaybackController.h"
@implementation FileTreeOutlineView
- (void)awakeFromNib
{
[[self menu] setAutoenablesItems:NO];
[self setDoubleAction:@selector(addToPlaylist:)];
[self setTarget:[self delegate]];
}
@ -33,6 +35,11 @@
return;
}
else if (modifiers == 0 && c == ' ')
{
[[self delegate] playPauseResume:self];
return;
}
}
[super keyDown:e];
@ -40,4 +47,50 @@
return;
}
// enables right-click selection for "Show in Finder" contextual menu
-(NSMenu*)menuForEvent:(NSEvent*)event
{
//Find which row is under the cursor
[[self window] makeFirstResponder:self];
BOOL isDir;
NSPoint menuPoint = [self convertPoint:[event locationInWindow] fromView:nil];
NSInteger iRow = [self rowAtPoint:menuPoint];
NSMenu* contextMenu = [self menu];
/* Update the file tree selection before showing menu
Preserves the selection if the row under the mouse is selected (to allow for
multiple items to be selected), otherwise selects the row under the mouse */
BOOL currentRowIsSelected = [[self selectedRowIndexes] containsIndex:iRow];
if (iRow == -1)
{
[self deselectAll:self];
}
else if (!currentRowIsSelected)
{
[self selectRow:iRow byExtendingSelection:NO];
}
if ([self numberOfSelectedRows] > 0)
{
[[contextMenu itemWithTag:1] setEnabled:YES]; // Add to Playlist
[[contextMenu itemWithTag:2] setEnabled:YES]; // Set as Playlist
[[contextMenu itemWithTag:3] setEnabled:YES]; // Show in Finder
// Only let directories be Set as Root
[[NSFileManager defaultManager] fileExistsAtPath:[[[self itemAtRow:iRow] URL] path] isDirectory:&isDir];
[[contextMenu itemWithTag:4] setEnabled:(isDir? YES : NO)];
}
else
{
//No rows are selected, so the menu should be displayed with all items disabled
int i;
for (i=0;i<[contextMenu numberOfItems];i++) {
[[contextMenu itemAtIndex:i] setEnabled:NO];
}
}
return contextMenu;
}
@end

View File

@ -10,8 +10,10 @@
#import "SideViewController.h"
@class PlaylistLoader;
@class PlaybackController;
@interface FileTreeViewController : SideViewController {
IBOutlet PlaylistLoader *playlistLoader;
IBOutlet PlaybackController *playbackController;
}
@end

View File

@ -16,12 +16,20 @@
return [super initWithNibName:@"FileTree" bundle:[NSBundle mainBundle]];
}
- (void)addToPlaylist:(NSArray *)urls
{
[playlistLoader willInsertURLs:urls origin:URLOriginExternal];
[playlistLoader didInsertURLs:[playlistLoader addURLs:urls sort:YES] origin:URLOriginExternal];
}
- (void)clear:(id)sender
{
[playlistLoader clear:sender];
}
- (void)playPauseResume:(NSObject *)id
{
[playbackController playPauseResume:id];
}
@end

View File

@ -33,6 +33,8 @@
- (void)setSubpaths:(NSArray *)s;
- (NSString *)display;
- (void)setDisplay:(NSString *)s;
- (NSImage *)icon;
- (BOOL)isLeaf;

View File

@ -33,13 +33,13 @@ NSURL *resolveAliases(NSURL *url)
if (resolvedUrl != NULL)
{
NSLog(@"Resolved...");
//NSLog(@"Resolved...");
return [(NSURL *)resolvedUrl autorelease];
}
}
}
NSLog(@"Not resolved");
//NSLog(@"Not resolved");
return url;
}
@ -56,7 +56,6 @@ NSURL *resolveAliases(NSURL *url)
return self;
}
- (void)setURL:(NSURL *)u
{
[u retain];
@ -66,7 +65,7 @@ NSURL *resolveAliases(NSURL *url)
url = u;
[display release];
display = [[NSFileManager defaultManager] displayNameAtPath:[url path]];
display = [[NSFileManager defaultManager] displayNameAtPath:[u path]];
[display retain];
[icon release];
@ -99,12 +98,13 @@ NSURL *resolveAliases(NSURL *url)
}
NSURL *u = [NSURL fileURLWithPath:s];
NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:[u path]];
PathNode *newNode;
NSLog(@"Before: %@", u);
//NSLog(@"Before: %@", u);
u = resolveAliases(u);
NSLog(@"After: %@", u);
//NSLog(@"After: %@", u);
if ([[s pathExtension] caseInsensitiveCompare:@"savedSearch"] == NSOrderedSame)
{
@ -135,7 +135,8 @@ NSURL *resolveAliases(NSURL *url)
newNode = [[FileNode alloc] initWithDataSource:dataSource url:u];
}
}
[newNode setDisplay:displayName];
[newSubpaths addObject:newNode];
[newNode release];
@ -169,6 +170,13 @@ NSURL *resolveAliases(NSURL *url)
return YES;
}
- (void)setDisplay:(NSString *)s
{
[display release];
display = s;
[display retain];
}
- (NSString *)display
{
return display;

View File

@ -24,6 +24,11 @@ typedef enum {
NSOperationQueue *queue;
}
- (void)initDefaults;
// Clear playlist
- (void)clear:(id)sender;
// Load arrays of urls...
- (NSArray*)addURLs:(NSArray *)urls sort:(BOOL)sort;
- (NSArray*)addURL:(NSURL *)url;

View File

@ -26,6 +26,8 @@
self = [super init];
if (self)
{
[self initDefaults];
queue = [[NSOperationQueue alloc] init];
[queue setMaxConcurrentOperationCount:1];
}
@ -33,6 +35,15 @@
return self;
}
- (void)initDefaults
{
NSDictionary *defaultsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], @"readCueSheetsInFolders",
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultsDictionary];
}
- (void)dealloc
{
[queue release];
@ -151,7 +162,11 @@
BOOL isDir;
if ( [manager fileExistsAtPath:absoluteSubpath isDirectory:&isDir] && isDir == NO)
{
[urls addObject:[NSURL fileURLWithPath:absoluteSubpath]];
if ([[absoluteSubpath pathExtension] caseInsensitiveCompare:@"cue"] != NSOrderedSame ||
[[NSUserDefaults standardUserDefaults] boolForKey:@"readCueSheetsInFolders"])
{
[urls addObject:[NSURL fileURLWithPath:absoluteSubpath]];
}
}
}
@ -203,7 +218,8 @@
NSArray *sortedURLs;
if (sort == YES)
{
sortedURLs = [expandedURLs sortedArrayUsingSelector:@selector(compareTrackNumbers:)];
sortedURLs = [expandedURLs sortedArrayUsingSelector:@selector(finderCompare:)];
// sortedURLs = [expandedURLs sortedArrayUsingSelector:@selector(compareTrackNumbers:)];
}
else
{
@ -360,6 +376,11 @@
}
}
- (void)clear:(id)sender
{
[playlistController clear:sender];
}
- (NSArray*)addURLs:(NSArray *)urls sort:(BOOL)sort
{
return [self insertURLs:urls atIndex:[[playlistController content] count] sort:sort];

View File

@ -1,23 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9D34</string>
<string key="IBDocument.InterfaceBuilderVersion">667</string>
<string key="IBDocument.AppKitVersion">949.33</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<string key="IBDocument.SystemVersion">9L30</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="50"/>
<integer value="11"/>
<integer value="85"/>
<integer value="231"/>
<integer value="85"/>
<integer value="43"/>
<integer value="50"/>
<integer value="58"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="87903802">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="810127627">
@ -42,6 +51,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{91, 70}, {82, 19}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="832665762">
<int key="NSCellFlags">-2075001280</int>
@ -79,6 +89,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{175, 62}, {64, 32}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="779487521">
<int key="NSCellFlags">67239424</int>
@ -106,6 +117,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{45, 72}, {39, 17}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="419838430">
<int key="NSCellFlags">67239424</int>
@ -135,6 +147,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{17, 47}, {69, 17}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="491370947">
<int key="NSCellFlags">67239424</int>
@ -151,6 +164,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{40, 22}, {44, 17}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="682291687">
<int key="NSCellFlags">67239424</int>
@ -167,6 +181,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{91, 45}, {82, 19}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1061974777">
<int key="NSCellFlags">-2075001280</int>
@ -184,6 +199,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{91, 20}, {82, 19}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="956769949">
<int key="NSCellFlags">-2075001280</int>
@ -201,6 +217,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{175, 37}, {64, 32}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="880711596">
<int key="NSCellFlags">67239424</int>
@ -224,6 +241,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{175, 12}, {64, 32}}</string>
<reference key="NSSuperview" ref="935554649"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="586533092">
<int key="NSCellFlags">67239424</int>
@ -245,13 +263,14 @@
</object>
<string key="NSFrameSize">{432, 109}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSMutableString" key="NSClassName">
<characters key="NS.bytes">NSView</characters>
</object>
<string key="NSExtension">NSResponder</string>
</object>
<object class="NSCustomView" id="917028670">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -306,6 +325,7 @@
</object>
</object>
<string key="NSFrameSize">{432, 74}</string>
<reference key="NSSuperview"/>
<object class="NSMutableString" key="NSClassName">
<characters key="NS.bytes">NSView</characters>
</object>
@ -441,6 +461,12 @@
<string key="NSExtension">NSResponder</string>
</object>
<object class="NSUserDefaultsController" id="288214272">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>parseCueOnAdd</string>
<string>readCueInDir</string>
<string>readCueSheetsInFolders</string>
</object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSCustomObject" id="732449007">
@ -636,7 +662,7 @@
<object class="NSPopUpButton" id="95183005">
<reference key="NSNextResponder" ref="215894919"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{157, 56}, {257, 26}}</string>
<string key="NSFrame">{{157, 78}, {257, 26}}</string>
<reference key="NSSuperview" ref="215894919"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="695505990">
@ -701,7 +727,7 @@
<object class="NSPopUpButton" id="689681548">
<reference key="NSNextResponder" ref="215894919"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{157, 23}, {257, 26}}</string>
<string key="NSFrame">{{157, 45}, {257, 26}}</string>
<reference key="NSSuperview" ref="215894919"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="801890855">
@ -766,7 +792,7 @@
<object class="NSTextField" id="293179602">
<reference key="NSNextResponder" ref="215894919"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 63}, {129, 17}}</string>
<string key="NSFrame">{{17, 85}, {129, 17}}</string>
<reference key="NSSuperview" ref="215894919"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="911161644">
@ -782,7 +808,7 @@
<object class="NSTextField" id="569588868">
<reference key="NSNextResponder" ref="215894919"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 20}, {138, 35}}</string>
<string key="NSFrame">{{17, 42}, {138, 35}}</string>
<reference key="NSSuperview" ref="215894919"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="897464142">
@ -795,8 +821,30 @@
<reference key="NSTextColor" ref="843311373"/>
</object>
</object>
<object class="NSButton" id="806156422">
<reference key="NSNextResponder" ref="215894919"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 18}, {395, 18}}</string>
<reference key="NSSuperview" ref="215894919"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="816544512">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Read cue sheets when adding folders to playlist.</string>
<reference key="NSSupport" ref="838963571"/>
<reference key="NSControlView" ref="806156422"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">130</int>
<reference key="NSNormalImage" ref="91049675"/>
<reference key="NSAlternateImage" ref="892074019"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{431, 100}</string>
<string key="NSFrameSize">{432, 122}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@ -1349,6 +1397,22 @@
</object>
<int key="connectionID">309</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.readCueSheetsInFolders</string>
<reference key="source" ref="806156422"/>
<reference key="destination" ref="288214272"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="806156422"/>
<reference key="NSDestination" ref="288214272"/>
<string key="NSLabel">value: values.readCueSheetsInFolders</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">values.readCueSheetsInFolders</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">328</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -1793,6 +1857,7 @@
<reference ref="293179602"/>
<reference ref="569588868"/>
<reference ref="689681548"/>
<reference ref="806156422"/>
</object>
<reference key="parent" ref="293284525"/>
<string key="objectName">PlaylistView</string>
@ -1919,6 +1984,20 @@
<reference key="object" ref="897464142"/>
<reference key="parent" ref="569588868"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">310</int>
<reference key="object" ref="806156422"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="816544512"/>
</object>
<reference key="parent" ref="215894919"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">311</int>
<reference key="object" ref="816544512"/>
<reference key="parent" ref="806156422"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -1953,6 +2032,24 @@
<string>16.ImportedFromIB2</string>
<string>17.IBPluginDependency</string>
<string>17.ImportedFromIB2</string>
<string>196.IBPluginDependency</string>
<string>197.IBPluginDependency</string>
<string>198.IBPluginDependency</string>
<string>199.IBPluginDependency</string>
<string>200.IBPluginDependency</string>
<string>201.IBPluginDependency</string>
<string>202.IBPluginDependency</string>
<string>203.IBPluginDependency</string>
<string>204.IBPluginDependency</string>
<string>205.IBPluginDependency</string>
<string>206.IBPluginDependency</string>
<string>207.IBPluginDependency</string>
<string>208.IBPluginDependency</string>
<string>209.IBPluginDependency</string>
<string>210.IBPluginDependency</string>
<string>211.IBPluginDependency</string>
<string>212.IBPluginDependency</string>
<string>213.IBPluginDependency</string>
<string>231.IBEditorWindowLastContentRect</string>
<string>231.IBPluginDependency</string>
<string>231.editorWindowContentRectSynchronizationRect</string>
@ -1993,6 +2090,9 @@
<string>29.ImportedFromIB2</string>
<string>30.IBPluginDependency</string>
<string>30.ImportedFromIB2</string>
<string>310.IBPluginDependency</string>
<string>311.IBPluginDependency</string>
<string>43.IBEditorWindowLastContentRect</string>
<string>43.IBPluginDependency</string>
<string>43.ImportedFromIB2</string>
<string>44.IBPluginDependency</string>
@ -2069,7 +2169,25 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{449, 587}, {431, 100}}</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>
<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>
<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>
<string>{{488, 692}, {432, 122}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{376, 821}, {431, 100}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -2110,6 +2228,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{468, 859}, {432, 74}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
@ -2176,7 +2297,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">309</int>
<int key="maxID">328</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -2221,6 +2342,18 @@
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">GeneralPreferencePane</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">view</string>
<string key="NS.object.0">NSView</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">GeneralPreferencePane.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">HotKeyControl</string>
<string key="superclassName">NDHotKeyControl</string>
@ -2239,7 +2372,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">HotKeyPane</string>
<string key="superclassName">PreferencePane</string>
<string key="superclassName">GeneralPreferencePane</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
@ -2279,7 +2412,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">HotKeyPane</string>
<string key="superclassName">PreferencePane</string>
<string key="superclassName">GeneralPreferencePane</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
@ -2301,6 +2434,13 @@
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@ -2317,7 +2457,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">OutputPane</string>
<string key="superclassName">PreferencePane</string>
<string key="superclassName">GeneralPreferencePane</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">takeDeviceID:</string>
<string key="NS.object.0">id</string>
@ -2333,7 +2473,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">OutputPane</string>
<string key="superclassName">PreferencePane</string>
<string key="superclassName">GeneralPreferencePane</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
@ -2363,35 +2503,6 @@
<string key="minorKey">PlaylistBehaviorArrayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PrefPaneController</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>hotKeyPane</string>
<string>outputPane</string>
<string>playlistView</string>
<string>remoteView</string>
<string>scrobblerView</string>
<string>updatesView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>HotKeyPane</string>
<string>OutputPane</string>
<string>NSView</string>
<string>NSView</string>
<string>NSView</string>
<string>NSView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">PrefPaneController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PrefPaneController</string>
<string key="superclassName">NSObject</string>
@ -2404,18 +2515,6 @@
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PreferencePane</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">view</string>
<string key="NS.object.0">NSView</string>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">PreferencePane.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PreferencePane</string>
<string key="superclassName">NSObject</string>

View File

@ -0,0 +1,18 @@
/*
* NSString+FinderCompare.h
*/
#import <Cocoa/Cocoa.h>
#include <CoreServices/CoreServices.h>
@interface NSString (FinderCompare)
- (NSComparisonResult)finderCompare:(NSString *)aString;
@end
@interface NSURL (FinderCompare)
- (NSComparisonResult)finderCompare:(NSURL *)aURL;
@end

View File

@ -0,0 +1,46 @@
//
// FinderCompare.m
// Created by Pablo Gomez Basanta on 23/7/05.
// From: http://neop.gbtopia.com/?p=27
//
// Based on:
// http://developer.apple.com/qa/qa2004/qa1159.html
//
#import "NSString+FinderCompare.h"
@implementation NSString (FinderCompare)
- (NSComparisonResult)finderCompare:(NSString *)aString
{
SInt32 compareResult;
CFIndex lhsLen = [self length];;
CFIndex rhsLen = [aString length];
UniChar *lhsBuf = malloc(lhsLen * sizeof(UniChar));
UniChar *rhsBuf = malloc(rhsLen * sizeof(UniChar));
[self getCharacters:lhsBuf];
[aString getCharacters:rhsBuf];
(void) UCCompareTextDefault(kUCCollateComposeInsensitiveMask | kUCCollateWidthInsensitiveMask | kUCCollateCaseInsensitiveMask | kUCCollateDigitsOverrideMask | kUCCollateDigitsAsNumberMask| kUCCollatePunctuationSignificantMask,lhsBuf,lhsLen,rhsBuf,rhsLen,NULL,&compareResult);
free(lhsBuf);
free(rhsBuf);
return (CFComparisonResult) compareResult;
}
@end
@implementation NSURL (FinderCompare)
- (NSComparisonResult)finderCompare:(NSURL *)aURL
{
return [[self absoluteString] finderCompare:[aURL absoluteString]];
}
@end