diff --git a/Changelog b/Changelog index 8523d7281..eda676e74 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,12 @@ 0.05 ---- Dragging to the dock icon now works in 10.3. +Selection now selects the first song added when adding new files. +Now seeds the random number for shuffle mode. +Redesigned UI thanks to Julian Mayer . +If nothing is selected when the user presses play, the first song is played. +Double-clicking when out of focus now behaves as expected. +Now has a simple dock menu courtesy of Nathanael Weldon . 0.04 ---- @@ -13,13 +19,13 @@ Added volume slider. Fixed autopositioning of the volume slider. Fixed crash when dragging/dropping files to the playlist. -0.0.3 +0.03 ----- Fixed bug where Default.playlist referred to non-existent files, resulting in a crash. Clicking on the time display will now alternate between current time, and time to go. Now makes ham. -0.0.2 +0.02 ----- Awesomized id3v2 and tagging support courtesy of TagLib. Dramatically improved performance of monkeys audio codec. @@ -31,6 +37,6 @@ Fixed play button so it now plays the currently selected song if no song is play Changed info panel to a drawer. Misc UI fixes. -0.0.1 +0.01 ----- Initial release. \ No newline at end of file diff --git a/Credits.html b/Credits.html index e421ed08c..71afa4ef4 100644 --- a/Credits.html +++ b/Credits.html @@ -1,5 +1,5 @@ -This release of Cog is dedicated to all those hungry bug-finders out there. You rock. +Cog is dedicated to satan. Some guys just get a bad rap. diff --git a/English.lproj/MainMenu.nib/info.nib b/English.lproj/MainMenu.nib/info.nib index 903636ac6..40cb2baaf 100644 --- a/English.lproj/MainMenu.nib/info.nib +++ b/English.lproj/MainMenu.nib/info.nib @@ -11,7 +11,7 @@ 463 356 394 312 249 0 0 1024 746 513 - 475 157 180 156 0 0 1024 746 + 475 157 109 106 0 0 1024 746 IBFramework Version 439.0 @@ -21,9 +21,9 @@ IBOpenObjects + 463 21 513 - 463 IBSystem Version 8B15 diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index 4fac7d3f4..99ecd9680 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index a2382c37c..5d1c20e02 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -130,6 +130,9 @@ if (shuffle == YES) [self generateShuffleList]; + + [self setSelectionIndex:index]; + return count; } diff --git a/Playlist/PlaylistView.m b/Playlist/PlaylistView.m index 89cf64d57..257ccd134 100644 --- a/Playlist/PlaylistView.m +++ b/Playlist/PlaylistView.m @@ -21,6 +21,11 @@ return YES; } +- (BOOL)acceptsFirstMouse:(NSEvent *)mouseDownEvent +{ + return NO; +} + - (void)mouseDown:(NSEvent *)e { // DBLog(@"MOUSE DOWN"); diff --git a/SoundController.h b/SoundController.h index 922aecb41..7f25beb22 100644 --- a/SoundController.h +++ b/SoundController.h @@ -47,6 +47,9 @@ - (IBAction)prev:(id)sender; - (IBAction)seek:(id)sender; + +- (void)updateTimeField:(double)pos; + - (void)playEntryAtIndex:(int)i; - (void)playEntry:(PlaylistEntry *)pe; diff --git a/SoundController.m b/SoundController.m index 81b3db808..7ff66cfaf 100644 --- a/SoundController.m +++ b/SoundController.m @@ -24,8 +24,6 @@ - (void)awakeFromNib { - [timeField setFont:[NSFont systemFontOfSize:18]]; - sendPort = [NSPort port]; if (sendPort) { @@ -93,6 +91,9 @@ - (IBAction)play:(id)sender { + if ([playlistView selectedRow] == -1) + [playlistView selectRow:0 byExtendingSelection:NO]; + [self playEntryAtIndex:[playlistView selectedRow]]; } @@ -132,10 +133,7 @@ time = [positionSlider doubleValue]; [self sendPortMessage:kCogSeekMessage withData:&time ofSize:(sizeof(double))]; - int sec = (int)(time/1000.0); - NSString *text; - text = [NSString stringWithFormat:@"%i:%02i", sec/60, sec%60]; - [timeField setStringValue:text]; + [self updateTimeField:time]; } - (void)sendPortMessage:(int)msgid @@ -213,23 +211,28 @@ [self sendPortMessage:kCogSetVolumeMessage withData:&v ofSize:sizeof(float)]; } -- (IBAction)toggleShowTimeRemaining:(id)sender + +- (void)updateTimeField:(double)pos { NSString *text; - - showTimeRemaining = !showTimeRemaining; if (showTimeRemaining == NO) { - int sec = (int)([positionSlider doubleValue]/1000.0); - text = [NSString stringWithFormat:@"%i:%02i", sec/60, sec%60]; + int sec = (int)(pos/1000.0); + text = [NSString stringWithFormat:@"Time Elapsed: %i:%02i", sec/60, sec%60]; } else { - int sec = (int)(([positionSlider maxValue] - [positionSlider doubleValue])/1000.0); - text = [NSString stringWithFormat:@"%i:%02i", sec/60, sec%60]; + int sec = (int)(([positionSlider maxValue] - pos)/1000.0); + text = [NSString stringWithFormat:@"Time Remaining: %i:%02i", sec/60, sec%60]; } - [timeField setStringValue:text]; +} + +- (IBAction)toggleShowTimeRemaining:(id)sender +{ + showTimeRemaining = !showTimeRemaining; + + [self updateTimeField:[positionSlider doubleValue]]; } - (void)handlePortMessage:(NSPortMessage *)portMessage @@ -271,7 +274,7 @@ { waitingForPlay = NO; [playlistController next]; - [timeField setStringValue:@"0:00"]; + [self updateTimeField:0.0f]; } } else if (message == kCogBitrateUpdateMessage) @@ -311,18 +314,7 @@ [positionSlider setDoubleValue:pos]; } - NSString *text; - if (showTimeRemaining == NO) - { - int sec = (int)(pos/1000.0); - text = [NSString stringWithFormat:@"%i:%02i", sec/60, sec%60]; - } - else - { - int sec = (int)(([positionSlider maxValue] - pos)/1000.0); - text = [NSString stringWithFormat:@"%i:%02i", sec/60, sec%60]; - } - [timeField setStringValue:text]; + [self updateTimeField:pos]; } else if (message == kCogStatusUpdateMessage) {