Enter now adds files from the file tree.
This commit is contained in:
parent
030e8d0359
commit
f06ff8d17d
5 changed files with 86 additions and 8 deletions
|
@ -20,6 +20,7 @@
|
||||||
173428F50D5FB1C400E8D854 /* EntriesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 173428F40D5FB1C400E8D854 /* EntriesController.m */; };
|
173428F50D5FB1C400E8D854 /* EntriesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 173428F40D5FB1C400E8D854 /* EntriesController.m */; };
|
||||||
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 */; };
|
||||||
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 */; };
|
||||||
|
@ -503,6 +504,8 @@
|
||||||
173428F40D5FB1C400E8D854 /* EntriesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntriesController.m; sourceTree = "<group>"; };
|
173428F40D5FB1C400E8D854 /* EntriesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EntriesController.m; sourceTree = "<group>"; };
|
||||||
17342A990D5FD20B00E8D854 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
17342A990D5FD20B00E8D854 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
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>"; };
|
||||||
|
173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTreeOutlineView.m; path = FileTree/FileTreeOutlineView.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>"; };
|
||||||
|
@ -1052,6 +1055,8 @@
|
||||||
17DDF6400E0CB6F100A2E4AD /* FileTree */ = {
|
17DDF6400E0CB6F100A2E4AD /* FileTree */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
173855FD0E0CC81F00488CD4 /* FileTreeOutlineView.h */,
|
||||||
|
173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */,
|
||||||
179D03140E0CB2500064A77A /* FileTreeViewController.h */,
|
179D03140E0CB2500064A77A /* FileTreeViewController.h */,
|
||||||
179D03150E0CB2500064A77A /* FileTreeViewController.m */,
|
179D03150E0CB2500064A77A /* FileTreeViewController.m */,
|
||||||
179D03120E0CB2500064A77A /* FileTreeDataSource.h */,
|
179D03120E0CB2500064A77A /* FileTreeDataSource.h */,
|
||||||
|
@ -1752,6 +1757,7 @@
|
||||||
179D03260E0CB2500064A77A /* PathNode.m in Sources */,
|
179D03260E0CB2500064A77A /* PathNode.m in Sources */,
|
||||||
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 */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<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="55"/>
|
<integer value="64"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
@ -340,6 +340,14 @@
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">96</int>
|
<int key="connectionID">96</int>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">delegate</string>
|
||||||
|
<reference key="source" ref="357233152"/>
|
||||||
|
<reference key="destination" ref="787785768"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">98</int>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
<object class="NSArray" key="orderedObjects">
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
@ -480,6 +488,7 @@
|
||||||
<string>67.ImportedFromIB2</string>
|
<string>67.ImportedFromIB2</string>
|
||||||
<string>68.IBPluginDependency</string>
|
<string>68.IBPluginDependency</string>
|
||||||
<string>68.ImportedFromIB2</string>
|
<string>68.ImportedFromIB2</string>
|
||||||
|
<string>69.CustomClassName</string>
|
||||||
<string>69.IBPluginDependency</string>
|
<string>69.IBPluginDependency</string>
|
||||||
<string>69.ImportedFromIB2</string>
|
<string>69.ImportedFromIB2</string>
|
||||||
<string>70.IBPluginDependency</string>
|
<string>70.IBPluginDependency</string>
|
||||||
|
@ -507,6 +516,7 @@
|
||||||
<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>FileTreeOutlineView</string>
|
||||||
<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>
|
||||||
|
@ -539,7 +549,7 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<nil key="sourceID"/>
|
<nil key="sourceID"/>
|
||||||
<int key="maxID">96</int>
|
<int key="maxID">98</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">
|
||||||
|
@ -581,6 +591,14 @@
|
||||||
<string key="minorKey"/>
|
<string key="minorKey"/>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">FileTreeOutlineView</string>
|
||||||
|
<string key="superclassName">NSOutlineView</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBProjectSource</string>
|
||||||
|
<string key="minorKey">FileTreeOutlineView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
<string key="className">FileTreeViewController</string>
|
<string key="className">FileTreeViewController</string>
|
||||||
<string key="superclassName">NSObject</string>
|
<string key="superclassName">NSObject</string>
|
||||||
|
|
17
FileTree/FileTreeOutlineView.h
Normal file
17
FileTree/FileTreeOutlineView.h
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
//
|
||||||
|
// FileTreeOutlineView.h
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/21/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
|
||||||
|
@interface FileTreeOutlineView : NSOutlineView {
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyDown:(NSEvent *)e;
|
||||||
|
|
||||||
|
@end
|
43
FileTree/FileTreeOutlineView.m
Normal file
43
FileTree/FileTreeOutlineView.m
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
//
|
||||||
|
// FileTreeOutlineView.m
|
||||||
|
// Cog
|
||||||
|
//
|
||||||
|
// Created by Vincent Spader on 6/21/08.
|
||||||
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "FileTreeOutlineView.h"
|
||||||
|
#import "FileTreeViewController.h"
|
||||||
|
|
||||||
|
@implementation FileTreeOutlineView
|
||||||
|
|
||||||
|
- (void)awakeFromNib
|
||||||
|
{
|
||||||
|
[self setDoubleAction:@selector(addToPlaylist:)];
|
||||||
|
[self setTarget:[self delegate]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)keyDown:(NSEvent *)e
|
||||||
|
{
|
||||||
|
unsigned int modifiers = [e modifierFlags] & (NSCommandKeyMask | NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask);
|
||||||
|
NSString *characters = [e characters];
|
||||||
|
unichar c;
|
||||||
|
|
||||||
|
if ([characters length] == 1)
|
||||||
|
{
|
||||||
|
c = [characters characterAtIndex:0];
|
||||||
|
|
||||||
|
if (modifiers == 0 && (c == NSEnterCharacter || c == NSCarriageReturnCharacter))
|
||||||
|
{
|
||||||
|
[[self delegate] addToPlaylist:self];
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[super keyDown:e];
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -12,12 +12,6 @@
|
||||||
|
|
||||||
@implementation FileTreeViewController
|
@implementation FileTreeViewController
|
||||||
|
|
||||||
- (void)awakeFromNib
|
|
||||||
{
|
|
||||||
[outlineView setDoubleAction:@selector(addToPlaylist:)];
|
|
||||||
[outlineView setTarget:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)addToPlaylist:(id)sender
|
- (IBAction)addToPlaylist:(id)sender
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
|
|
Loading…
Reference in a new issue