aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-03-25 19:53:05 +0000
committerstuconnolly <stuart02@gmail.com>2010-03-25 19:53:05 +0000
commitfa5f69379821283787e66405c7a6bd43dc16a71e (patch)
treec0286d5bb604952c91d5f907b0645fce0da9d95c /Source/TableDocument.m
parentc6779c7de40f38c8ff7f8d8ffa7c649164921556 (diff)
downloadsequelpro-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/TableDocument.m')
-rw-r--r--Source/TableDocument.m32
1 files changed, 20 insertions, 12 deletions
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];
}