Commits

Anonymous committed 47bfb14

Updated UI

Comments (0)

Files changed (12)

Custom/ClickField.h

 /* ClickField */
 
 #import <Cocoa/Cocoa.h>
-#import "RoundBackgroundField.h"
-@interface ClickField : RoundBackgroundField
+
+@interface ClickField : NSTextField
 {
 
 }

Custom/RoundBackgroundCell.h

-//
-//  RoundBackgroundCell.h
-//  Cog
-//
-//  Created by Zaphod Beeblebrox on 4/28/06.
-//  Copyright 2006 __MyCompanyName__. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-
-@interface RoundBackgroundCell : NSTextFieldCell {
-	NSBezierPath *path;
-}
-
-@end

Custom/RoundBackgroundCell.m

-//
-//  BLRoundedTableCell.m
-//
-//  Created by Fraser Speirs on Wed Mar 17 2004.
-//  
-//	This code is placed in the public domain.
-//  It is based on ideas presented by Apple Computer 
-//  in sample code via ADC, extended to suit the context of
-//  NSTableViewCell
-
-#import "RoundBackgroundCell.h"
-
-
-@implementation RoundBackgroundCell
-
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
-	NSRect labelRect = [self drawingRectForBounds:cellFrame];
-	float capRadius = NSHeight(labelRect) / 2.0;
-	
-	// Next, we hack up a slightly different rect for the superclass
-	// to draw in.  This shifts the text to the right out of the 
-	// highlight curve and makes sure the text doesn't jump around 
-	// when the selection changes
-	float widthIndent = 5.0;
-	float heightIndent = 2.0;
-	NSRect newRect = NSMakeRect(cellFrame.origin.x+widthIndent,
-								cellFrame.origin.y+heightIndent,
-								cellFrame.size.width-widthIndent,
-								cellFrame.size.height-heightIndent);
-
-	if([self isHighlighted]) {
-		[super drawInteriorWithFrame: newRect inView: controlView];
-	}
-	else {			
-		[super drawInteriorWithFrame: newRect inView: controlView];
-		NSBezierPath *highlightPath = [[NSBezierPath alloc] init];
-		
-		NSPoint startPoint = NSMakePoint(labelRect.origin.x+capRadius,
-										 labelRect.origin.y+capRadius);
-		
-		NSPoint endPoint = NSMakePoint((labelRect.origin.x-capRadius)+(labelRect.size.width), 
-									   labelRect.origin.y+capRadius);
-		
-		[highlightPath appendBezierPathWithArcWithCenter: startPoint
-												  radius: capRadius 
-											  startAngle: 90.0f
-												endAngle: 270.f
-											   clockwise: NO];
-		
-		[highlightPath appendBezierPathWithArcWithCenter: endPoint 
-												  radius: capRadius
-											  startAngle: 270.0f 
-												endAngle: 90.f 
-											   clockwise: NO];
-		
-		[highlightPath closePath];
-		
-		// Might want to change the text color here
-		// NSColor *originalTextColor = [self textColor];
-		if (highlightPath) {
-			[[[NSColor controlAlternatingRowBackgroundColors] objectAtIndex:1] set];
-			[highlightPath fill];
-			
-			NSColor *strokeColor = [NSColor secondarySelectedControlColor];
-			
-			[strokeColor set];
-			[highlightPath stroke];
-			[highlightPath release];
-		}
-		
-		[super drawInteriorWithFrame: newRect inView: controlView];
-		
-		// And change it back here
-		/*
-		 if (originalTextColor) {
-			 [self setTextColor:originalTextColor];
-		 }
-
-		 */
-	}
-}
-@end

Custom/RoundBackgroundField.h

-//
-//  RoundBackgroundField.h
-//  Cog
-//
-//  Created by Zaphod Beeblebrox on 4/28/06.
-//  Copyright 2006 __MyCompanyName__. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-
-@interface RoundBackgroundField : NSTextField {
-
-}
-
-@end

Custom/RoundBackgroundField.m

-//
-//  RoundBackgroundField.m
-//  Cog
-//
-//  Created by Zaphod Beeblebrox on 4/28/06.
-//  Copyright 2006 __MyCompanyName__. All rights reserved.
-//
-
-#import "RoundBackgroundField.h"
-#import "RoundBackgroundCell.h"
-
-@implementation RoundBackgroundField
-
-- (id)initWithCoder:(NSCoder *)decoder
-{
-	self = [super initWithCoder:decoder];
-	if (self)
-	{
-		id cell = [[RoundBackgroundCell alloc] init];
-		id oldcell = [self cell];
-		
-		[cell setBackgroundColor: [self backgroundColor]];
-		[cell setDrawsBackground: NO];
-		
-		[cell setScrollable:[oldcell isScrollable]];
-		[cell setAlignment:[oldcell alignment]];
-		[cell setLineBreakMode:[oldcell lineBreakMode]];
-		
-		[cell setAction: [oldcell action]];
-		[cell setTarget: [oldcell target]];
-		
-		[cell setStringValue: [oldcell stringValue]];
-		
-		[self setCell: cell];
-		[cell release];
-	}
-	
-	return self;
-}
-
-@end

Custom/TrackingSlider.m

 			TrackingCell *trackingCell;
 			trackingCell = [[TrackingCell alloc] init];
 			
+			[trackingCell setControlSize:[[self cell] controlSize]];
 			[trackingCell setAction:[[self cell] action]];
 			[trackingCell setContinuous:[[self cell] isContinuous]];
 			[trackingCell setTarget:[[self cell] target]];

English.lproj/Localizable.strings

 "PrevButtonTooltip" = "Previous";
 "NextButtonTooltip" = "Next";
 
-"TimeElapsed" = "Time: %i:%02i";
-"TimeRemaining" = "Time: -%i:%02i";
+"TimeElapsed" = "%i:%02i";
+"TimeRemaining" = "-%i:%02i";
 
 "AddButtonTooltip" = "Add files";
 "RemoveButtonTooltip" = "Remove selected files";

English.lproj/MainMenu.nib/classes.nib

             }; 
             SUPERCLASS = NSObject; 
         }, 
-        {CLASS = ClickField; LANGUAGE = ObjC; SUPERCLASS = RoundBackgroundField; }, 
+        {CLASS = ClickField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; }, 
         {
             CLASS = DNDArrayController; 
             LANGUAGE = ObjC; 

English.lproj/MainMenu.nib/info.nib

 <plist version="1.0">
 <dict>
 	<key>IBDocumentLocation</key>
-	<string>34 369 617 240 0 0 1024 746 </string>
+	<string>141 329 617 240 0 0 1024 746 </string>
 	<key>IBEditorPositions</key>
 	<dict>
 		<key>29</key>
 	<integer>3</integer>
 	<key>IBOpenObjects</key>
 	<array>
+		<integer>463</integer>
 		<integer>823</integer>
+		<integer>29</integer>
+		<integer>21</integer>
 		<integer>513</integer>
-		<integer>21</integer>
-		<integer>463</integer>
-		<integer>29</integer>
 	</array>
 	<key>IBSystem Version</key>
 	<string>8I127</string>

English.lproj/MainMenu.nib/keyedobjects.nib

Binary file modified.

English.lproj/Nib.strings

Binary file modified.

Playlist/PlaylistController.m

 	
 	NSEnumerator *enumerator;
 	PlaylistEntry *entry;
-	enumerator = [[self arrangedObjects] objectEnumerator];
+	enumerator = [[self content] objectEnumerator];
 	while (entry = [enumerator nextObject])
 	{
 		[filenames addObject:[entry filename]];