From 5cb5315642a6b53f1cac66e8ae9489e117f47730 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 14 Jun 2010 10:19:41 +0000 Subject: =?UTF-8?q?=E2=80=A2=20simplified=20tooltips=20for=20tabs=20?= =?UTF-8?q?=E2=80=A2=20preparations=20for=20"Move=20Tab=20to=20New=20Windo?= =?UTF-8?q?w"=20action=20menu=20action=20=E2=80=A2=20display=20Select=20Ne?= =?UTF-8?q?xt/Previous=20Tab=20menu=20items=20also=20under=20Main=20Menu?= =?UTF-8?q?=20>=20Window=20to=20be=20consistent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPWindowController.h | 1 + Source/SPWindowController.m | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 23 deletions(-) (limited to 'Source') 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 -- cgit v1.2.3