aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-18 09:52:15 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-18 09:52:15 +0000
commitb57ad98e4fc5efca2b96d759936a852e7ee68630 (patch)
treee7f58be5ffa235282d65ea0da9b615da6d0f9377 /Source/SPWindowController.m
parentf4957e259b41f2ce4f1eaac6e0f75b82d34995b7 (diff)
downloadsequelpro-b57ad98e4fc5efca2b96d759936a852e7ee68630.tar.gz
sequelpro-b57ad98e4fc5efca2b96d759936a852e7ee68630.tar.bz2
sequelpro-b57ad98e4fc5efca2b96d759936a852e7ee68630.zip
• simplified and unified tab tooltips
• added tooltips for tab's overflow menu
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m31
1 files changed, 4 insertions, 27 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 1a90592c..da23113b 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -404,33 +404,10 @@
// if cell is not selected show full title plus MySQL version is enabled as tooltip
} else {
-
- SPDatabaseDocument *doc = [tabViewItem identifier];
- NSMutableString *tabTitle;
-
- // Determine name details
- NSString *pathName = @"";
- if ([[[doc fileURL] path] length] && ![doc isUntitled])
- pathName = [NSString stringWithFormat:@"%@ — ", [[[doc fileURL] path] lastPathComponent]];
-
- if ([doc getConnection] == nil)
- return [NSString stringWithFormat:@"%@%@", pathName, @"Sequel Pro"];
-
- tabTitle = [NSMutableString string];
-
- // Add the MySQL version to the window title if enabled in prefs
- if ([[NSUserDefaults standardUserDefaults] boolForKey:SPDisplayServerVersionInWindowTitle]) [tabTitle appendFormat:@"(MySQL %@)\n", [doc mySQLVersion]];
-
- [tabTitle appendString:[doc name]];
- if ([doc database]) {
- if ([tabTitle length]) [tabTitle appendString:@"/"];
- [tabTitle appendString:[doc database]];
- }
- if ([[doc table] length]) {
- if ([tabTitle length]) [tabTitle appendString:@"/"];
- [tabTitle appendString:[doc table]];
- }
- return tabTitle;
+ if([[tabViewItem identifier] respondsToSelector:@selector(tabTitleForTooltip)])
+ return [[tabViewItem identifier] tabTitleForTooltip];
+
+ return @"";
}