From 3352744652a821093ef1138187609cdca5c9fef7 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 4 Sep 2009 11:55:54 +0000 Subject: =?UTF-8?q?=E2=80=A2=C2=A0prepared=20Query=20Name=20Sheet=20for=20?= =?UTF-8?q?choosing=20the=20target=20of=20the=20to=20be=20saved=20query=20?= =?UTF-8?q?favorite=20(global=20or=20not)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/DBView.xib | 94 ++++++++++++++++++++++++++++++------- Source/CustomQuery.h | 1 + Source/CustomQuery.m | 19 +++++--- 3 files changed, 91 insertions(+), 23 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 0066449f..fa2e8746 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8875,15 +8875,15 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 9 2 - {{343, 483}, {260, 112}} + {{343, 488}, {260, 127}} 1886912512 Query Favorite Sheet - NSWindow + NSPanel View - {600, 112} - {260, 112} + {600, 127} + {260, 127} 256 @@ -8892,7 +8892,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 266 - {{17, 78}, {235, 14}} + {{17, 93}, {235, 14}} YES @@ -8907,8 +8907,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - 258 - {{20, 52}, {220, 18}} + 266 + {{19, 67}, {220, 18}} YES @@ -8966,12 +8966,34 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 25 + + + 266 + {{18, 43}, {224, 18}} + + YES + + 67239424 + 131072 + Save globally + + + 1211912703 + 130 + + + + + 200 + 25 + + - {260, 112} + {260, 127} {{0, 0}, {1680, 1028}} - {260, 134} - {600, 134} + {260, 149} + {600, 149} 17 @@ -15452,6 +15474,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 6515 + + + saveQueryFavoriteGlobal + + + + 6518 + @@ -21483,10 +21513,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 YES - - + + + @@ -21722,6 +21753,20 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + 6516 + + + YES + + + + + + 6517 + + + @@ -23018,6 +23063,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 6501.IBPluginDependency 6502.IBPluginDependency 6503.IBPluginDependency + 6516.IBAttributePlaceholdersKey + 6516.IBPluginDependency + 6517.IBPluginDependency 654.IBPluginDependency 654.ImportedFromIB2 655.IBPluginDependency @@ -24807,13 +24855,13 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{719, 432}, {260, 112}} - {{719, 432}, {260, 112}} + {{546, 589}, {260, 127}} + {{546, 589}, {260, 127}} - {600, 112} - {260, 112} + {600, 127} + {260, 127} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -24884,6 +24932,16 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + If set save the favorite globally accessible for each document + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -25080,7 +25138,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4 - 6515 + 6518 @@ -26496,6 +26554,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4 runSelectionButton runSelectionMenuItem saveQueryFavoriteButton + saveQueryFavoriteGlobal shiftLeftMenuItem shiftRightMenuItem tableDocumentInstance @@ -26540,6 +26599,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4 id NSMenuItem NSButton + id NSMenuItem NSMenuItem id diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index cedccab0..9d1559e6 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -76,6 +76,7 @@ IBOutlet NSWindow *queryFavoritesSheet; IBOutlet NSButton *saveQueryFavoriteButton; IBOutlet NSTextField *queryFavoriteNameTextField; + IBOutlet id saveQueryFavoriteGlobal; IBOutlet NSWindow *helpWebViewWindow; IBOutlet WebView *helpWebView; diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index d679a1de..bbad9edc 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -154,6 +154,7 @@ modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"addSelectionToNewQueryFavorite"]; + } if ([queryFavoritesButton indexOfSelectedItem] == 2) { @@ -2489,14 +2490,20 @@ queryToBeAddded = [textView string]; } - [favorites addObject:[NSDictionary dictionaryWithObjects: - [NSArray arrayWithObjects:[queryFavoriteNameTextField stringValue], queryToBeAddded, nil] - forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]]; - - [prefs setObject:favorites forKey:@"queryFavorites"]; - [prefs synchronize]; + if([saveQueryFavoriteGlobal state] == NSOnState) { + [favorites addObject:[NSDictionary dictionaryWithObjects: + [NSArray arrayWithObjects:[queryFavoriteNameTextField stringValue], queryToBeAddded, nil] + forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]]; + [prefs setObject:favorites forKey:@"queryFavorites"]; + } else { + [SPTooltip showWithObject:@"Not yet implemented"]; + } + + [saveQueryFavoriteGlobal setState:NSOffState]; + [self queryFavoritesHaveBeenUpdated:nil]; + } } -- cgit v1.2.3