From 5b276bcb43ee74a4d065cf347f795a0d319e743f Mon Sep 17 00:00:00 2001 From: avenjamin Date: Thu, 2 Apr 2009 04:54:26 +0000 Subject: - Implemented "Clear History" in new Gear menu - Changed UI in Query Tab for favourite and history popups as well as Run query buttons --- Interfaces/English.lproj/DBView.xib | 737 +++++++++++++++++++----------------- Source/CustomQuery.h | 1 + Source/CustomQuery.m | 6 + 3 files changed, 390 insertions(+), 354 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 46020c39..1d2825fd 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,6 +8,7 @@ 353.00 YES + YES @@ -44,7 +45,7 @@ {3.40282e+38, 3.40282e+38} {780, 480} - + 256 YES @@ -381,7 +382,7 @@ 1048576 2147483647 - + NSImage button_action @@ -549,7 +550,7 @@ source - + 256 YES @@ -563,52 +564,20 @@ 256 YES - - - 293 - - YES - - YES - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - NSFilenamesPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT TIFF v4.0 pasteboard type - - - {{310, 6}, {6, 10}} - - YES - - 130560 - 33554432 - - NSImage - dimple - - 0 - 2 - 0 - NO - - YES - 257 - {{400, 6}, {55, 11}} + {{475, 4}, {61, 13}} YES - 67239424 - 4456448 + 68288064 + 4457472 Table Type: - + LucidaGrande - 9.000000e+00 - 3614 + 1.000000e+01 + 16 @@ -618,21 +587,21 @@ 257 - {{456, 4}, {135, 15}} + {{541, 2}, {79, 17}} YES -1539178944 - 263168 - - - 109199615 - 1 - + 132096 + LucidaGrande - 9.000000e+00 + 1.100000e+01 16 + + -1232977665 + 45 + @@ -710,7 +679,7 @@ 3 YES YES - 1 + 2 @@ -1273,6 +1242,7 @@ {{1, 17}, {625, 289}} + 4 @@ -1305,6 +1275,7 @@ {{1, 0}, {625, 17}} + 4 @@ -1313,6 +1284,7 @@ {{-1, 22}, {627, 307}} + 562 @@ -1746,6 +1718,7 @@ {{1, 17}, {625, 141}} + 4 @@ -1778,6 +1751,7 @@ {{1, 0}, {625, 17}} + 4 @@ -1786,6 +1760,7 @@ {{-1, 22}, {627, 159}} + 562 @@ -1930,7 +1905,6 @@ {{10, 7}, {637, 544}} - Structure @@ -2076,11 +2050,7 @@ -1539178944 2048 - - LucidaGrande - 1.100000e+01 - 16 - + -2038284033 36 @@ -2554,7 +2524,7 @@ customQuery - + 256 YES @@ -2581,6 +2551,29 @@ 6418 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + CorePasteboardFlavorType 0x75726C20 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + + {625, 14} @@ -2641,7 +2634,6 @@ {{1, 1}, {625, 155}} - @@ -2673,7 +2665,6 @@ {627, 157} - 530 @@ -2702,7 +2693,7 @@ 4352 - {625, 226} + {625, 228} YES @@ -2758,9 +2749,8 @@ YES - {{1, 17}, {625, 226}} + {{1, 17}, {625, 228}} - 4 @@ -2793,16 +2783,14 @@ {{1, 0}, {625, 17}} - 4 - {627, 244} + {627, 246} - 562 @@ -2811,41 +2799,23 @@ QSAAAEEgAABBcAAAQXAAAA - - - 265 - {{522, 245}, {90, 28}} - - YES - - -2080244224 - 134348800 - Run All - - - -2034876161 - 1 - - - DQ - 200 - 25 - - 268 - {{251, 248}, {186, 22}} + {{162, 246}, {106, 22}} YES -2076049856 - 132096 - + 134349824 + - -2038284033 - 1 - + -1230487297 + 45 + + NSImage + pulldown_arrow + @@ -2855,11 +2825,10 @@ YES - Select query from history... + UXVlcnkgSGlzdG9yeeKApg 1048576 2147483647 - _popUpItemAction: @@ -2878,23 +2847,23 @@ 3 YES YES - 1 + 2 264 - {{54, 248}, {195, 22}} + {{38, 246}, {114, 22}} YES -2076049856 132096 - + - -2038284033 - 1 - + -1232977665 + 45 + @@ -2904,7 +2873,7 @@ YES - Select query from favorites... + Query Favorites... 1048576 2147483647 @@ -2923,7 +2892,7 @@ - Save query to favorites... + Save Query to Favorites... 1048576 2147483647 @@ -2934,7 +2903,7 @@ - Edit favorites... + Edit Favorites... 1048576 2147483647 @@ -2962,71 +2931,46 @@ 3 YES YES - 1 - - - - - 265 - {{414, 245}, {110, 28}} - - YES - - 604110336 - 134348800 - Run Current - - - -2038284033 - 402653313 - - r - 200 - 25 + 2 - + 268 - {{5, 248}, {47, 22}} + {{-10, 245}, {46, 25}} YES - + -2076049856 134350848 - - -2036186881 - 65 - + + -2042609409 + 35 + 400 75 - - + + YES 1048576 2147483647 - - NSImage - NSActionTemplate - - - + _popUpItemAction: - + YES - - Custom Query Actions + + OtherViews YES - - - + + + Run All Queries r 1048576 @@ -3035,10 +2979,10 @@ _popUpItemAction: 1 - + - - + + YES Run Current Query r @@ -3048,10 +2992,10 @@ _popUpItemAction: 2 - + - - + + YES YES @@ -3060,10 +3004,10 @@ _popUpItemAction: - + - - + + YES Previous Query from History 75yAA @@ -3073,10 +3017,10 @@ _popUpItemAction: 3 - + - - + + YES Next Query from History 75yBA @@ -3086,11 +3030,10 @@ _popUpItemAction: 4 - + - - - YES + + Clear History 2147483647 @@ -3098,22 +3041,22 @@ _popUpItemAction: 5 - + - - + + + YES YES - YES 2147483647 _popUpItemAction: - + - - + + Shift Right ] 1048576 @@ -3122,10 +3065,10 @@ _popUpItemAction: 6 - + - - + + Shift Left [ 1048576 @@ -3134,10 +3077,10 @@ _popUpItemAction: 7 - + - - + + Completion List Gw 524288 @@ -3146,10 +3089,10 @@ _popUpItemAction: 8 - + - - + + YES YES @@ -3158,10 +3101,10 @@ _popUpItemAction: - + - - + + Indent New Lines 2147483647 @@ -3170,10 +3113,10 @@ _popUpItemAction: 9 - + - - + + Auto-pair Characters 2147483647 @@ -3182,19 +3125,87 @@ _popUpItemAction: 10 - + - YES - 8 + 6 YES 1 YES YES - 2 + + + 265 + {{528, 248}, {90, 17}} + + YES + + -2080244224 + 134348800 + Run All + + + -2034876161 + 36 + + + DQ + 200 + 25 + + + + + 265 + {{410, 248}, {110, 17}} + + YES + + 604110336 + 134348800 + Run Current + + + -2038284033 + 402653348 + + r + 200 + 25 + + + + + 266 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{32, 246}, {595, 23}} + + YES + + 130560 + 33554432 + + 0 + 1 + 0 + NO + + YES + {{0, 165}, {627, 269}} @@ -3268,6 +3279,7 @@ {{10, 7}, {637, 544}} + Custom Query @@ -3640,14 +3652,14 @@ - + 134217731 YES YES YES - + @@ -3663,6 +3675,7 @@ {863, 550} + {{0, 0}, {1440, 878}} {780, 502} @@ -11833,105 +11846,113 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 performClick: - + - 5259 + 5303 - - runSelectionMenuItem - - + + performClick: + + - 5260 + 5304 - performClick: - - + gearMenuItemSelected: + + - 5261 + 5305 - autoindentMenuItem + shiftRightMenuItem - + - 5262 + 5306 - autopairMenuItem + shiftLeftMenuItem - + - 5263 + 5307 gearMenuItemSelected: - + - 5264 + 5308 gearMenuItemSelected: - + - 5265 + 5309 - - completionListMenuItem + + gearMenuItemSelected: + + + + 5310 + + + + gearMenuItemSelected: - + - 5266 + 5311 - shiftLeftMenuItem + autopairMenuItem - + - 5267 + 5312 - shiftRightMenuItem + autoindentMenuItem - + - 5268 + 5313 - - gearMenuItemSelected: + + completionListMenuItem - + - 5269 + 5314 - - gearMenuItemSelected: + + clearHistoryMenuItem - + - 5270 + 5315 gearMenuItemSelected: - + - 5271 + 5316 @@ -15267,15 +15288,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES - - - + + @@ -15478,15 +15498,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - - 1297 - - - YES - - - - 1294 @@ -15728,11 +15739,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - - 3776 - - - 120 @@ -15770,10 +15776,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES + - + @@ -16324,20 +16331,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - - 5146 - - - YES - - - - - - 5147 - - - 4503 @@ -16772,114 +16765,142 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - 5242 - + 5279 + YES - + - 5243 - + 5280 + + + YES + + + + + + 5281 + YES - + + + + + + + + + + + + + + - + + + + 5285 + + - 5244 - + 5286 + YES - - - - - - - - - - - - - - + - + + + + 5287 + + + + + 5289 + + - 5245 - - + 5290 + + - 5246 - - + 5291 + + - 5247 - - + 5292 + + - 5248 - - + 5293 + + - 5249 - - + 5294 + + - 5250 - - + 5295 + + - 5251 - - + 5296 + + - 5252 - - + 5297 + + - 5253 - - + 5298 + + - 5254 - - + 5299 + + - 5255 - - + 5300 + + - 5256 - - + 5301 + + - 5257 - - + 1297 + + + YES + + + - 5258 - - + 3776 + + @@ -16986,6 +17007,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 1176.ImportedFromIB2 1177.IBPluginDependency 1177.ImportedFromIB2 + 1178.IBEditorWindowLastContentRect 1178.IBPluginDependency 1178.ImportedFromIB2 1179.IBPluginDependency @@ -16997,6 +17019,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 1182.IBAttributePlaceholdersKey 1182.IBPluginDependency 1182.ImportedFromIB2 + 1183.IBEditorWindowLastContentRect 1183.IBPluginDependency 1183.ImportedFromIB2 119.IBPluginDependency @@ -17094,6 +17117,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 1298.ImportedFromIB2 1299.IBPluginDependency 1299.ImportedFromIB2 + 1300.IBEditorWindowLastContentRect 1300.IBPluginDependency 1300.ImportedFromIB2 1304.IBPluginDependency @@ -17852,8 +17876,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 5139.IBPluginDependency 514.IBPluginDependency 514.ImportedFromIB2 - 5146.IBPluginDependency - 5147.IBPluginDependency 5148.IBPluginDependency 5149.IBPluginDependency 515.IBPluginDependency @@ -17891,24 +17913,26 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 5201.IBAttributePlaceholdersKey 5201.IBPluginDependency 5202.IBPluginDependency - 5242.IBPluginDependency - 5243.IBPluginDependency - 5244.IBEditorWindowLastContentRect - 5244.IBPluginDependency - 5245.IBPluginDependency - 5246.IBPluginDependency - 5247.IBPluginDependency - 5248.IBPluginDependency - 5249.IBPluginDependency - 5250.IBPluginDependency - 5251.IBPluginDependency - 5252.IBPluginDependency - 5253.IBPluginDependency - 5254.IBPluginDependency - 5255.IBPluginDependency - 5256.IBPluginDependency - 5257.IBPluginDependency - 5258.IBPluginDependency + 5279.IBPluginDependency + 5280.IBPluginDependency + 5281.IBEditorWindowLastContentRect + 5281.IBPluginDependency + 5285.IBPluginDependency + 5286.IBPluginDependency + 5287.IBPluginDependency + 5289.IBPluginDependency + 5290.IBPluginDependency + 5291.IBPluginDependency + 5292.IBPluginDependency + 5293.IBPluginDependency + 5294.IBPluginDependency + 5295.IBPluginDependency + 5296.IBPluginDependency + 5297.IBPluginDependency + 5298.IBPluginDependency + 5299.IBPluginDependency + 5300.IBPluginDependency + 5301.IBPluginDependency 557.IBPluginDependency 557.ImportedFromIB2 565.IBEditorWindowLastContentRect @@ -18308,6 +18332,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin + {{624, 675}, {199, 64}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -18326,6 +18351,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin + {{748, 719}, {148, 20}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -18430,6 +18456,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin + {{1058, 508}, {135, 88}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -19234,8 +19261,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{80, 306}, {863, 550}} - {{80, 306}, {863, 550}} + {{725, 361}, {863, 550}} + {{725, 361}, {863, 550}} {{62, 352}, {845, 504}} @@ -19318,8 +19345,6 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -19419,7 +19444,9 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{286, 465}, {236, 220}} + {{916, 520}, {236, 220}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -19706,7 +19733,7 @@ Y2hhbmdlIHRoZSBvcmRlcg - 5271 + 5316 @@ -19806,6 +19833,7 @@ Y2hhbmdlIHRoZSBvcmRlcg affectedRowsText autoindentMenuItem autopairMenuItem + clearHistoryMenuItem completionListMenuItem copyQueryFavoriteButton customQueryView @@ -19831,6 +19859,7 @@ Y2hhbmdlIHRoZSBvcmRlcg NSMenuItem NSMenuItem NSMenuItem + NSMenuItem id CMCopyTable id diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index 908dd594..9b75c906 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -47,6 +47,7 @@ IBOutlet id runSelectionButton; IBOutlet id runAllButton; IBOutlet NSMenuItem *runSelectionMenuItem; + IBOutlet NSMenuItem *clearHistoryMenuItem; IBOutlet NSMenuItem *shiftLeftMenuItem; IBOutlet NSMenuItem *shiftRightMenuItem; IBOutlet NSMenuItem *completionListMenuItem; diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index baa81170..3d6c18d0 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -161,6 +161,12 @@ closes the sheet */ - (IBAction)gearMenuItemSelected:(id)sender { + // "Clear History" menu item - clear query history + if (sender == clearHistoryMenuItem) { + [queryHistoryButton removeAllItems]; + [queryHistoryButton addItemWithTitle:NSLocalizedString(@"Query History…",@"Title of query history popup button")]; + [prefs setObject:[NSArray array] forKey:@"queryHistory"]; + } // "Shift Right" menu item - indent the selection with an additional tab. if (sender == shiftRightMenuItem) { -- cgit v1.2.3