mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
use a mutable array
This commit is contained in:
parent
f09f6568b0
commit
3bac536bc2
2 changed files with 4 additions and 11 deletions
|
@ -93,7 +93,7 @@
|
||||||
BOOL fUpdateInProgress;
|
BOOL fUpdateInProgress;
|
||||||
Badger * fBadger;
|
Badger * fBadger;
|
||||||
|
|
||||||
NSArray * fAutoImportedNames;
|
NSMutableArray * fAutoImportedNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) openFiles: (NSArray *) filenames;
|
- (void) openFiles: (NSArray *) filenames;
|
||||||
|
|
|
@ -113,8 +113,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
[fSortType release];
|
[fSortType release];
|
||||||
[fFilterType release];
|
[fFilterType release];
|
||||||
|
|
||||||
if (fAutoImportedNames)
|
[fAutoImportedNames release];
|
||||||
[fAutoImportedNames release];
|
|
||||||
|
|
||||||
tr_close(fLib);
|
tr_close(fLib);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
@ -1563,11 +1562,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
|
|
||||||
- (void) changeAutoImport
|
- (void) changeAutoImport
|
||||||
{
|
{
|
||||||
if (fAutoImportedNames)
|
[fAutoImportedNames removeAllObjects];
|
||||||
{
|
|
||||||
[fAutoImportedNames release];
|
|
||||||
fAutoImportedNames = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ([fDefaults boolForKey: @"AutoImport"])
|
if ([fDefaults boolForKey: @"AutoImport"])
|
||||||
[self checkAutoImportDirectory];
|
[self checkAutoImportDirectory];
|
||||||
|
@ -1587,9 +1582,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
//only import those that have not been imported yet
|
//only import those that have not been imported yet
|
||||||
NSMutableArray * newNames = [importedNames mutableCopy];
|
NSMutableArray * newNames = [importedNames mutableCopy];
|
||||||
[newNames removeObjectsInArray: fAutoImportedNames];
|
[newNames removeObjectsInArray: fAutoImportedNames];
|
||||||
if (fAutoImportedNames)
|
[fAutoImportedNames addObjectsFromArray: newNames];
|
||||||
[fAutoImportedNames release];
|
|
||||||
fAutoImportedNames = [importedNames retain];
|
|
||||||
|
|
||||||
NSEnumerator * enumerator = [newNames objectEnumerator];
|
NSEnumerator * enumerator = [newNames objectEnumerator];
|
||||||
NSString * file;
|
NSString * file;
|
||||||
|
|
Loading…
Reference in a new issue