same as last commit, with different objects
This commit is contained in:
parent
0f4aa186d5
commit
0fd3c80c7f
|
@ -198,7 +198,8 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
[fOverlayWindow release];
|
||||
[fIPCController release];
|
||||
|
||||
[fAutoImportedNames release];
|
||||
if (fAutoImportedNames)
|
||||
[fAutoImportedNames release];
|
||||
if (fPendingTorrentDownloads)
|
||||
[fPendingTorrentDownloads release];
|
||||
|
||||
|
@ -442,7 +443,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
selector: @selector(autoSpeedLimit) userInfo: nil repeats: YES];
|
||||
|
||||
//auto importing
|
||||
fAutoImportedNames = [[NSMutableArray alloc] init];
|
||||
[self checkAutoImportDirectory];
|
||||
}
|
||||
|
||||
|
@ -2022,7 +2022,8 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
fAutoImportTimer = nil;
|
||||
}
|
||||
|
||||
[fAutoImportedNames removeAllObjects];
|
||||
if (fAutoImportedNames)
|
||||
[fAutoImportedNames removeAllObjects];
|
||||
[self checkAutoImportDirectory];
|
||||
}
|
||||
|
||||
|
@ -2040,7 +2041,11 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
|
||||
//only check files that have not been checked yet
|
||||
NSMutableArray * newNames = [importedNames mutableCopy];
|
||||
[newNames removeObjectsInArray: fAutoImportedNames];
|
||||
|
||||
if (fAutoImportedNames)
|
||||
[newNames removeObjectsInArray: fAutoImportedNames];
|
||||
else
|
||||
fAutoImportedNames = [[NSMutableArray alloc] init];
|
||||
[fAutoImportedNames setArray: importedNames];
|
||||
|
||||
NSString * file;
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
NSUserDefaults * fDefaults;
|
||||
BOOL fHasLoaded;
|
||||
|
||||
NSToolbar * fToolbar;
|
||||
IBOutlet NSView * fGeneralView, * fTransfersView, * fBandwidthView, * fNetworkView;
|
||||
|
||||
IBOutlet NSPopUpButton * fFolderPopUp, * fIncompleteFolderPopUp, * fImportFolderPopUp,
|
||||
|
|
|
@ -114,14 +114,14 @@
|
|||
{
|
||||
fHasLoaded = YES;
|
||||
|
||||
fToolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
|
||||
[fToolbar setDelegate: self];
|
||||
[fToolbar setAllowsUserCustomization: NO];
|
||||
[[self window] setToolbar: fToolbar];
|
||||
[fToolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
|
||||
[fToolbar setSizeMode: NSToolbarSizeModeRegular];
|
||||
NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"Preferences Toolbar"];
|
||||
[toolbar setDelegate: self];
|
||||
[toolbar setAllowsUserCustomization: NO];
|
||||
[toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
|
||||
[toolbar setSizeMode: NSToolbarSizeModeRegular];
|
||||
[[self window] setToolbar: toolbar];
|
||||
|
||||
[fToolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
|
||||
[toolbar setSelectedItemIdentifier: TOOLBAR_GENERAL];
|
||||
[self setPrefView: nil];
|
||||
|
||||
//set download folder
|
||||
|
@ -637,10 +637,12 @@
|
|||
[window setTitle: [sender label]];
|
||||
else
|
||||
{
|
||||
NSToolbar * toolbar = [window toolbar];
|
||||
NSString * itemIdentifier = [toolbar selectedItemIdentifier];
|
||||
NSEnumerator * enumerator = [[toolbar items] objectEnumerator];
|
||||
NSToolbarItem * item;
|
||||
NSEnumerator * enumerator = [[fToolbar items] objectEnumerator];
|
||||
while ((item = [enumerator nextObject]))
|
||||
if ([[item itemIdentifier] isEqualToString: [fToolbar selectedItemIdentifier]])
|
||||
if ([[item itemIdentifier] isEqualToString: itemIdentifier])
|
||||
{
|
||||
[window setTitle: [item label]];
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue