aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--Interfaces/English.lproj/MainMenu.xib105
-rw-r--r--Source/SPWindowController.h1
-rw-r--r--Source/SPWindowController.m29
3 files changed, 107 insertions, 28 deletions
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index 7fe77110..66bacb29 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="29"/>
+ <integer value="24"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1701,6 +1701,43 @@
<reference key="NSOnImage" ref="625762401"/>
<reference key="NSMixedImage" ref="315854375"/>
</object>
+ <object class="NSMenuItem" id="952513030">
+ <reference key="NSMenu" ref="850647710"/>
+ <string key="NSTitle">Select Next Tab</string>
+ <string type="base64-UTF8" key="NSKeyEquiv">CQ</string>
+ <int key="NSKeyEquivModMask">262144</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
+ <object class="NSMenuItem" id="591568093">
+ <reference key="NSMenu" ref="850647710"/>
+ <string key="NSTitle">Select Previous Tab</string>
+ <string type="base64-UTF8" key="NSKeyEquiv">CQ</string>
+ <int key="NSKeyEquivModMask">393216</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
+ <object class="NSMenuItem" id="875212976">
+ <reference key="NSMenu" ref="850647710"/>
+ <bool key="NSIsHidden">YES</bool>
+ <string key="NSTitle">Move Tab to New Window</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
+ <object class="NSMenuItem" id="1058401788">
+ <reference key="NSMenu" ref="850647710"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="625762401"/>
+ <reference key="NSMixedImage" ref="315854375"/>
+ </object>
<object class="NSMenuItem" id="751336988">
<reference key="NSMenu" ref="850647710"/>
<string key="NSTitle">Bring All to Front</string>
@@ -2851,6 +2888,30 @@
</object>
<int key="connectionID">1100</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">selectPreviousDocumentTab:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="591568093"/>
+ </object>
+ <int key="connectionID">1105</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">selectNextDocumentTab:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="952513030"/>
+ </object>
+ <int key="connectionID">1106</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openSelectedTabInNewWindow:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="875212976"/>
+ </object>
+ <int key="connectionID">1110</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2914,6 +2975,10 @@
<reference ref="324106717"/>
<reference ref="73952783"/>
<reference ref="744950758"/>
+ <reference ref="1058401788"/>
+ <reference ref="952513030"/>
+ <reference ref="591568093"/>
+ <reference ref="875212976"/>
</object>
<reference key="parent" ref="232591944"/>
</object>
@@ -4168,6 +4233,26 @@
<reference key="object" ref="789392667"/>
<reference key="parent" ref="466354362"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1101</int>
+ <reference key="object" ref="1058401788"/>
+ <reference key="parent" ref="850647710"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1102</int>
+ <reference key="object" ref="875212976"/>
+ <reference key="parent" ref="850647710"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1103</int>
+ <reference key="object" ref="952513030"/>
+ <reference key="parent" ref="850647710"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1104</int>
+ <reference key="object" ref="591568093"/>
+ <reference key="parent" ref="850647710"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -4217,6 +4302,10 @@
<string>1095.IBPluginDependency</string>
<string>1096.IBPluginDependency</string>
<string>1099.IBPluginDependency</string>
+ <string>1101.IBPluginDependency</string>
+ <string>1102.IBPluginDependency</string>
+ <string>1103.IBPluginDependency</string>
+ <string>1104.IBPluginDependency</string>
<string>111.IBPluginDependency</string>
<string>111.ImportedFromIB2</string>
<string>129.IBPluginDependency</string>
@@ -4553,6 +4642,10 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -4627,11 +4720,11 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{695, 305}, {194, 73}}</string>
+ <string>{{528, 322}, {269, 143}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{449, 1007}, {197, 53}}</string>
- <string>{{299, 717}, {511, 20}}</string>
+ <string>{{149, 465}, {511, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{506, 836}, {511, 20}}</string>
@@ -4647,7 +4740,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{491, 374}, {251, 343}}</string>
+ <string>{{341, 122}, {251, 343}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{698, 703}, {184, 133}}</string>
@@ -4908,7 +5001,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1100</int>
+ <int key="maxID">1110</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -6293,6 +6386,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addNewConnection:</string>
<string>closeTab:</string>
+ <string>openSelectedTabInNewWindow:</string>
<string>selectNextDocumentTab:</string>
<string>selectPreviousDocumentTab:</string>
<string>updateAllTabTitles:</string>
@@ -6304,6 +6398,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
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