Changeset 571


Ignore:
Timestamp:
Jul 13, 2006, 11:30:38 AM (16 years ago)
Author:
livings124
Message:

Use a mutable array for autoimport.

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r568 r571  
    7676   
    7777    NSTimer                     * fAutoImportTimer;
    78     NSArray                     * fAutoImportedNames;
     78    NSMutableArray              * fAutoImportedNames;
    7979   
    8080    BOOL                        fHasGrowl, fUpdateInProgress;
     
    126126
    127127- (void) sortTorrents;
    128 - (void) sortTorrentsRememberSelected: (BOOL) changeSelected;
     128- (void) sortTorrentsRememberSelected: (BOOL) rememberSelected;
    129129- (void) setSort: (id) sender;
    130130- (void) applyFilter;
  • trunk/macosx/Controller.m

    r570 r571  
    283283   
    284284    //timer for auto import, will check every 15 seconds
    285     fAutoImportedNames = [[NSArray alloc] init];
     285    fAutoImportedNames = [[NSMutableArray alloc] init];
    286286   
    287287    [self checkAutoImportDirectory: nil];
     
    859859}
    860860
    861 - (void) sortTorrentsRememberSelected: (BOOL) changeSelected
     861- (void) sortTorrentsRememberSelected: (BOOL) rememberSelected
    862862{
    863863    //remember selected rows if needed
    864864    NSArray * selectedTorrents = nil;
    865     if (changeSelected)
     865    if (rememberSelected)
    866866    {
    867867        int numSelected = [fTableView numberOfSelectedRows];
     
    12961296   
    12971297    //save the current list of files
    1298     [fAutoImportedNames release];
    1299     fAutoImportedNames = [allFileNames retain];
     1298    [fAutoImportedNames setArray: allFileNames];
    13001299   
    13011300    NSEnumerator * enumerator = [newFileNames objectEnumerator];
     
    13171316- (void) autoImportChange: (NSNotification *) notification
    13181317{
    1319     [fAutoImportedNames release];
    1320     fAutoImportedNames = [[NSArray alloc] init];
    1321    
     1318    [fAutoImportedNames removeAllObjects];
    13221319    [self checkAutoImportDirectory: nil];
    13231320}
Note: See TracChangeset for help on using the changeset viewer.