Changeset 2271


Ignore:
Timestamp:
Jul 1, 2007, 6:02:10 PM (15 years ago)
Author:
livings124
Message:

same as last commit, with different objects

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r2270 r2271  
    199199    [fIPCController release];
    200200   
    201     [fAutoImportedNames release];
     201    if (fAutoImportedNames)
     202        [fAutoImportedNames release];
    202203    if (fPendingTorrentDownloads)
    203204        [fPendingTorrentDownloads release];
     
    443444   
    444445    //auto importing
    445     fAutoImportedNames = [[NSMutableArray alloc] init];
    446446    [self checkAutoImportDirectory];
    447447}
     
    20232023    }
    20242024   
    2025     [fAutoImportedNames removeAllObjects];
     2025    if (fAutoImportedNames)
     2026        [fAutoImportedNames removeAllObjects];
    20262027    [self checkAutoImportDirectory];
    20272028}
     
    20412042    //only check files that have not been checked yet
    20422043    NSMutableArray * newNames = [importedNames mutableCopy];
    2043     [newNames removeObjectsInArray: fAutoImportedNames];
     2044   
     2045    if (fAutoImportedNames)
     2046        [newNames removeObjectsInArray: fAutoImportedNames];
     2047    else
     2048        fAutoImportedNames = [[NSMutableArray alloc] init];
    20442049    [fAutoImportedNames setArray: importedNames];
    20452050   
  • trunk/macosx/PrefsController.h

    r1970 r2271  
    3535    BOOL                    fHasLoaded;
    3636   
    37     NSToolbar               * fToolbar;
    3837    IBOutlet NSView         * fGeneralView, * fTransfersView, * fBandwidthView, * fNetworkView;
    3938   
  • trunk/macosx/PrefsController.m

    r2239 r2271  
    115115    fHasLoaded = YES;
    116116   
    117     fToolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
    118     [fToolbar setDelegate: self];
    119     [fToolbar setAllowsUserCustomization: NO];
    120     [[self window] setToolbar: fToolbar];
    121     [fToolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
    122     [fToolbar setSizeMode: NSToolbarSizeModeRegular];
    123 
    124     [fToolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
     117    NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
     118    [toolbar setDelegate: self];
     119    [toolbar setAllowsUserCustomization: NO];
     120    [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
     121    [toolbar setSizeMode: NSToolbarSizeModeRegular];
     122    [[self window] setToolbar: toolbar];
     123
     124    [toolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
    125125    [self setPrefView: nil];
    126126   
     
    638638    else
    639639    {
     640        NSToolbar * toolbar = [window toolbar];
     641        NSString * itemIdentifier = [toolbar selectedItemIdentifier];
     642        NSEnumerator * enumerator = [[toolbar items] objectEnumerator];
    640643        NSToolbarItem * item;
    641         NSEnumerator * enumerator = [[fToolbar items] objectEnumerator];
    642644        while ((item = [enumerator nextObject]))
    643             if ([[item itemIdentifier] isEqualToString: [fToolbar selectedItemIdentifier]])
     645            if ([[item itemIdentifier] isEqualToString: itemIdentifier])
    644646            {
    645647                [window setTitle: [item label]];
Note: See TracChangeset for help on using the changeset viewer.