diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 26 |
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; + } + } } /** |