diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-06-29 12:14:07 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-06-29 12:14:07 +0000 |
commit | 92fbb6abcc89c946b1565de862b59af016651fdb (patch) | |
tree | 28dc60dee658d81efa4b3be126870e4e8f0535bf /Source | |
parent | 615a5494c22b9d7f710f3b3efafda85f19e2909d (diff) | |
download | sequelpro-92fbb6abcc89c946b1565de862b59af016651fdb.tar.gz sequelpro-92fbb6abcc89c946b1565de862b59af016651fdb.tar.bz2 sequelpro-92fbb6abcc89c946b1565de862b59af016651fdb.zip |
• Open Session file
- set [tabbar setHideForSingleTab:NO] if window has more than one tab in order to avoid issues while animated fading-in of the tabbar
- assign initial keyboard short-cut ^⌥⌘S for Save Session (needs to be discussed)
- still hidden
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.m | 3 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 1 | ||||
-rw-r--r-- | Source/SPWindowController.h | 1 | ||||
-rw-r--r-- | Source/SPWindowController.m | 4 |
4 files changed, 8 insertions, 1 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index aa2cf3b1..85ad93a2 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -343,6 +343,9 @@ SPWindowController *newWindowController = [[SPWindowController alloc] initWithWindowNibName:@"MainWindow"]; NSWindow *newWindow = [newWindowController window]; + if([[window objectForKey:@"tabs"] count] > 1) + [newWindowController setHideForSingleTab:NO]; + // The first window should use autosaving; subsequent windows should cascade. // So attempt to set the frame autosave name; this will succeed for the very // first window, and fail for others. diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 60b29366..d2ba3d85 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -178,7 +178,6 @@ [prefs addObserver:self forKeyPath:SPConsoleEnableLogging options:NSKeyValueObservingOptionNew context:NULL]; // Register for notifications - //register for notifications [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willPerformQuery:) name:@"SMySQLQueryWillBePerformed" object:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hasPerformedQuery:) diff --git a/Source/SPWindowController.h b/Source/SPWindowController.h index 1f3945cc..33d6df49 100644 --- a/Source/SPWindowController.h +++ b/Source/SPWindowController.h @@ -48,5 +48,6 @@ - (IBAction)selectPreviousDocumentTab:(id)sender; - (NSArray *)documents; - (void)selectTabAtIndex:(NSInteger)index; +- (void)setHideForSingleTab:(BOOL)hide; @end diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index 4c25ece2..5f8e34cd 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -303,6 +303,10 @@ } } +- (void)setHideForSingleTab:(BOOL)hide +{ + [tabBar setHideForSingleTab:hide]; +} #pragma mark - #pragma mark Tab view delegate methods |