Changeset 9800


Ignore:
Timestamp:
Dec 19, 2009, 7:17:09 PM (12 years ago)
Author:
livings124
Message:

random cleanup

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FilePriorityCell.m

    r9423 r9800  
    139139       
    140140        NSSize imageSize = [image size];
    141         NSRect imageRect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5,
    142                                         cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5,
     141        NSRect imageRect = NSMakeRect(NSMidX(cellFrame) - imageSize.width * 0.5, NSMidY(cellFrame) - imageSize.height * 0.5,
    143142                                        imageSize.width, imageSize.height);
    144143       
  • trunk/macosx/GroupsPrefsController.m

    r9790 r9800  
    3636
    3737- (void) updateSelectedGroup;
    38 - (void) refreshCustomLocation;
     38- (void) refreshCustomLocationWithSingleGroup;
    3939
    4040@end
     
    319319        [fSelectedColorNameField setEnabled: YES];
    320320       
    321         [self refreshCustomLocation];
     321        [self refreshCustomLocationWithSingleGroup];
    322322
    323323        [fAutoAssignRulesEnableCheck setState: [[GroupsController groups] usesAutoAssignRulesForIndex: index]];
     
    338338}
    339339
    340 - (void) refreshCustomLocation
     340- (void) refreshCustomLocationWithSingleGroup
    341341{
    342342    const NSInteger index = [[GroupsController groups] indexForRow: [fTableView selectedRow]];
    343343   
    344     [fCustomLocationEnableCheck setState: [[GroupsController groups] usesCustomDownloadLocationForIndex: index]];
     344    const BOOL hasCustomLocation = [[GroupsController groups] usesCustomDownloadLocationForIndex: index];
     345    [fCustomLocationEnableCheck setState: hasCustomLocation];
    345346    [fCustomLocationEnableCheck setEnabled: YES];
    346     [fCustomLocationPopUp setEnabled: [fCustomLocationEnableCheck state] == NSOnState];
    347    
    348     if ([[GroupsController groups] customDownloadLocationForIndex: index])
    349     {
    350         NSString * location = [[GroupsController groups] customDownloadLocationForIndex: index];
     347    [fCustomLocationPopUp setEnabled: hasCustomLocation];
     348   
     349    NSString * location = [[GroupsController groups] customDownloadLocationForIndex: index];
     350    if (location)
     351    {
    351352        ExpandedPathToPathTransformer * pathTransformer = [[[ExpandedPathToPathTransformer alloc] init] autorelease];
    352353        [[fCustomLocationPopUp itemAtIndex: 0] setTitle: [pathTransformer transformedValue: location]];
Note: See TracChangeset for help on using the changeset viewer.