cantFindAName didn't make sense for opening files.
This commit is contained in:
parent
317ba16b08
commit
b49d206a1a
|
@ -235,8 +235,7 @@ static void sleepCallBack( void * controller, io_service_t y,
|
||||||
[self showInfo: nil];
|
[self showInfo: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) applicationShouldHandleReopen: (NSApplication *) app
|
- (BOOL) applicationShouldHandleReopen: (NSApplication *) app hasVisibleWindows: (BOOL) visibleWindows
|
||||||
hasVisibleWindows: (BOOL) visibleWindows
|
|
||||||
{
|
{
|
||||||
if (!visibleWindows)
|
if (!visibleWindows)
|
||||||
[fWindow makeKeyAndOrderFront: nil];
|
[fWindow makeKeyAndOrderFront: nil];
|
||||||
|
@ -277,8 +276,7 @@ static void sleepCallBack( void * controller, io_service_t y,
|
||||||
contextInfo: (void *) contextInfo
|
contextInfo: (void *) contextInfo
|
||||||
{
|
{
|
||||||
[NSApp stopModal];
|
[NSApp stopModal];
|
||||||
[NSApp replyToApplicationShouldTerminate:
|
[NSApp replyToApplicationShouldTerminate: returnCode == NSAlertDefaultReturn];
|
||||||
(returnCode == NSAlertDefaultReturn)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) applicationWillTerminate: (NSNotification *) notification
|
- (void) applicationWillTerminate: (NSNotification *) notification
|
||||||
|
@ -440,11 +438,10 @@ static void sleepCallBack( void * controller, io_service_t y,
|
||||||
|
|
||||||
[panel beginSheetForDirectory: nil file: nil types: fileTypes
|
[panel beginSheetForDirectory: nil file: nil types: fileTypes
|
||||||
modalForWindow: fWindow modalDelegate: self didEndSelector:
|
modalForWindow: fWindow modalDelegate: self didEndSelector:
|
||||||
@selector( openSheetClosed:returnCode:contextInfo: )
|
@selector(openSheetClosed:returnCode:contextInfo:) contextInfo: nil];
|
||||||
contextInfo: nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) cantFindAName: (NSArray *) filenames
|
- (void) openFromSheet: (NSArray *) filenames
|
||||||
{
|
{
|
||||||
[self application: NSApp openFiles: filenames];
|
[self application: NSApp openFiles: filenames];
|
||||||
}
|
}
|
||||||
|
@ -452,8 +449,8 @@ static void sleepCallBack( void * controller, io_service_t y,
|
||||||
- (void) openSheetClosed: (NSOpenPanel *) panel returnCode: (int) code
|
- (void) openSheetClosed: (NSOpenPanel *) panel returnCode: (int) code
|
||||||
contextInfo: (void *) info
|
contextInfo: (void *) info
|
||||||
{
|
{
|
||||||
if( code == NSOKButton )
|
if (code == NSOKButton)
|
||||||
[self performSelectorOnMainThread: @selector(cantFindAName:)
|
[self performSelectorOnMainThread: @selector(openFromSheet:)
|
||||||
withObject: [panel filenames] waitUntilDone: NO];
|
withObject: [panel filenames] waitUntilDone: NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue