Fixed up menus. Still need to correct a few actions.

CQTexperiment
vspader 2007-05-26 14:09:03 +00:00
parent d7b5e52c63
commit 20dd4930ee
8 changed files with 48 additions and 16 deletions

View File

@ -129,6 +129,8 @@
}, },
{ {
ACTIONS = { ACTIONS = {
clear = id;
clearFilterPredicate = id;
showEntryInFinder = id; showEntryInFinder = id;
takeRepeatFromObject = id; takeRepeatFromObject = id;
takeShuffleFromObject = id; takeShuffleFromObject = id;
@ -146,7 +148,12 @@
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{ {
ACTIONS = {shufflePlaylist = id; sortByPath = id; toggleColumn = id; }; ACTIONS = {
scrollToCurrentEntry = id;
shufflePlaylist = id;
sortByPath = id;
toggleColumn = id;
};
CLASS = PlaylistView; CLASS = PlaylistView;
LANGUAGE = ObjC; LANGUAGE = ObjC;
OUTLETS = { OUTLETS = {

View File

@ -34,12 +34,12 @@
<integer>4</integer> <integer>4</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>513</integer>
<integer>29</integer>
<integer>21</integer>
<integer>1156</integer>
<integer>1307</integer> <integer>1307</integer>
<integer>1324</integer> <integer>1324</integer>
<integer>29</integer>
<integer>513</integer>
<integer>21</integer>
<integer>1156</integer>
<integer>463</integer> <integer>463</integer>
<integer>1063</integer> <integer>1063</integer>
</array> </array>

Binary file not shown.

View File

@ -45,6 +45,8 @@
- (IBAction)randomizeList; - (IBAction)randomizeList;
- (IBAction)showEntryInFinder:(id)sender; - (IBAction)showEntryInFinder:(id)sender;
- (IBAction)clearFilterPredicate:(id)sender;
- (IBAction)clear:(id)sender;
- (void)setTotalTimeDisplay:(NSString *)ttd; - (void)setTotalTimeDisplay:(NSString *)ttd;
- (NSString *)totalTimeDisplay; - (NSString *)totalTimeDisplay;

View File

@ -430,6 +430,16 @@
return repeat; return repeat;
} }
- (IBAction)clear:(id)sender
{
[self removeObjects:[self content]];
}
- (IBAction)clearFilterPredicate:(id)sender
{
[self setFilterPredicate:nil];
}
- (void)setFilterPredicate:(NSPredicate *)filterPredicate - (void)setFilterPredicate:(NSPredicate *)filterPredicate
{ {
[super setFilterPredicate:filterPredicate]; [super setFilterPredicate:filterPredicate];

View File

@ -25,5 +25,7 @@
- (IBAction)toggleColumn:(id)sender; - (IBAction)toggleColumn:(id)sender;
- (IBAction)scrollToCurrentEntry:(id)sender;
@end @end

View File

@ -175,33 +175,45 @@
- (void)keyDown:(NSEvent *)e - (void)keyDown:(NSEvent *)e
{ {
NSString *s; unsigned int modifiers = [e modifierFlags] & (NSCommandKeyMask | NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask);
NSString *characters = [e characters];
unichar c; unichar c;
NSLog(@"DOWN!");
if ([characters length] != 1) {
[super keyDown:e];
s = [e charactersIgnoringModifiers];
if ([s length] != 1)
return; return;
}
c = [s characterAtIndex:0];
c = [characters characterAtIndex:0];
if (c == NSDeleteCharacter || c == NSBackspaceCharacter || c == NSDeleteFunctionKey) NSLog(@"Modifiers: %i", modifiers);
if (modifiers == 0 && (c == NSDeleteCharacter || c == NSBackspaceCharacter || c == NSDeleteFunctionKey))
{ {
[playlistController remove:self]; [playlistController remove:self];
} }
else if (c == ' ') else if (modifiers == 0 && c == ' ')
{ {
[playbackController playPauseResume:self]; [playbackController playPauseResume:self];
} }
else if (c == NSEnterCharacter || c == NSCarriageReturnCharacter) else if (modifiers == 0 && (c == NSEnterCharacter || c == NSCarriageReturnCharacter))
{ {
[playbackController play:self]; [playbackController play:self];
} }
else if (modifiers == 0 && c == 0x1b) { //Escape
NSLog(@"ESCAPE!");
[playlistController clearFilterPredicate:self];
}
else else
{ {
[super keyDown:e]; [super keyDown:e];
} }
} }
- (IBAction)scrollToCurrentEntry:(id)sender
{
[self scrollRowToVisible:[(NSNumber *)[[playlistController currentEntry] index] intValue]];
}
- (IBAction)sortByPath:(id)sender - (IBAction)sortByPath:(id)sender
{ {
[self setSortDescriptors:nil]; [self setSortDescriptors:nil];

3
TODO
View File

@ -1,8 +1,7 @@
Bug fixes: Bug fixes:
Broken MP3: http://sbooth.org/forums/viewtopic.php?t=1103 Broken MP3: http://sbooth.org/forums/viewtopic.php?t=1103
Windows M3U paths: http://sbooth.org/forums/viewtopic.php?t=1209
? Playlist display: http://sbooth.org/forums/viewtopic.php?t=1050 ? Playlist display: http://sbooth.org/forums/viewtopic.php?t=1050
Fix playlist logic. http://sbooth.org/forums/viewtopic.php?t=762&highlight=document+based+playlist Fix playlist logic. http://sbooth.org/forums/viewtopic.php?t=762
Note: Never load duplicates in a group of files. Ex: If you load an m3u containing a bunch of files AND the files themselves, only load them once! However, if you load the m3u, THEN load the group of files, they should appear twice! Note: Never load duplicates in a group of files. Ex: If you load an m3u containing a bunch of files AND the files themselves, only load them once! However, if you load the m3u, THEN load the group of files, they should appear twice!
Hook up various menu items. Add missing functions and generally fix the menu. Hook up various menu items. Add missing functions and generally fix the menu.
Problems with 3rd party devices. http://sbooth.org/forums/viewtopic.php?t=255 Problems with 3rd party devices. http://sbooth.org/forums/viewtopic.php?t=255