aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-13 00:54:58 +0000
committerrowanbeentje <rowan@beent.je>2009-04-13 00:54:58 +0000
commit4b9fd266140ad877b714ea58481e234062f864af (patch)
treeaf86dff8b36059228f8f80b25534f4ce1a20feca
parent8df357943f349909e7c835dba7ac081d84dc4d86 (diff)
downloadsequelpro-4b9fd266140ad877b714ea58481e234062f864af.tar.gz
sequelpro-4b9fd266140ad877b714ea58481e234062f864af.tar.bz2
sequelpro-4b9fd266140ad877b714ea58481e234062f864af.zip
- Tweak the favorite button tooltips to refer to 'favorite's instead of 'row's
- Add the keyboard shortcuts advertised on the button tooltips to the buttons - When duplicating a favorite, append " Copy" to the name to ensure the keychain password isn't automatically shared and therefore accidentally changed or deleted for both when one favorite is edited.
-rw-r--r--Interfaces/English.lproj/Preferences.xib53
-rw-r--r--Source/SPPreferenceController.m3
2 files changed, 48 insertions, 8 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib
index c3e4dc90..275e04e3 100644
--- a/Interfaces/English.lproj/Preferences.xib
+++ b/Interfaces/English.lproj/Preferences.xib
@@ -946,7 +946,7 @@
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="593732956">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -965,6 +965,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{62, -1}, {32, 25}}</string>
<reference key="NSSuperview" ref="984943037"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="318654291">
<int key="NSCellFlags">67239424</int>
@@ -973,13 +974,13 @@
<reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="393737860"/>
<int key="NSButtonFlags">-2042347265</int>
- <int key="NSButtonFlags2">35</int>
+ <int key="NSButtonFlags2">268435491</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">button_duplicate</string>
</object>
<string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
+ <string key="NSKeyEquivalent">d</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
@@ -989,6 +990,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, -1}, {32, 25}}</string>
<reference key="NSSuperview" ref="984943037"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="445051430">
<int key="NSCellFlags">67239424</int>
@@ -997,13 +999,13 @@
<reference key="NSSupport" ref="320262838"/>
<reference key="NSControlView" ref="995543573"/>
<int key="NSButtonFlags">-2042347265</int>
- <int key="NSButtonFlags2">35</int>
+ <int key="NSButtonFlags2">402653219</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">button_add</string>
</object>
<string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
+ <string key="NSKeyEquivalent">a</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
@@ -1013,6 +1015,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{31, -1}, {32, 25}}</string>
<reference key="NSSuperview" ref="984943037"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="388903914">
<int key="NSCellFlags">67239424</int>
@@ -1047,6 +1050,7 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{198, 358}</string>
<reference key="NSSuperview" ref="253139122"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
<nil key="NSNextResponder"/>
@@ -1128,6 +1132,7 @@
</object>
<string key="NSFrame">{{1, 1}, {198, 358}}</string>
<reference key="NSSuperview" ref="533802223"/>
+ <reference key="NSWindow"/>
<reference key="NSDocView" ref="279932544"/>
<reference key="NSBGColor" ref="887465699"/>
<int key="NScvFlags">4</int>
@@ -1137,6 +1142,7 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{183, 1}, {11, 317}}</string>
<reference key="NSSuperview" ref="533802223"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="533802223"/>
<string key="NSAction">_doScroller:</string>
@@ -1147,6 +1153,7 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {311, 15}}</string>
<reference key="NSSuperview" ref="533802223"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="533802223"/>
<string key="NSAction">_doScroller:</string>
@@ -1155,6 +1162,7 @@
</object>
<string key="NSFrame">{{-2, 22}, {200, 360}}</string>
<reference key="NSSuperview" ref="984943037"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">530</int>
<reference key="NSVScroller" ref="940130901"/>
<reference key="NSHScroller" ref="2545381"/>
@@ -1178,6 +1186,7 @@
</object>
<string key="NSFrame">{{94, 0}, {103, 23}}</string>
<reference key="NSSuperview" ref="984943037"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="578184809">
<int key="NSCellFlags">130560</int>
@@ -1196,6 +1205,7 @@
</object>
<string key="NSFrameSize">{197, 381}</string>
<reference key="NSSuperview" ref="141072039"/>
+ <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="343315962">
@@ -1208,6 +1218,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 238}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="994019596">
<int key="NSCellFlags">-1804468671</int>
@@ -1225,6 +1236,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 264}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSecureTextFieldCell" key="NSCell" id="1031469346">
<int key="NSCellFlags">343014976</int>
@@ -1246,6 +1258,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 290}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="738673778">
<int key="NSCellFlags">-1804468671</int>
@@ -1263,6 +1276,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 186}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="961856924">
<int key="NSCellFlags">-1804468671</int>
@@ -1280,6 +1294,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 316}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="621427359">
<int key="NSCellFlags">-1804468671</int>
@@ -1297,6 +1312,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 342}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="570809913">
<int key="NSCellFlags">-1804468671</int>
@@ -1314,6 +1330,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 212}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="669626672">
<int key="NSCellFlags">-1804468671</int>
@@ -1331,6 +1348,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{103, 163}, {103, 18}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1026644963">
<int key="NSCellFlags">604110336</int>
@@ -1352,6 +1370,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 112}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="882064965">
<int key="NSCellFlags">-1267597759</int>
@@ -1369,6 +1388,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 86}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="996160392">
<int key="NSCellFlags">-1267597759</int>
@@ -1386,6 +1406,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 138}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="782045166">
<int key="NSCellFlags">-1267597759</int>
@@ -1403,6 +1424,7 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{106, 60}, {176, 19}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="160881703">
<int key="NSCellFlags">-1267597759</int>
@@ -1420,6 +1442,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{68, 318}, {33, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="240920834">
<int key="NSCellFlags">68288064</int>
@@ -1436,6 +1459,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{69, 292}, {32, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="260120936">
<int key="NSCellFlags">68288064</int>
@@ -1452,6 +1476,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{44, 240}, {57, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="33430397">
<int key="NSCellFlags">68288064</int>
@@ -1468,6 +1493,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{43, 266}, {58, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="700495139">
<int key="NSCellFlags">68288064</int>
@@ -1484,6 +1510,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{72, 188}, {29, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="723136745">
<int key="NSCellFlags">68288064</int>
@@ -1500,6 +1527,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{62, 344}, {39, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="299715951">
<int key="NSCellFlags">68288064</int>
@@ -1516,6 +1544,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{58, 214}, {43, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="8126371">
<int key="NSCellFlags">68288064</int>
@@ -1532,6 +1561,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{46, 114}, {55, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="544940669">
<int key="NSCellFlags">68288064</int>
@@ -1548,6 +1578,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 88}, {81, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="26059905">
<int key="NSCellFlags">68288064</int>
@@ -1564,6 +1595,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{45, 140}, {56, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="642636551">
<int key="NSCellFlags">68288064</int>
@@ -1580,6 +1612,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{41, 62}, {60, 14}}</string>
<reference key="NSSuperview" ref="343315962"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="646676137">
<int key="NSCellFlags">68288064</int>
@@ -1594,16 +1627,20 @@
</object>
<string key="NSFrame">{{198, 0}, {302, 381}}</string>
<reference key="NSSuperview" ref="141072039"/>
+ <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrameSize">{500, 381}</string>
<reference key="NSSuperview" ref="593732956"/>
+ <reference key="NSWindow"/>
<bool key="NSIsVertical">YES</bool>
<int key="NSDividerStyle">2</int>
</object>
</object>
<string key="NSFrameSize">{500, 381}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="1041614321">
@@ -4554,7 +4591,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="995543573"/>
- <string type="base64-UTF8" key="toolTip">QWRkIHJvdyAo4oyY4oylQSk</string>
+ <string type="base64-UTF8" key="toolTip">QWRkIGZhdm9yaXRlICjijJjijKVBKQ</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -4563,7 +4600,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="432531937"/>
- <string key="toolTip">Delete selected row(s)</string>
+ <string key="toolTip">Delete selected favorite(s)</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -4572,7 +4609,7 @@ AQAAAAA</bytes>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="name">ToolTip</string>
<reference key="object" ref="393737860"/>
- <string type="base64-UTF8" key="toolTip">RHVwbGljYXRlIHNlbGVjdGVkIHJvdyAo4oyYRCk</string>
+ <string type="base64-UTF8" key="toolTip">RHVwbGljYXRlIHNlbGVjdGVkIGZhdm9yaXRlICjijJhEKQ</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 5daf7f37..79589119 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -249,6 +249,9 @@
if ([favoritesTableView numberOfSelectedRows] == 1) {
NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:[favoritesTableView selectedRow]]];
+ // Alter the name to ensure the keychain item isn't shared and therefore overwritten when changed
+ [favorite setObject:[NSString stringWithFormat:@"%@ Copy", [favorite objectForKey:@"name"]] forKey:@"name"];
+
[favoritesController addObject:favorite];
[favoritesTableView reloadData];