mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
random cleanup
This commit is contained in:
parent
f7bc63e080
commit
274f6b2707
2 changed files with 9 additions and 9 deletions
|
@ -138,8 +138,7 @@
|
|||
}
|
||||
|
||||
NSSize imageSize = [image size];
|
||||
NSRect imageRect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
|
||||
cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5,
|
||||
NSRect imageRect = NSMakeRect(NSMidX(cellFrame) - imageSize.width * 0.5, NSMidY(cellFrame) - imageSize.height * 0.5,
|
||||
imageSize.width, imageSize.height);
|
||||
|
||||
if ([NSApp isOnSnowLeopardOrBetter])
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
@interface GroupsPrefsController (Private)
|
||||
|
||||
- (void) updateSelectedGroup;
|
||||
- (void) refreshCustomLocation;
|
||||
- (void) refreshCustomLocationWithSingleGroup;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -318,7 +318,7 @@
|
|||
[fSelectedColorNameField setStringValue: [[GroupsController groups] nameForIndex: index]];
|
||||
[fSelectedColorNameField setEnabled: YES];
|
||||
|
||||
[self refreshCustomLocation];
|
||||
[self refreshCustomLocationWithSingleGroup];
|
||||
|
||||
[fAutoAssignRulesEnableCheck setState: [[GroupsController groups] usesAutoAssignRulesForIndex: index]];
|
||||
[fAutoAssignRulesEnableCheck setEnabled: YES];
|
||||
|
@ -337,17 +337,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) refreshCustomLocation
|
||||
- (void) refreshCustomLocationWithSingleGroup
|
||||
{
|
||||
const NSInteger index = [[GroupsController groups] indexForRow: [fTableView selectedRow]];
|
||||
|
||||
[fCustomLocationEnableCheck setState: [[GroupsController groups] usesCustomDownloadLocationForIndex: index]];
|
||||
const BOOL hasCustomLocation = [[GroupsController groups] usesCustomDownloadLocationForIndex: index];
|
||||
[fCustomLocationEnableCheck setState: hasCustomLocation];
|
||||
[fCustomLocationEnableCheck setEnabled: YES];
|
||||
[fCustomLocationPopUp setEnabled: [fCustomLocationEnableCheck state] == NSOnState];
|
||||
[fCustomLocationPopUp setEnabled: hasCustomLocation];
|
||||
|
||||
if ([[GroupsController groups] customDownloadLocationForIndex: index])
|
||||
NSString * location = [[GroupsController groups] customDownloadLocationForIndex: index];
|
||||
if (location)
|
||||
{
|
||||
NSString * location = [[GroupsController groups] customDownloadLocationForIndex: index];
|
||||
ExpandedPathToPathTransformer * pathTransformer = [[[ExpandedPathToPathTransformer alloc] init] autorelease];
|
||||
[[fCustomLocationPopUp itemAtIndex: 0] setTitle: [pathTransformer transformedValue: location]];
|
||||
ExpandedPathToIconTransformer * iconTransformer = [[[ExpandedPathToIconTransformer alloc] init] autorelease];
|
||||
|
|
Loading…
Reference in a new issue