1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

clean up some of the code where it checks for 10.5

This commit is contained in:
Mitchell Livingston 2007-12-12 16:28:40 +00:00
parent a60d623021
commit 7567ecc2bb

View file

@ -248,14 +248,20 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
[fWindow setContentMinSize: contentMinSize];
if ([NSApp isOnLeopardOrBetter])
[fWindow setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge];
if ([NSApp isOnLeopardOrBetter])
[[fTotalTorrentsField cell] setBackgroundStyle: NSBackgroundStyleRaised];
if (![NSApp isOnLeopardOrBetter])
{
[fWindow setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge];
[[fTotalTorrentsField cell] setBackgroundStyle: NSBackgroundStyleRaised];
}
else
{
//status bar
[fStatusBar setShowOnTiger: YES];
[fStatusButton setHidden: YES];
[fStatusTigerField setHidden: NO];
[fStatusTigerImageView setHidden: NO];
//filter bar
[fNoFilterButton sizeToFit];
[fDownloadFilterButton sizeToFit];
[fSeedFilterButton sizeToFit];
@ -291,15 +297,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
//set up status bar
[fStatusBar setHidden: YES];
if (![NSApp isOnLeopardOrBetter])
{
[fStatusBar setShowOnTiger: YES];
[fStatusButton setHidden: YES];
[fStatusTigerField setHidden: NO];
[fStatusTigerImageView setHidden: NO];
}
[fTotalDLField setToolTip: NSLocalizedString(@"Total download speed", "Status Bar -> speed tooltip")];
[fTotalULField setToolTip: NSLocalizedString(@"Total upload speed", "Status Bar -> speed tooltip")];
@ -1480,16 +1477,21 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
else
statusString = @"";
[fStatusButton setTitle: statusString];
[fStatusButton sizeToFit];
[fStatusTigerField setStringValue: statusString];
[fStatusTigerField sizeToFit];
//width ends up being too long
NSRect statusFrame = [fStatusButton frame];
statusFrame.size.width -= 25.0;
[fStatusButton setFrame: statusFrame];
if ([NSApp isOnLeopardOrBetter])
{
[fStatusButton setTitle: statusString];
[fStatusButton sizeToFit];
//width ends up being too long
NSRect statusFrame = [fStatusButton frame];
statusFrame.size.width -= 25.0;
[fStatusButton setFrame: statusFrame];
}
else
{
[fStatusTigerField setStringValue: statusString];
[fStatusTigerField sizeToFit];
}
}
}