Added greyed out dock menu item showing current track (simon savary)

CQTexperiment
vspader 2006-04-14 17:28:20 +00:00
parent 07606d8b6b
commit 1bf4ece64a
7 changed files with 72 additions and 31 deletions

View File

@ -7,11 +7,11 @@
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>235 637 346 44 0 0 1024 746 </string>
<string>324 869 346 44 0 0 1280 1002 </string>
<key>463</key>
<string>336 385 352 268 0 0 1024 746 </string>
<string>464 546 352 268 0 0 1280 1002 </string>
<key>513</key>
<string>85 528 109 106 0 0 1024 746 </string>
<string>184 659 109 106 0 0 1280 1002 </string>
</dict>
<key>IBFramework Version</key>
<string>443.0</string>
@ -29,11 +29,11 @@
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>463</integer>
<integer>29</integer>
<integer>513</integer>
<integer>463</integer>
</array>
<key>IBSystem Version</key>
<string>8I127</string>
<string>8H14</string>
</dict>
</plist>

Binary file not shown.

View File

@ -11,7 +11,7 @@
<key>463</key>
<string>484 555 312 249 0 0 1280 1002 </string>
<key>513</key>
<string>513 509 166 106 0 0 1024 746 </string>
<string>666 713 166 106 0 0 1280 1002 </string>
</dict>
<key>IBFramework Version</key>
<string>443.0</string>
@ -21,10 +21,10 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>513</integer>
<integer>21</integer>
<integer>513</integer>
</array>
<key>IBSystem Version</key>
<string>8I127</string>
<string>8H14</string>
</dict>
</plist>

Binary file not shown.

View File

@ -21,8 +21,6 @@
PlaylistEntry *currentEntry;
int shuffleIndex;
BOOL shuffle;
BOOL repeat;
}
@ -61,7 +59,8 @@
- (BOOL)next;
- (BOOL)prev;
- (PlaylistEntry *)entryAtOffset:(int)offset;
- (PlaylistEntry *)entryAtIndex:(int)i;
- (void)addShuffledListToBack;
- (void)addShuffledListToFront;
- (void)resetShuffleList;

View File

@ -23,7 +23,6 @@
acceptableFileTypes = [[NSArray alloc] initWithObjects:@"shn",@"wv",@"ogg",@"wav",@"mpc",@"flac",@"ape",@"mp3",@"aiff",@"aif",@"aac",nil];
acceptablePlaylistTypes = [[NSArray alloc] initWithObjects:@"playlist",nil];
shuffleList = [[NSMutableArray alloc] init];
shuffleIndex = 0;
// DBLog(@"DAH BUTTER CHORNAR: %@", history);
}
@ -298,6 +297,8 @@
- (PlaylistEntry *)entryAtIndex:(int)i
{
//Need to fix for SHUFFLE MODE! holy fix.
if (shuffle == NO)
{
i--;
if (i < 0)
{
@ -315,10 +316,41 @@
}
return [[self arrangedObjects] objectAtIndex:i];
}
/* else
{
// NSLog(@"SHUFFLE: %i %i %i %i", i, shuffleIndex, offset, [shuffleList count]);
while (i < 0)
{
if (repeat == YES)
{
[self addShuffledListToFront];
//change i appropriately
i += [[self arrangedObjects] count];
}
else
{
return nil;
}
}
while (i >= [shuffleList count])
{
if (repeat == YES)
{
NSLog(@"Adding shuffled list to back!");
[self addShuffledListToBack];
}
else
{
return nil;
}
}
return [shuffleList objectAtIndex:i];
}*/
}
- (PlaylistEntry *)entryAtOffset:(int)offset
/*- (PlaylistEntry *)entryAtOffset:(int)offset
{
if (shuffle == YES)
{
@ -377,7 +409,8 @@
return [[self arrangedObjects] objectAtIndex:i];
}
}
*/
/*
- (BOOL)next
{
PlaylistEntry *pe;
@ -409,7 +442,7 @@
return YES;
}
*/
- (void)addShuffledListToBack
{
NSArray *newList = [Shuffle shuffleList:[self arrangedObjects]];
@ -431,7 +464,7 @@
[shuffleList removeAllObjects];
[self addShuffledListToFront];
shuffleIndex = 0;
// shuffleIndex = 0;
}
- (id)currentEntry

View File

@ -34,6 +34,15 @@
[super dealloc];
}
-(void)setShuffleIndex:(int)si
{
shuffleIdx = si;
}
-(int)shuffleIndex
{
return shuffleIdx;
}
-(void)setIndex:(int)i
{