diff options
author | Stuart Connolly <stuart02@gmail.com> | 2014-01-17 00:09:54 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2014-01-17 00:09:54 +0000 |
commit | 902c9540a283f75b414cfef9806e4f443cc21c06 (patch) | |
tree | 6ee865d83cf59d34e193a87b7218d0b31e9b6f44 /Source/SPBundleEditorController.m | |
parent | f3bad7a571142a284ac3e983530bd9d42ac7c7e2 (diff) | |
download | sequelpro-902c9540a283f75b414cfef9806e4f443cc21c06.tar.gz sequelpro-902c9540a283f75b414cfef9806e4f443cc21c06.tar.bz2 sequelpro-902c9540a283f75b414cfef9806e4f443cc21c06.zip |
Fix remaining deprecation warnings.
Diffstat (limited to 'Source/SPBundleEditorController.m')
-rw-r--r-- | Source/SPBundleEditorController.m | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m index 15b4dc77..90625087 100644 --- a/Source/SPBundleEditorController.m +++ b/Source/SPBundleEditorController.m @@ -37,6 +37,8 @@ #import "SPBundleCommandTextView.h" #import "SPSplitView.h" +static NSString *SPSaveBundleAction = @"SPSaveBundle"; + #define kBundleNameKey @"bundleName" #define kChildrenKey @"_children_" #define kInputFieldScopeArrayIndex 0 @@ -728,12 +730,10 @@ */ - (IBAction)revealCommandBundleInFinder:(id)sender { - - if([commandsOutlineView numberOfSelectedRows] != 1) return; + if ([commandsOutlineView numberOfSelectedRows] != 1) return; [[NSWorkspace sharedWorkspace] selectFile:[NSString stringWithFormat:@"%@/%@.%@/%@", bundlePath, [[self _currentSelectedObject] objectForKey:kBundleNameKey], SPUserBundleFileExtension, SPBundleFileName] inFileViewerRootedAtPath:nil]; - } /** @@ -750,7 +750,12 @@ [panel setCanSelectHiddenExtension:YES]; [panel setCanCreateDirectories:YES]; - [panel beginSheetForDirectory:nil file:[[self _currentSelectedObject] objectForKey:kBundleNameKey] modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"saveBundle"]; + [panel setNameFieldStringValue:[[self _currentSelectedObject] objectForKey:kBundleNameKey]]; + + [panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger returnCode) + { + [self sheetDidEnd:panel returnCode:returnCode contextInfo:SPSaveBundleAction]; + }]; } /** @@ -774,9 +779,7 @@ */ - (IBAction)showWindow:(id)sender { - [super showWindow:sender]; - } - (IBAction)performClose:(id)sender |