mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
Got rid of a class variable, makes performSelectorOnMainThread retain
and release it instead
This commit is contained in:
parent
b7a28dd9a1
commit
ca82942852
2 changed files with 6 additions and 15 deletions
|
@ -70,7 +70,6 @@
|
|||
NSImage * fAppIcon;
|
||||
|
||||
io_connect_t fRootPort;
|
||||
NSArray * fFilenames;
|
||||
NSTimer * fTimer;
|
||||
NSTimer * fUpdateTimer;
|
||||
|
||||
|
|
|
@ -361,9 +361,8 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
//called on by applescript
|
||||
- (void) open: (NSArray *) files
|
||||
{
|
||||
fFilenames = [files retain];
|
||||
[self performSelectorOnMainThread: @selector(cantFindAName:)
|
||||
withObject: NULL waitUntilDone: NO];
|
||||
withObject: files waitUntilDone: NO];
|
||||
}
|
||||
|
||||
- (void) openShowSheet: (id) sender
|
||||
|
@ -384,24 +383,17 @@ static void sleepCallBack( void * controller, io_service_t y,
|
|||
contextInfo: NULL];
|
||||
}
|
||||
|
||||
- (void) cantFindAName: (id) sender
|
||||
- (void) cantFindAName: (NSArray *) filenames
|
||||
{
|
||||
[self application: NSApp openFiles: fFilenames];
|
||||
[fFilenames release];
|
||||
[self application: NSApp openFiles: filenames];
|
||||
}
|
||||
|
||||
- (void) openSheetClosed: (NSOpenPanel *) s returnCode: (int) code
|
||||
contextInfo: (void *) info
|
||||
{
|
||||
if( code != NSOKButton )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fFilenames = [[s filenames] retain];
|
||||
|
||||
[self performSelectorOnMainThread: @selector(cantFindAName:)
|
||||
withObject: NULL waitUntilDone: NO];
|
||||
if( code == NSOKButton )
|
||||
[self performSelectorOnMainThread: @selector(cantFindAName:)
|
||||
withObject: [s filenames] waitUntilDone: NO];
|
||||
}
|
||||
|
||||
- (void) resumeTorrent: (id) sender
|
||||
|
|
Loading…
Reference in a new issue