1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-12 07:03:44 +00:00

Remove useless code that should've been removed a while ago.

This commit is contained in:
Mitchell Livingston 2006-07-16 04:55:02 +00:00
parent 41e4c33e2b
commit 826c8fd6c9
2 changed files with 8 additions and 20 deletions

View file

@ -28,9 +28,7 @@
{ {
NSImage * fButtonNormal, * fButtonOver, * fButtonPressed, * fButtonSelected; NSImage * fButtonNormal, * fButtonOver, * fButtonPressed, * fButtonSelected;
NSString * fPrefString, * fPrefKey;
BOOL fEnabled; BOOL fEnabled;
NSTrackingRectTag fTrackingTag; NSTrackingRectTag fTrackingTag;
} }

View file

@ -40,17 +40,7 @@
fButtonPressed = [[NSImage alloc] initWithSize: buttonSize]; fButtonPressed = [[NSImage alloc] initWithSize: buttonSize];
fButtonSelected = [[NSImage alloc] initWithSize: buttonSize]; fButtonSelected = [[NSImage alloc] initWithSize: buttonSize];
//create shape //rolled over button
NSBezierPath * rect = [NSBezierPath bezierPath];
float ovalDiamater = 20.0;
[rect appendBezierPathWithOvalInRect:
NSMakeRect(0, 0, ovalDiamater, buttonSize.height)];
[rect appendBezierPathWithOvalInRect:
NSMakeRect(buttonSize.width - ovalDiamater, 0, ovalDiamater, buttonSize.height)];
[rect appendBezierPathWithRect:
NSMakeRect(ovalDiamater * 0.5, 0, buttonSize.width - ovalDiamater, buttonSize.height)];
//create rolled over button
NSImage * leftOver = [NSImage imageNamed: @"FilterButtonOverLeft.png"], NSImage * leftOver = [NSImage imageNamed: @"FilterButtonOverLeft.png"],
* rightOver = [NSImage imageNamed: @"FilterButtonOverRight.png"], * rightOver = [NSImage imageNamed: @"FilterButtonOverRight.png"],
* mainOver = [NSImage imageNamed: @"FilterButtonOverMain.png"]; * mainOver = [NSImage imageNamed: @"FilterButtonOverMain.png"];
@ -71,7 +61,7 @@
[rightOver compositeToPoint: rightPoint operation: NSCompositeSourceOver]; [rightOver compositeToPoint: rightPoint operation: NSCompositeSourceOver];
[fButtonOver unlockFocus]; [fButtonOver unlockFocus];
//create pressed button //pressed button
NSImage * leftPressed = [NSImage imageNamed: @"FilterButtonPressedLeft.png"], NSImage * leftPressed = [NSImage imageNamed: @"FilterButtonPressedLeft.png"],
* rightPressed = [NSImage imageNamed: @"FilterButtonPressedRight.png"], * rightPressed = [NSImage imageNamed: @"FilterButtonPressedRight.png"],
* mainPressed = [NSImage imageNamed: @"FilterButtonPressedMain.png"]; * mainPressed = [NSImage imageNamed: @"FilterButtonPressedMain.png"];
@ -85,7 +75,7 @@
[rightPressed compositeToPoint: rightPoint operation: NSCompositeSourceOver]; [rightPressed compositeToPoint: rightPoint operation: NSCompositeSourceOver];
[fButtonPressed unlockFocus]; [fButtonPressed unlockFocus];
//create selected button //selected button
NSImage * leftSelected = [NSImage imageNamed: @"FilterButtonSelectedLeft.png"], NSImage * leftSelected = [NSImage imageNamed: @"FilterButtonSelectedLeft.png"],
* rightSelected = [NSImage imageNamed: @"FilterButtonSelectedRight.png"], * rightSelected = [NSImage imageNamed: @"FilterButtonSelectedRight.png"],
* mainSelected = [NSImage imageNamed: @"FilterButtonSelectedMain.png"]; * mainSelected = [NSImage imageNamed: @"FilterButtonSelectedMain.png"];
@ -115,7 +105,7 @@
[super dealloc]; [super dealloc];
} }
//call only once to avoid overlap //call only once to avoid overlapping text
- (void) setText: (NSString *) text - (void) setText: (NSString *) text
{ {
NSShadow * stringShadow = [[NSShadow alloc] init]; NSShadow * stringShadow = [[NSShadow alloc] init];
@ -138,22 +128,22 @@
NSRect textRect = NSMakeRect((buttonSize.width - textSize.width) * 0.5, NSRect textRect = NSMakeRect((buttonSize.width - textSize.width) * 0.5,
(buttonSize.height - textSize.height) * 0.5 + 1.5, textSize.width, textSize.height); (buttonSize.height - textSize.height) * 0.5 + 1.5, textSize.width, textSize.height);
//create normal button //normal button
[fButtonNormal lockFocus]; [fButtonNormal lockFocus];
[text drawInRect: textRect withAttributes: normalAttributes]; [text drawInRect: textRect withAttributes: normalAttributes];
[fButtonNormal unlockFocus]; [fButtonNormal unlockFocus];
//create rolled over button //rolled over button
[fButtonOver lockFocus]; [fButtonOver lockFocus];
[text drawInRect: textRect withAttributes: highlightedAttributes]; [text drawInRect: textRect withAttributes: highlightedAttributes];
[fButtonOver unlockFocus]; [fButtonOver unlockFocus];
//create pressed button //pressed button
[fButtonPressed lockFocus]; [fButtonPressed lockFocus];
[text drawInRect: textRect withAttributes: highlightedAttributes]; [text drawInRect: textRect withAttributes: highlightedAttributes];
[fButtonPressed unlockFocus]; [fButtonPressed unlockFocus];
//create selected button //selected button
[fButtonSelected lockFocus]; [fButtonSelected lockFocus];
[text drawInRect: textRect withAttributes: highlightedAttributes]; [text drawInRect: textRect withAttributes: highlightedAttributes];
[fButtonSelected unlockFocus]; [fButtonSelected unlockFocus];