aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-11-02 08:31:31 +0000
committeravenjamin <avenjamin@gmail.com>2009-11-02 08:31:31 +0000
commit84708d14baec176b8d7bea124243e42c333bd328 (patch)
treebe6c465ef99523ee926cf90b28051f0aeda5d5ca /Source
parent8e527f643cd29cde785db48a45a73a316cc84474 (diff)
downloadsequelpro-84708d14baec176b8d7bea124243e42c333bd328.tar.gz
sequelpro-84708d14baec176b8d7bea124243e42c333bd328.tar.bz2
sequelpro-84708d14baec176b8d7bea124243e42c333bd328.zip
• Finish off implementation to set the default selection view mode. Issue #249
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDocument.m26
1 files changed, 22 insertions, 4 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 8847d103..089c6306 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -653,8 +653,7 @@
[customQueryInstance setMySQLversion:mySQLVersion];
[tableWindow setTitle:[self displaySPName]];
- [self viewStructure:self];
-
+
// Connected Growl notification
[[SPGrowlController sharedGrowlController] notifyWithTitle:@"Connected"
description:[NSString stringWithFormat:NSLocalizedString(@"Connected to %@",@"description for connected growl notification"), [tableWindow title]]
@@ -690,9 +689,28 @@
else
[tableWindow makeFirstResponder:[tablesListInstance valueForKeyPath:@"tablesListView"]];
- if(spfSession != nil)
+ if(spfSession != nil) {
[self restoreSession];
-
+ } else {
+ switch ([prefs integerForKey:SPDefaultViewMode] > 0 ? [prefs integerForKey:SPDefaultViewMode] : [prefs integerForKey:SPLastViewMode]) {
+ default:
+ case SPStructureViewMode:
+ [self viewStructure:self];
+ break;
+ case SPContentViewMode:
+ [self viewContent:self];
+ break;
+ case SPRelationsViewMode:
+ [self viewRelations:self];
+ break;
+ case SPTableInfoViewMode:
+ [self viewStatus:self];
+ break;
+ case SPQueryEditorViewMode:
+ [self viewQuery:self];
+ break;
+ }
+ }
}
/**