Added greyed out dock menu item showing current track (simon savary)
parent
07606d8b6b
commit
1bf4ece64a
|
@ -7,11 +7,11 @@
|
||||||
<key>IBEditorPositions</key>
|
<key>IBEditorPositions</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>29</key>
|
<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>
|
<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>
|
<key>513</key>
|
||||||
<string>85 528 109 106 0 0 1024 746 </string>
|
<string>184 659 109 106 0 0 1280 1002 </string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IBFramework Version</key>
|
<key>IBFramework Version</key>
|
||||||
<string>443.0</string>
|
<string>443.0</string>
|
||||||
|
@ -29,11 +29,11 @@
|
||||||
<key>IBOpenObjects</key>
|
<key>IBOpenObjects</key>
|
||||||
<array>
|
<array>
|
||||||
<integer>21</integer>
|
<integer>21</integer>
|
||||||
|
<integer>463</integer>
|
||||||
<integer>29</integer>
|
<integer>29</integer>
|
||||||
<integer>513</integer>
|
<integer>513</integer>
|
||||||
<integer>463</integer>
|
|
||||||
</array>
|
</array>
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>8I127</string>
|
<string>8H14</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@
|
||||||
<key>463</key>
|
<key>463</key>
|
||||||
<string>484 555 312 249 0 0 1280 1002 </string>
|
<string>484 555 312 249 0 0 1280 1002 </string>
|
||||||
<key>513</key>
|
<key>513</key>
|
||||||
<string>513 509 166 106 0 0 1024 746 </string>
|
<string>666 713 166 106 0 0 1280 1002 </string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IBFramework Version</key>
|
<key>IBFramework Version</key>
|
||||||
<string>443.0</string>
|
<string>443.0</string>
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
</array>
|
</array>
|
||||||
<key>IBOpenObjects</key>
|
<key>IBOpenObjects</key>
|
||||||
<array>
|
<array>
|
||||||
<integer>513</integer>
|
|
||||||
<integer>21</integer>
|
<integer>21</integer>
|
||||||
|
<integer>513</integer>
|
||||||
</array>
|
</array>
|
||||||
<key>IBSystem Version</key>
|
<key>IBSystem Version</key>
|
||||||
<string>8I127</string>
|
<string>8H14</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Binary file not shown.
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
PlaylistEntry *currentEntry;
|
PlaylistEntry *currentEntry;
|
||||||
|
|
||||||
int shuffleIndex;
|
|
||||||
|
|
||||||
BOOL shuffle;
|
BOOL shuffle;
|
||||||
BOOL repeat;
|
BOOL repeat;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +59,8 @@
|
||||||
- (BOOL)next;
|
- (BOOL)next;
|
||||||
- (BOOL)prev;
|
- (BOOL)prev;
|
||||||
|
|
||||||
- (PlaylistEntry *)entryAtOffset:(int)offset;
|
- (PlaylistEntry *)entryAtIndex:(int)i;
|
||||||
|
|
||||||
- (void)addShuffledListToBack;
|
- (void)addShuffledListToBack;
|
||||||
- (void)addShuffledListToFront;
|
- (void)addShuffledListToFront;
|
||||||
- (void)resetShuffleList;
|
- (void)resetShuffleList;
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
acceptableFileTypes = [[NSArray alloc] initWithObjects:@"shn",@"wv",@"ogg",@"wav",@"mpc",@"flac",@"ape",@"mp3",@"aiff",@"aif",@"aac",nil];
|
acceptableFileTypes = [[NSArray alloc] initWithObjects:@"shn",@"wv",@"ogg",@"wav",@"mpc",@"flac",@"ape",@"mp3",@"aiff",@"aif",@"aac",nil];
|
||||||
acceptablePlaylistTypes = [[NSArray alloc] initWithObjects:@"playlist",nil];
|
acceptablePlaylistTypes = [[NSArray alloc] initWithObjects:@"playlist",nil];
|
||||||
shuffleList = [[NSMutableArray alloc] init];
|
shuffleList = [[NSMutableArray alloc] init];
|
||||||
shuffleIndex = 0;
|
|
||||||
// DBLog(@"DAH BUTTER CHORNAR: %@", history);
|
// DBLog(@"DAH BUTTER CHORNAR: %@", history);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +297,8 @@
|
||||||
- (PlaylistEntry *)entryAtIndex:(int)i
|
- (PlaylistEntry *)entryAtIndex:(int)i
|
||||||
{
|
{
|
||||||
//Need to fix for SHUFFLE MODE! holy fix.
|
//Need to fix for SHUFFLE MODE! holy fix.
|
||||||
|
if (shuffle == NO)
|
||||||
|
{
|
||||||
i--;
|
i--;
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
{
|
||||||
|
@ -315,10 +316,41 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return [[self arrangedObjects] objectAtIndex:i];
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (PlaylistEntry *)entryAtOffset:(int)offset
|
return [shuffleList objectAtIndex:i];
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*- (PlaylistEntry *)entryAtOffset:(int)offset
|
||||||
{
|
{
|
||||||
if (shuffle == YES)
|
if (shuffle == YES)
|
||||||
{
|
{
|
||||||
|
@ -377,7 +409,8 @@
|
||||||
return [[self arrangedObjects] objectAtIndex:i];
|
return [[self arrangedObjects] objectAtIndex:i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
- (BOOL)next
|
- (BOOL)next
|
||||||
{
|
{
|
||||||
PlaylistEntry *pe;
|
PlaylistEntry *pe;
|
||||||
|
@ -409,7 +442,7 @@
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
- (void)addShuffledListToBack
|
- (void)addShuffledListToBack
|
||||||
{
|
{
|
||||||
NSArray *newList = [Shuffle shuffleList:[self arrangedObjects]];
|
NSArray *newList = [Shuffle shuffleList:[self arrangedObjects]];
|
||||||
|
@ -431,7 +464,7 @@
|
||||||
[shuffleList removeAllObjects];
|
[shuffleList removeAllObjects];
|
||||||
[self addShuffledListToFront];
|
[self addShuffledListToFront];
|
||||||
|
|
||||||
shuffleIndex = 0;
|
// shuffleIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)currentEntry
|
- (id)currentEntry
|
||||||
|
|
|
@ -34,6 +34,15 @@
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)setShuffleIndex:(int)si
|
||||||
|
{
|
||||||
|
shuffleIdx = si;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(int)shuffleIndex
|
||||||
|
{
|
||||||
|
return shuffleIdx;
|
||||||
|
}
|
||||||
|
|
||||||
-(void)setIndex:(int)i
|
-(void)setIndex:(int)i
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue