mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
remove "Tiger conditionals" from the status bar
This commit is contained in:
@@ -272,7 +272,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
else
|
||||
{
|
||||
//bottom bar
|
||||
[fBottomTigerBar setShowOnTiger: YES];
|
||||
[fBottomTigerBar setHidden: NO];
|
||||
[fBottomTigerLine setHidden: NO];
|
||||
|
||||
@@ -280,7 +279,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
[fSpeedLimitButton setBezelStyle: NSSmallSquareBezelStyle];
|
||||
|
||||
//status bar
|
||||
[fStatusBar setShowOnTiger: YES];
|
||||
[fStatusButton setHidden: YES];
|
||||
[fStatusTigerField setHidden: NO];
|
||||
[fStatusTigerImageView setHidden: NO];
|
||||
|
||||
@@ -203,11 +203,10 @@
|
||||
"Create torrent -> warning -> info")];
|
||||
[alert setAlertStyle: NSWarningAlertStyle];
|
||||
|
||||
//check common reasons for failure
|
||||
if (![trackerString hasPrefix: @"http://"])
|
||||
[alert setMessageText: NSLocalizedString(@"The tracker address must begin with \"http://\".",
|
||||
"Create torrent -> warning -> message")];
|
||||
else if ([trackerString length] <= 7) //don't allow blank addresses
|
||||
else if ([trackerString length] == 7) //don't allow blank addresses
|
||||
[alert setMessageText: NSLocalizedString(@"The tracker address cannot be blank.", "Create torrent -> warning -> message")];
|
||||
else
|
||||
[alert setMessageText: NSLocalizedString(@"The tracker address is invalid.", "Create torrent -> warning -> message")];
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
|
||||
@interface StatusBarView : NSView
|
||||
{
|
||||
BOOL fShow;
|
||||
|
||||
NSColor * fGrayBorderColor;
|
||||
}
|
||||
|
||||
- (void) setShowOnTiger: (BOOL) show;
|
||||
|
||||
@end
|
||||
|
||||
+18
-34
@@ -23,7 +23,6 @@
|
||||
*****************************************************************************/
|
||||
|
||||
#import "StatusBarView.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
|
||||
@implementation StatusBarView
|
||||
|
||||
@@ -31,8 +30,6 @@
|
||||
{
|
||||
if ((self = [super initWithFrame: rect]))
|
||||
{
|
||||
fShow = [NSApp isOnLeopardOrBetter];
|
||||
|
||||
fGrayBorderColor = [[NSColor colorWithCalibratedRed: 171.0/255.0 green: 171.0/255.0 blue: 171.0/255.0 alpha: 1.0] retain];
|
||||
}
|
||||
return self;
|
||||
@@ -44,42 +41,29 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setShowOnTiger: (BOOL) show
|
||||
{
|
||||
fShow = show || [NSApp isOnLeopardOrBetter];
|
||||
}
|
||||
|
||||
- (BOOL) isOpaque
|
||||
{
|
||||
return fShow;
|
||||
}
|
||||
|
||||
- (void) drawRect: (NSRect) rect
|
||||
{
|
||||
if (fShow)
|
||||
NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0, rect.size.width, 1.0);
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0, rect.size.width, 1.0);
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill(lineBorderRect);
|
||||
|
||||
rect.size.height--;
|
||||
}
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill(lineBorderRect);
|
||||
|
||||
lineBorderRect.origin.y = 0.0;
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
[fGrayBorderColor set];
|
||||
NSRectFill(lineBorderRect);
|
||||
|
||||
rect.origin.y++;
|
||||
rect.size.height--;
|
||||
}
|
||||
|
||||
[[NSColor controlColor] set];
|
||||
NSRectFill(rect);
|
||||
rect.size.height--;
|
||||
}
|
||||
|
||||
lineBorderRect.origin.y = 0.0;
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
[fGrayBorderColor set];
|
||||
NSRectFill(lineBorderRect);
|
||||
|
||||
rect.origin.y++;
|
||||
rect.size.height--;
|
||||
}
|
||||
|
||||
[[NSColor controlColor] set];
|
||||
NSRectFill(rect);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user