Cleaning up and various changes for 0.0.4
parent
c7ce4c7501
commit
04643f6d08
|
@ -61,7 +61,6 @@
|
|||
[shuffleButton setToolTip:@"Shuffle mode"];
|
||||
[repeatButton setToolTip:@"Repeat mode"];
|
||||
|
||||
|
||||
NSString *filename = @"~/Library/Application Support/Cog/Default.playlist";
|
||||
[playlistController loadPlaylist:[filename stringByExpandingTildeInPath]];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* ClickField */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "SoundController.h"
|
||||
|
||||
@interface ClickField : NSTextField
|
||||
{
|
||||
IBOutlet SoundController *soundController;
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,17 @@
|
|||
#import "ClickField.h"
|
||||
|
||||
@implementation ClickField
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
if([theEvent type] == NSLeftMouseDown)
|
||||
{
|
||||
[soundController toggleShowTimeRemaining:self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,8 @@
|
|||
/* InfoView */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface InfoView : NSView
|
||||
{
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,21 @@
|
|||
#import "InfoView.h"
|
||||
|
||||
@implementation InfoView
|
||||
/*
|
||||
- (id)initWithFrame:(NSRect)frameRect
|
||||
{
|
||||
if ((self = [super initWithFrame:frameRect]) != nil) {
|
||||
// Add initialization code here
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
}
|
||||
*/
|
||||
- (BOOL)isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,14 @@
|
|||
/* TrackingCell */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface TrackingCell : NSSliderCell
|
||||
{
|
||||
BOOL tracking;
|
||||
}
|
||||
|
||||
- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView;
|
||||
- (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flags;
|
||||
- (BOOL)tracking;
|
||||
|
||||
@end
|
|
@ -0,0 +1,27 @@
|
|||
#import "TrackingCell.h"
|
||||
|
||||
@implementation TrackingCell
|
||||
|
||||
- (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView
|
||||
{
|
||||
// DBLog(@"TRACKING");
|
||||
tracking = YES;
|
||||
return [super startTrackingAt:startPoint inView:controlView];
|
||||
|
||||
}
|
||||
|
||||
- (void)stopTracking:(NSPoint)lastPoint at:(NSPoint)stopPoint inView:(NSView *)controlView mouseIsUp:(BOOL)flag
|
||||
{
|
||||
// DBLog(@"NOT TRACKING");
|
||||
tracking = NO;
|
||||
|
||||
[super stopTracking:lastPoint at:stopPoint inView:controlView mouseIsUp:flag];
|
||||
}
|
||||
|
||||
- (BOOL)tracking
|
||||
{
|
||||
return tracking;
|
||||
}
|
||||
|
||||
|
||||
@end
|
|
@ -0,0 +1,10 @@
|
|||
/* TrackingSlider */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface TrackingSlider : NSSlider
|
||||
{
|
||||
}
|
||||
-(BOOL)tracking;
|
||||
|
||||
@end
|
|
@ -0,0 +1,38 @@
|
|||
#import "TrackingSlider.h"
|
||||
#import "TrackingCell.h"
|
||||
|
||||
@implementation TrackingSlider
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder
|
||||
{
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self)
|
||||
{
|
||||
if (![[self cell] isKindOfClass:[TrackingCell class]])
|
||||
{
|
||||
TrackingCell *trackingCell;
|
||||
trackingCell = [[TrackingCell alloc] init];
|
||||
|
||||
[trackingCell setAction:[[self cell] action]];
|
||||
[trackingCell setContinuous:[[self cell] isContinuous]];
|
||||
[trackingCell setTarget:[[self cell] target]];
|
||||
[self setCell:trackingCell];
|
||||
|
||||
[trackingCell release];
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (Class) cellClass
|
||||
{
|
||||
return [TrackingCell class];
|
||||
}
|
||||
|
||||
-(BOOL)tracking
|
||||
{
|
||||
return [[self cell] tracking];
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue