aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib94
-rw-r--r--Source/CustomQuery.h1
-rw-r--r--Source/CustomQuery.m19
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</string>
<object class="NSWindowTemplate" id="434046103">
<int key="NSWindowStyleMask">9</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{343, 483}, {260, 112}}</string>
+ <string key="NSWindowRect">{{343, 488}, {260, 127}}</string>
<int key="NSWTFlags">1886912512</int>
<string key="NSWindowTitle">Query Favorite Sheet</string>
- <string key="NSWindowClass">NSWindow</string>
+ <string key="NSWindowClass">NSPanel</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{600, 112}</string>
- <string key="NSWindowContentMinSize">{260, 112}</string>
+ <string key="NSWindowContentMaxSize">{600, 127}</string>
+ <string key="NSWindowContentMinSize">{260, 127}</string>
<object class="NSView" key="NSWindowView" id="965040184">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -8892,7 +8892,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSTextField" id="9909652">
<reference key="NSNextResponder" ref="965040184"/>
<int key="NSvFlags">266</int>
- <string key="NSFrame">{{17, 78}, {235, 14}}</string>
+ <string key="NSFrame">{{17, 93}, {235, 14}}</string>
<reference key="NSSuperview" ref="965040184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="582381689">
@@ -8907,8 +8907,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<object class="NSTextField" id="718519704">
<reference key="NSNextResponder" ref="965040184"/>
- <int key="NSvFlags">258</int>
- <string key="NSFrame">{{20, 52}, {220, 18}}</string>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{19, 67}, {220, 18}}</string>
<reference key="NSSuperview" ref="965040184"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="341924224">
@@ -8966,12 +8966,34 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
+ <object class="NSButton" id="71023196">
+ <reference key="NSNextResponder" ref="965040184"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{18, 43}, {224, 18}}</string>
+ <reference key="NSSuperview" ref="965040184"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="168974419">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">131072</int>
+ <string key="NSContents">Save globally</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="71023196"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="653588312"/>
+ <reference key="NSAlternateImage" ref="386686735"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
</object>
- <string key="NSFrameSize">{260, 112}</string>
+ <string key="NSFrameSize">{260, 127}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
- <string key="NSMinSize">{260, 134}</string>
- <string key="NSMaxSize">{600, 134}</string>
+ <string key="NSMinSize">{260, 149}</string>
+ <string key="NSMaxSize">{600, 149}</string>
</object>
<object class="NSWindowTemplate" id="658757235">
<int key="NSWindowStyleMask">17</int>
@@ -15452,6 +15474,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">6515</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">saveQueryFavoriteGlobal</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="71023196"/>
+ </object>
+ <int key="connectionID">6518</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -21483,10 +21513,11 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="965040184"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="677710001"/>
- <reference ref="718519704"/>
<reference ref="9909652"/>
+ <reference ref="718519704"/>
+ <reference ref="71023196"/>
<reference ref="168275019"/>
+ <reference ref="677710001"/>
</object>
<reference key="parent" ref="434046103"/>
</object>
@@ -21722,6 +21753,20 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="137468004"/>
<reference key="parent" ref="937195885"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6516</int>
+ <reference key="object" ref="71023196"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="168974419"/>
+ </object>
+ <reference key="parent" ref="965040184"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6517</int>
+ <reference key="object" ref="168974419"/>
+ <reference key="parent" ref="71023196"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -23018,6 +23063,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>6501.IBPluginDependency</string>
<string>6502.IBPluginDependency</string>
<string>6503.IBPluginDependency</string>
+ <string>6516.IBAttributePlaceholdersKey</string>
+ <string>6516.IBPluginDependency</string>
+ <string>6517.IBPluginDependency</string>
<string>654.IBPluginDependency</string>
<string>654.ImportedFromIB2</string>
<string>655.IBPluginDependency</string>
@@ -24807,13 +24855,13 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{719, 432}, {260, 112}}</string>
- <string>{{719, 432}, {260, 112}}</string>
+ <string>{{546, 589}, {260, 127}}</string>
+ <string>{{546, 589}, {260, 127}}</string>
<reference ref="9"/>
<reference ref="5"/>
<reference ref="9"/>
- <string>{600, 112}</string>
- <string>{260, 112}</string>
+ <string>{600, 127}</string>
+ <string>{260, 127}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -24884,6 +24932,16 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSMutableDictionary">
+ <string key="NS.key.0">ToolTip</string>
+ <object class="IBToolTipAttribute" key="NS.object.0">
+ <string key="name">ToolTip</string>
+ <reference key="object" ref="71023196"/>
+ <string key="toolTip">If set save the favorite globally accessible for each document</string>
+ </object>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -25080,7 +25138,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6515</int>
+ <int key="maxID">6518</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -26496,6 +26554,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4</string>
<string>runSelectionButton</string>
<string>runSelectionMenuItem</string>
<string>saveQueryFavoriteButton</string>
+ <string>saveQueryFavoriteGlobal</string>
<string>shiftLeftMenuItem</string>
<string>shiftRightMenuItem</string>
<string>tableDocumentInstance</string>
@@ -26540,6 +26599,7 @@ dXJyZW50IHF1ZXJ5IG9yIHNlbGVjdGlvbi4</string>
<string>id</string>
<string>NSMenuItem</string>
<string>NSButton</string>
+ <string>id</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>id</string>
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];
+
}
}