diff options
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 |