Added Stop after Current, hooked it into Ctrl-Z for now, for lack of anything better (it needs to be easily accessible one way or the other), added image to signify status by adding a little red square to the play icon.
parent
386078fdc5
commit
771a6de380
|
@ -143,6 +143,7 @@
|
|||
8E9A2E860BA78B500091081B /* SecondsFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A2E840BA78B500091081B /* SecondsFormatter.m */; };
|
||||
8E9A2EDA0BA78D9D0091081B /* IndexFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A2ED80BA78D9D0091081B /* IndexFormatter.m */; };
|
||||
8E9A30160BA792DC0091081B /* NSFileHandle+CreateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */; };
|
||||
B09E93000D7316850064F138 /* stop_current.png in Resources */ = {isa = PBXBuildFile; fileRef = B09E92FF0D7316850064F138 /* stop_current.png */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -667,6 +668,7 @@
|
|||
8E9A2ED80BA78D9D0091081B /* IndexFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IndexFormatter.m; sourceTree = "<group>"; };
|
||||
8E9A30130BA792DC0091081B /* NSFileHandle+CreateFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSFileHandle+CreateFile.h"; sourceTree = "<group>"; };
|
||||
8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileHandle+CreateFile.m"; sourceTree = "<group>"; };
|
||||
B09E92FF0D7316850064F138 /* stop_current.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = stop_current.png; path = Images/stop_current.png; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -853,6 +855,7 @@
|
|||
177EC02D0B8BC2E60000BC8C /* Images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B09E92FF0D7316850064F138 /* stop_current.png */,
|
||||
17A8F7190D6A89730095DA13 /* repeat_album.png */,
|
||||
17A8F6820D6A7FCA0095DA13 /* repeat_all.png */,
|
||||
17A8F6830D6A7FCA0095DA13 /* repeat_none.png */,
|
||||
|
@ -1612,6 +1615,7 @@
|
|||
17A8F6860D6A7FCA0095DA13 /* repeat_none.png in Resources */,
|
||||
17A8F6870D6A7FCA0095DA13 /* repeat_one.png in Resources */,
|
||||
17A8F71A0D6A89730095DA13 /* repeat_album.png in Resources */,
|
||||
B09E93000D7316850064F138 /* stop_current.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 314 B |
|
@ -44,6 +44,7 @@ typedef enum {
|
|||
//Private Methods
|
||||
- (void)updateTotalTime;
|
||||
- (void)updatePlaylistIndexes;
|
||||
- (IBAction)stopAfterCurrent:(id)sender;
|
||||
|
||||
|
||||
//PUBLIC METHODS
|
||||
|
|
|
@ -382,6 +382,9 @@
|
|||
|
||||
- (PlaylistEntry *)getNextEntry:(PlaylistEntry *)pe
|
||||
{
|
||||
if (pe.status == kCogEntryStoppingAfterCurrent)
|
||||
return nil;
|
||||
|
||||
if (repeat == RepeatOne) {
|
||||
return pe;
|
||||
}
|
||||
|
@ -720,5 +723,12 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (IBAction)stopAfterCurrent:(id)sender
|
||||
{
|
||||
if (currentEntry.status != kCogEntryStoppingAfterCurrent)
|
||||
currentEntry.status = kCogEntryStoppingAfterCurrent;
|
||||
else
|
||||
currentEntry.status = kCogEntryPlaying;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -13,7 +13,8 @@ typedef enum {
|
|||
kCogEntryPlaying,
|
||||
kCogEntryError,
|
||||
kCogEntryQueued,
|
||||
kCogEntryRemoved
|
||||
kCogEntryRemoved,
|
||||
kCogEntryStoppingAfterCurrent,
|
||||
} PlaylistEntryStatus;
|
||||
|
||||
@interface PlaylistEntry : NSObject {
|
||||
|
|
|
@ -13,10 +13,11 @@
|
|||
NSImage *playImage;
|
||||
NSImage *queueImage;
|
||||
NSImage *errorImage;
|
||||
NSImage *stopAfterCurrentImage;
|
||||
}
|
||||
|
||||
@property(retain) NSImage *playImage;
|
||||
@property(retain) NSImage *queueImage;
|
||||
@property(retain) NSImage *errorImage;
|
||||
|
||||
@property(retain) NSImage *stopAfterCurrentImage;
|
||||
@end
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
@synthesize playImage;
|
||||
@synthesize queueImage;
|
||||
@synthesize errorImage;
|
||||
@synthesize stopAfterCurrentImage;
|
||||
|
||||
+ (Class)transformedValueClass { return [NSImage class]; }
|
||||
+ (BOOL)allowsReverseTransformation { return NO; }
|
||||
|
@ -27,6 +28,7 @@
|
|||
self.playImage = [NSImage imageNamed:@"play"];
|
||||
self.queueImage = [NSImage imageNamed:@"NSAddTemplate"];
|
||||
self.errorImage = [NSImage imageNamed:@"NSStopProgressTemplate"];
|
||||
self.stopAfterCurrentImage = [NSImage imageNamed:@"stop_current"];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -46,6 +48,9 @@
|
|||
else if (status == kCogEntryError) {
|
||||
return self.errorImage;
|
||||
}
|
||||
else if (status == kCogEntryStoppingAfterCurrent) {
|
||||
return self.stopAfterCurrentImage;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue