diff options
author | Marius Ursache <bamse16@yahoo.com> | 2013-11-11 21:20:26 +1100 |
---|---|---|
committer | Marius Ursache <bamse16@yahoo.com> | 2013-11-11 21:20:26 +1100 |
commit | df35d702fe561629fddfa66cd99d0839b8e05910 (patch) | |
tree | 1cbe404daf3c106f9809d5db540154e79e8a9b23 /Source | |
parent | f7e3077285b2249351ef494219576d1e7a31c09a (diff) | |
download | sequelpro-df35d702fe561629fddfa66cd99d0839b8e05910.tar.gz sequelpro-df35d702fe561629fddfa66cd99d0839b8e05910.tar.bz2 sequelpro-df35d702fe561629fddfa66cd99d0839b8e05910.zip |
Updated Change Export Directory panel sheet to 10.6+ SDK
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPExportController.m | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 3fc5fbf0..4ffbe085 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -399,13 +399,14 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; [panel setCanChooseFiles:NO]; [panel setCanChooseDirectories:YES]; [panel setCanCreateDirectories:YES]; - - [panel beginSheetForDirectory:[exportPathField stringValue] - file:nil - modalForWindow:[self window] - modalDelegate:self - didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) - contextInfo:nil]; + + [panel setDirectoryURL:[NSURL URLWithString:[exportPathField stringValue]]]; + [panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger returnCode) { + if (returnCode == NSOKButton) { + [exportPathField setStringValue:[[panel directoryURL] path]]; + [prefs setObject:[[panel directoryURL] path] forKey:SPExportLastDirectory]; + } + }]; } /** @@ -699,17 +700,6 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; } /** - * Invoked when the user dismisses the save panel. Updates the selected directory if they clicked OK. - */ -- (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo -{ - if (returnCode == NSOKButton) { - [exportPathField setStringValue:[panel directory]]; - [prefs setObject:[panel directory] forKey:SPExportLastDirectory]; - } -} - -/** * Menu item validation. */ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem |