diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-25 19:53:05 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-25 19:53:05 +0000 |
commit | fa5f69379821283787e66405c7a6bd43dc16a71e (patch) | |
tree | c0286d5bb604952c91d5f907b0645fce0da9d95c /Source | |
parent | c6779c7de40f38c8ff7f8d8ffa7c649164921556 (diff) | |
download | sequelpro-fa5f69379821283787e66405c7a6bd43dc16a71e.tar.gz sequelpro-fa5f69379821283787e66405c7a6bd43dc16a71e.tar.bz2 sequelpro-fa5f69379821283787e66405c7a6bd43dc16a71e.zip |
Add support for selecting the triggers view as the default in the general preferences pane.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.m | 2 | ||||
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 | ||||
-rw-r--r-- | Source/TableDocument.m | 32 |
4 files changed, 23 insertions, 13 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 7e84a7f0..0281896f 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -529,7 +529,7 @@ */ - (IBAction) showHelp:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.sequelpro.com/docs/Getting_Connected"]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:SPGettingConnectedDocURL]]; } #pragma mark - diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 64703381..aabef38e 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -237,6 +237,7 @@ extern NSString *SPDocumentationURL; extern NSString *SPContactURL; extern NSString *SPKeyboardShortcutsURL; extern NSString *SPMySQLSearchURL; +extern NSString *SPGettingConnectedDocURL; // Toolbar constants diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 68fa162f..35b0a173 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -167,6 +167,7 @@ NSString *SPDocumentationURL = @"http://www.sequelpro.com/do NSString *SPContactURL = @"http://www.sequelpro.com/docs/Contact_the_developers"; NSString *SPKeyboardShortcutsURL = @"http://www.sequelpro.com/docs/Keyboard_Shortcuts"; NSString *SPMySQLSearchURL = @"http://search.mysql.com/search?q=%@&site=refman-%@"; +NSString *SPGettingConnectedDocURL = @"http://www.sequelpro.com/docs/Getting_Connected"; // Toolbar constants diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 65cf9049..e764a44f 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -581,6 +581,8 @@ [self viewStatus:self]; else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_RELATIONS"]) [self viewRelations:self]; + else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_TRIGGERS"]) + [self viewTriggers:self]; [[tablesListInstance valueForKeyPath:@"tablesListView"] scrollRowToVisible:[tables indexOfObject:[spfSession objectForKey:@"selectedTable"]]]; @@ -744,6 +746,9 @@ case SPQueryEditorViewMode: [self viewQuery:self]; break; + case SPTriggersViewMode: + [self viewTriggers:self]; + break; } } @@ -2870,22 +2875,25 @@ switch([spHistoryControllerInstance currentlySelectedView]){ case SPHistoryViewStructure: - aString = @"SP_VIEW_STRUCTURE"; - break; + aString = @"SP_VIEW_STRUCTURE"; + break; case SPHistoryViewContent: - aString = @"SP_VIEW_CONTENT"; - break; + aString = @"SP_VIEW_CONTENT"; + break; case SPHistoryViewCustomQuery: - aString = @"SP_VIEW_CUSTOMQUERY"; - break; + aString = @"SP_VIEW_CUSTOMQUERY"; + break; case SPHistoryViewStatus: - aString = @"SP_VIEW_STATUS"; - break; + aString = @"SP_VIEW_STATUS"; + break; case SPHistoryViewRelations: - aString = @"SP_VIEW_RELATIONS"; - break; + aString = @"SP_VIEW_RELATIONS"; + break; + case SPHistoryViewTriggers: + aString = @"SP_VIEW_TRIGGERS"; + break; default: - aString = @"SP_VIEW_STRUCTURE"; + aString = @"SP_VIEW_STRUCTURE"; } [session setObject:aString forKey:@"view"]; @@ -3284,7 +3292,7 @@ [mainToolbar setSelectedItemIdentifier:SPMainToolbarTableTriggers]; [spHistoryControllerInstance updateHistoryEntries]; - //[prefs setInteger:SPRelationsViewMode forKey:SPLastViewMode]; + [prefs setInteger:SPTriggersViewMode forKey:SPLastViewMode]; } |