aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-29 12:14:07 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-29 12:14:07 +0000
commit92fbb6abcc89c946b1565de862b59af016651fdb (patch)
tree28dc60dee658d81efa4b3be126870e4e8f0535bf /Source
parent615a5494c22b9d7f710f3b3efafda85f19e2909d (diff)
downloadsequelpro-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.m3
-rw-r--r--Source/SPDatabaseDocument.m1
-rw-r--r--Source/SPWindowController.h1
-rw-r--r--Source/SPWindowController.m4
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