aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-14 10:19:41 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-14 10:19:41 +0000
commit5cb5315642a6b53f1cac66e8ae9489e117f47730 (patch)
tree5bedb15506273479a19395d1b19a0a3d7a9a8c94 /Source
parent4cead29edd672205c84c69d33cac7ac4d76577df (diff)
downloadsequelpro-5cb5315642a6b53f1cac66e8ae9489e117f47730.tar.gz
sequelpro-5cb5315642a6b53f1cac66e8ae9489e117f47730.tar.bz2
sequelpro-5cb5315642a6b53f1cac66e8ae9489e117f47730.zip
• simplified tooltips for tabs
• preparations for "Move Tab to New Window" action menu action • display Select Next/Previous Tab menu items also under Main Menu > Window to be consistent
Diffstat (limited to 'Source')
-rw-r--r--Source/SPWindowController.h1
-rw-r--r--Source/SPWindowController.m29
2 files changed, 7 insertions, 23 deletions
diff --git a/Source/SPWindowController.h b/Source/SPWindowController.h
index 875bd7e5..28186901 100644
--- a/Source/SPWindowController.h
+++ b/Source/SPWindowController.h
@@ -39,6 +39,7 @@
// Database connection management
- (IBAction) addNewConnection:(id)sender;
+- (IBAction) openSelectedTabInNewWindow:(id)sender;
- (SPDatabaseDocument *) selectedTableDocument;
- (void) updateSelectedTableDocument;
- (void) updateAllTabTitles:(id)sender;
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index d03762d8..5b6b7732 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -329,31 +329,9 @@
// if cell is not selected show full title 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];
- [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;
+ return [[[tabViewItem identifier] parentWindow] title];
}
- return @"";
}
/**
@@ -469,6 +447,11 @@
[tabBar setHideForSingleTab:YES];
}
+- (IBAction) openSelectedTabInNewWindow:(id)sender
+{
+ // not yet implemented
+}
+
#pragma mark -
#pragma mark Window delegate methods