Changed UI things.

CQTexperiment
vspader 2005-06-30 17:46:07 +00:00
parent 7987b3dcf7
commit bbb62c9060
8 changed files with 42 additions and 33 deletions

View File

@ -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 <julianmayer (at) mac.com>.
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 <nathanael (at) mailblocks.com>.
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.

View File

@ -1,5 +1,5 @@
<html>
<body>
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.
</body>
</html>

View File

@ -11,7 +11,7 @@
<key>463</key>
<string>356 394 312 249 0 0 1024 746 </string>
<key>513</key>
<string>475 157 180 156 0 0 1024 746 </string>
<string>475 157 109 106 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>439.0</string>
@ -21,9 +21,9 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>463</integer>
<integer>21</integer>
<integer>513</integer>
<integer>463</integer>
</array>
<key>IBSystem Version</key>
<string>8B15</string>

Binary file not shown.

View File

@ -130,6 +130,9 @@
if (shuffle == YES)
[self generateShuffleList];
[self setSelectionIndex:index];
return count;
}

View File

@ -21,6 +21,11 @@
return YES;
}
- (BOOL)acceptsFirstMouse:(NSEvent *)mouseDownEvent
{
return NO;
}
- (void)mouseDown:(NSEvent *)e
{
// DBLog(@"MOUSE DOWN");

View File

@ -47,6 +47,9 @@
- (IBAction)prev:(id)sender;
- (IBAction)seek:(id)sender;
- (void)updateTimeField:(double)pos;
- (void)playEntryAtIndex:(int)i;
- (void)playEntry:(PlaylistEntry *)pe;

View File

@ -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,25 +211,30 @@
[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)
{