From 3eb56d9c389b9915a47d59f77ed1316ebbbc1544 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Tue, 17 Nov 2009 22:17:50 +0000 Subject: Change the placeholder value of a few search fields to simply 'Filter' to make them look less cramped. --- Interfaces/English.lproj/DBView.xib | 93 +++++++++++++++++++++++++++++-------- Source/CustomQuery.m | 22 +++++++-- Source/TablesList.m | 4 +- 3 files changed, 91 insertions(+), 28 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index c5a4bfc4..84f263f5 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -23,7 +23,8 @@ YES - + + YES @@ -871,7 +872,7 @@ source - + 256 YES @@ -2132,7 +2133,6 @@ {{10, 7}, {700, 544}} - Structure @@ -2927,7 +2927,7 @@ customQuery - + 256 YES @@ -2954,6 +2954,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 + 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 + public.url + + {688, 14} @@ -3234,8 +3257,21 @@ _popUpItemAction: + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + 2 YES 3 YES @@ -3776,6 +3812,7 @@ {{10, 7}, {700, 544}} + Custom Query @@ -4820,14 +4857,14 @@ - + 134217731 YES YES YES - + @@ -10652,7 +10689,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSView - + 4364 YES @@ -10661,13 +10698,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 {{20, 1}, {176, 19}} + YES 343014976 - 272925696 + 272794624 - - search for names (as regexp) + + Filter YES 1 @@ -10722,10 +10760,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {217, 20} + + NSView - + 4364 YES @@ -10737,10 +10777,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES 343014976 - 272925696 + 272794624 - - search for queries (as regexp) + + Filter YES 1 @@ -10795,6 +10835,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 {217, 20} + NSView @@ -17375,6 +17416,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES + @@ -20821,6 +20863,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + 6643 + + + @@ -22098,6 +22145,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 662.ImportedFromIB2 663.IBPluginDependency 663.ImportedFromIB2 + 6643.IBPluginDependency 669.IBPluginDependency 669.ImportedFromIB2 67.ImportedFromIB2 @@ -22420,7 +22468,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin - {{516, 546}, {215, 37}} + {{502, 636}, {212, 47}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -22987,10 +23035,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{250, 344}, {944, 550}} + {{127, 306}, {944, 550}} com.apple.InterfaceBuilder.CocoaPlugin - {{250, 344}, {944, 550}} + {{127, 306}, {944, 550}} {{62, 352}, {845, 504}} @@ -23772,7 +23820,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{409, 736}, {217, 20}} + {{341, 555}, {217, 20}} com.apple.InterfaceBuilder.CocoaPlugin YES @@ -23784,7 +23832,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{419, 772}, {217, 20}} + {{390, 500}, {217, 20}} com.apple.InterfaceBuilder.CocoaPlugin YES @@ -23910,6 +23958,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -24072,7 +24121,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - 6642 + 6643 @@ -24949,6 +24998,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 addDatabase: analyzeTable: backForwardInHistory: + cancelTask: checkTable: checksumTable: chooseDatabase: @@ -25024,6 +25074,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 id id id + id @@ -25077,6 +25128,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 tableWindow tablesListInstance taskCancelButton + taskCancellationCallbackObject taskDescriptionText taskProgressIndicator taskProgressLayer @@ -25136,6 +25188,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSButton id id + id NSBox id id diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index dc0d9b76..5fecc8a4 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -2796,23 +2796,35 @@ return self; } +/** + * Filters the query favorites menu. + */ - (IBAction)filterQueryFavorites:(id)sender { - int i; + NSUInteger i; NSMenu *menu = [queryFavoritesButton menu]; NSString *searchPattern = [queryFavoritesSearchField stringValue]; - for (i=6; i< [menu numberOfItems]; i++) + + for (i = 6; i < [menu numberOfItems]; i++) + { [[menu itemAtIndex:i] setHidden:([[menu itemAtIndex:i] tag] != SP_FAVORITE_HEADER_MENUITEM_TAG - && ![[[menu itemAtIndex:i] title] isMatchedByRegex:[NSString stringWithFormat:@"(?i).*%@.*", searchPattern]])]; + && ![[[menu itemAtIndex:i] title] isMatchedByRegex:[NSString stringWithFormat:@"(?i).*%@.*", searchPattern]])]; + } } +/** + * Filters the query history menu. + */ - (IBAction)filterQueryHistory:(id)sender { - int i; + NSUInteger i; NSMenu *menu = [queryHistoryButton menu]; NSString *searchPattern = [queryHistorySearchField stringValue]; - for (i=2; i< [menu numberOfItems]; i++) + + for (i = 3; i < [menu numberOfItems]; i++) + { [[menu itemAtIndex:i] setHidden:(![[[menu itemAtIndex:i] title] isMatchedByRegex:[NSString stringWithFormat:@"(?i).*%@.*", searchPattern]])]; + } } - (void)awakeFromNib diff --git a/Source/TablesList.m b/Source/TablesList.m index 72f7afce..3a7dbacf 100644 --- a/Source/TablesList.m +++ b/Source/TablesList.m @@ -238,9 +238,7 @@ // Set the filter placeholder text if ([tableDocumentInstance database]) { - if ([theResult numOfRows]) [[listFilterField cell] setPlaceholderString:NSLocalizedString(@"Filter tables, views, procs & funcs", @"Filter placeholder when all tables types are present")]; - else if (tableListContainsViews) [[listFilterField cell] setPlaceholderString:NSLocalizedString(@"Filter tables and views", @"Filter placeholder when tables and views are present")]; - else [[listFilterField cell] setPlaceholderString:NSLocalizedString(@"Filter tables", @"Filter placeholder when only tables are present")]; + [[listFilterField cell] setPlaceholderString:NSLocalizedString(@"Filter", @"Filter placeholder")]; } if (previousSelectedTable) [previousSelectedTable release]; -- cgit v1.2.3