From 4b9fd266140ad877b714ea58481e234062f864af Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 13 Apr 2009 00:54:58 +0000 Subject: - 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. --- Interfaces/English.lproj/Preferences.xib | 53 +++++++++++++++++++++++++++----- Source/SPPreferenceController.m | 3 ++ 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 @@ NSView - + 268 YES @@ -965,6 +965,7 @@ 292 {{62, -1}, {32, 25}} + YES 67239424 @@ -973,13 +974,13 @@ -2042347265 - 35 + 268435491 NSImage button_duplicate - + d 400 75 @@ -989,6 +990,7 @@ 292 {{0, -1}, {32, 25}} + YES 67239424 @@ -997,13 +999,13 @@ -2042347265 - 35 + 402653219 NSImage button_add - + a 400 75 @@ -1013,6 +1015,7 @@ 292 {{31, -1}, {32, 25}} + YES 67239424 @@ -1047,6 +1050,7 @@ 4352 {198, 358} + YES @@ -1128,6 +1132,7 @@ {{1, 1}, {198, 358}} + 4 @@ -1137,6 +1142,7 @@ -2147483392 {{183, 1}, {11, 317}} + 256 _doScroller: @@ -1147,6 +1153,7 @@ -2147483392 {{-100, -100}, {311, 15}} + 1 _doScroller: @@ -1155,6 +1162,7 @@ {{-2, 22}, {200, 360}} + 530 @@ -1178,6 +1186,7 @@ {{94, 0}, {103, 23}} + YES 130560 @@ -1196,6 +1205,7 @@ {197, 381} + NSView @@ -1208,6 +1218,7 @@ 266 {{106, 238}, {176, 19}} + YES -1804468671 @@ -1225,6 +1236,7 @@ 266 {{106, 264}, {176, 19}} + YES 343014976 @@ -1246,6 +1258,7 @@ 266 {{106, 290}, {176, 19}} + YES -1804468671 @@ -1263,6 +1276,7 @@ 266 {{106, 186}, {176, 19}} + YES -1804468671 @@ -1280,6 +1294,7 @@ 266 {{106, 316}, {176, 19}} + YES -1804468671 @@ -1297,6 +1312,7 @@ 266 {{106, 342}, {176, 19}} + YES -1804468671 @@ -1314,6 +1330,7 @@ 266 {{106, 212}, {176, 19}} + YES -1804468671 @@ -1331,6 +1348,7 @@ 268 {{103, 163}, {103, 18}} + YES 604110336 @@ -1352,6 +1370,7 @@ 266 {{106, 112}, {176, 19}} + YES -1267597759 @@ -1369,6 +1388,7 @@ 266 {{106, 86}, {176, 19}} + YES -1267597759 @@ -1386,6 +1406,7 @@ 266 {{106, 138}, {176, 19}} + YES -1267597759 @@ -1403,6 +1424,7 @@ 266 {{106, 60}, {176, 19}} + YES -1267597759 @@ -1420,6 +1442,7 @@ 268 {{68, 318}, {33, 14}} + YES 68288064 @@ -1436,6 +1459,7 @@ 268 {{69, 292}, {32, 14}} + YES 68288064 @@ -1452,6 +1476,7 @@ 268 {{44, 240}, {57, 14}} + YES 68288064 @@ -1468,6 +1493,7 @@ 268 {{43, 266}, {58, 14}} + YES 68288064 @@ -1484,6 +1510,7 @@ 268 {{72, 188}, {29, 14}} + YES 68288064 @@ -1500,6 +1527,7 @@ 268 {{62, 344}, {39, 14}} + YES 68288064 @@ -1516,6 +1544,7 @@ 268 {{58, 214}, {43, 14}} + YES 68288064 @@ -1532,6 +1561,7 @@ 268 {{46, 114}, {55, 14}} + YES 68288064 @@ -1548,6 +1578,7 @@ 268 {{20, 88}, {81, 14}} + YES 68288064 @@ -1564,6 +1595,7 @@ 268 {{45, 140}, {56, 14}} + YES 68288064 @@ -1580,6 +1612,7 @@ 268 {{41, 62}, {60, 14}} + YES 68288064 @@ -1594,16 +1627,20 @@ {{198, 0}, {302, 381}} + NSView {500, 381} + YES 2 {500, 381} + + NSView @@ -4554,7 +4591,7 @@ AQAAAAA ToolTip - QWRkIHJvdyAo4oyY4oylQSk + QWRkIGZhdm9yaXRlICjijJjijKVBKQ com.apple.InterfaceBuilder.CocoaPlugin @@ -4563,7 +4600,7 @@ AQAAAAA ToolTip - Delete selected row(s) + Delete selected favorite(s) com.apple.InterfaceBuilder.CocoaPlugin @@ -4572,7 +4609,7 @@ AQAAAAA ToolTip - RHVwbGljYXRlIHNlbGVjdGVkIHJvdyAo4oyYRCk + RHVwbGljYXRlIHNlbGVjdGVkIGZhdm9yaXRlICjijJhEKQ com.apple.InterfaceBuilder.CocoaPlugin 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]; -- cgit v1.2.3