aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib430
-rw-r--r--Source/CustomQuery.h45
-rw-r--r--Source/CustomQuery.m15
3 files changed, 244 insertions, 246 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index 618a6ac0..d7ea72ae 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="4724"/>
+ <integer value="725"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -6954,7 +6954,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSWindowTemplate" id="99553177">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{363, 524}, {418, 191}}</string>
+ <string key="NSWindowRect">{{503, 367}, {418, 200}}</string>
<int key="NSWTFlags">1886912512</int>
<string key="NSWindowTitle">Query favorites</string>
<string key="NSWindowClass">NSWindow</string>
@@ -6962,36 +6962,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<characters key="NS.bytes">View</characters>
</object>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="NSWindowContentMinSize">{213, 107}</string>
+ <string key="NSWindowContentMinSize">{213, 125}</string>
<object class="NSView" key="NSWindowView" id="778680541">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSButton" id="768409455">
- <reference key="NSNextResponder" ref="778680541"/>
- <int key="NSvFlags">257</int>
- <string key="NSFrame">{{340, 12}, {28, 30}}</string>
- <reference key="NSSuperview" ref="778680541"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="149179114">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Remove</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="768409455"/>
- <int key="NSButtonFlags">113524991</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">querydelete</string>
- </object>
- <string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">fw</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
<object class="NSScrollView" id="597878738">
<reference key="NSNextResponder" ref="778680541"/>
<int key="NSvFlags">274</int>
@@ -7004,28 +6980,28 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableView" id="292088665">
<reference key="NSNextResponder" ref="811595075"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrameSize">{365, 94}</string>
+ <int key="NSvFlags">4352</int>
+ <string key="NSFrameSize">{376, 105}</string>
<reference key="NSSuperview" ref="811595075"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="318747409">
<reference key="NSNextResponder" ref="129912646"/>
<int key="NSvFlags">256</int>
- <string key="NSFrameSize">{365, 17}</string>
+ <string key="NSFrameSize">{376, 17}</string>
<reference key="NSSuperview" ref="129912646"/>
<reference key="NSTableView" ref="292088665"/>
</object>
<object class="_NSCornerView" key="NSCornerView" id="1020296025">
<reference key="NSNextResponder" ref="597878738"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{366, 0}, {12, 17}}</string>
+ <string key="NSFrame">{{-22, 0}, {12, 17}}</string>
<reference key="NSSuperview" ref="597878738"/>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="413853564">
<string key="NSIdentifier">name</string>
- <double key="NSWidth">3.623290e+02</double>
+ <double key="NSWidth">3.733290e+02</double>
<double key="NSMinWidth">8.932900e+01</double>
<double key="NSMaxWidth">1.000000e+03</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -7066,7 +7042,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="NSAllowsTypeSelect">YES</bool>
</object>
</object>
- <string key="NSFrame">{{1, 17}, {365, 94}}</string>
+ <string key="NSFrame">{{1, 17}, {376, 105}}</string>
<reference key="NSSuperview" ref="597878738"/>
<reference key="NSNextKeyView" ref="292088665"/>
<reference key="NSDocView" ref="292088665"/>
@@ -7076,7 +7052,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSScroller" id="4739239">
<reference key="NSNextResponder" ref="597878738"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{366, 17}, {11, 94}}</string>
+ <string key="NSFrame">{{-100, -100}, {11, 105}}</string>
<reference key="NSSuperview" ref="597878738"/>
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="597878738"/>
@@ -7086,7 +7062,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSScroller" id="87044874">
<reference key="NSNextResponder" ref="597878738"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{1, 111}, {365, 11}}</string>
+ <string key="NSFrame">{{-100, -100}, {365, 11}}</string>
<reference key="NSSuperview" ref="597878738"/>
<int key="NSsFlags">257</int>
<reference key="NSTarget" ref="597878738"/>
@@ -7100,7 +7076,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="318747409"/>
</object>
- <string key="NSFrame">{{1, 0}, {365, 17}}</string>
+ <string key="NSFrame">{{1, 0}, {376, 17}}</string>
<reference key="NSSuperview" ref="597878738"/>
<reference key="NSNextKeyView" ref="318747409"/>
<reference key="NSDocView" ref="318747409"/>
@@ -7109,10 +7085,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<reference ref="1020296025"/>
</object>
- <string key="NSFrame">{{20, 48}, {378, 123}}</string>
+ <string key="NSFrame">{{20, 57}, {378, 123}}</string>
<reference key="NSSuperview" ref="778680541"/>
<reference key="NSNextKeyView" ref="811595075"/>
- <int key="NSsFlags">50</int>
+ <int key="NSsFlags">514</int>
<reference key="NSVScroller" ref="4739239"/>
<reference key="NSHScroller" ref="87044874"/>
<reference key="NSContentView" ref="811595075"/>
@@ -7120,80 +7096,115 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="NSCornerView" ref="1020296025"/>
<bytes key="NSScrollAmts">QSAAAEEgAABBcAAAQXAAAA</bytes>
</object>
- <object class="NSButton" id="1070571418">
+ <object class="NSButton" id="530386651">
<reference key="NSNextResponder" ref="778680541"/>
- <int key="NSvFlags">257</int>
- <string key="NSFrame">{{308, 12}, {28, 30}}</string>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{322, 5}, {81, 28}}</string>
<reference key="NSSuperview" ref="778680541"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="836526182">
+ <object class="NSButtonCell" key="NSCell" id="376218475">
<int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Copy</string>
+ <int key="NSCellFlags2">138018816</int>
+ <string key="NSContents">Close</string>
<reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="1070571418"/>
- <int key="NSButtonFlags">113524991</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">querycopy</string>
- </object>
+ <reference key="NSControlView" ref="530386651"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="932958253"/>
<string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">fw</string>
+ <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
- <object class="NSButton" id="32671958">
+ <object class="NSButton" id="611899502">
<reference key="NSNextResponder" ref="778680541"/>
- <int key="NSvFlags">257</int>
- <string key="NSFrame">{{372, 12}, {28, 30}}</string>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 36}, {28, 23}}</string>
<reference key="NSSuperview" ref="778680541"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="55531777">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Add</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="32671958"/>
- <int key="NSButtonFlags">113524991</int>
- <int key="NSButtonFlags2">2</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">queryadd</string>
- </object>
+ <object class="NSButtonCell" key="NSCell" id="2740690">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="244931163"/>
+ <reference key="NSControlView" ref="611899502"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <reference key="NSNormalImage" ref="54209242"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
</object>
</object>
- <object class="NSButton" id="530386651">
+ <object class="NSButton" id="795238066">
<reference key="NSNextResponder" ref="778680541"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{15, 13}, {72, 28}}</string>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{47, 36}, {28, 23}}</string>
<reference key="NSSuperview" ref="778680541"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="376218475">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">138018816</int>
- <string key="NSContents">Close</string>
+ <object class="NSButtonCell" key="NSCell" id="555847600">
+ <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="244931163"/>
+ <reference key="NSControlView" ref="795238066"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <reference key="NSNormalImage" ref="410132161"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="1057808658">
+ <reference key="NSNextResponder" ref="778680541"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{119, 36}, {279, 23}}</string>
+ <reference key="NSSuperview" ref="778680541"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="231121668">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="244931163"/>
+ <reference key="NSControlView" ref="1057808658"/>
+ <int key="NSButtonFlags">147603711</int>
+ <int key="NSButtonFlags2">162</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="776693903">
+ <reference key="NSNextResponder" ref="778680541"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{74, 36}, {46, 23}}</string>
+ <reference key="NSSuperview" ref="778680541"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="789014580">
+ <int key="NSCellFlags">604110336</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Copy</string>
<reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="530386651"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <reference key="NSAlternateImage" ref="932958253"/>
+ <reference key="NSControlView" ref="776693903"/>
+ <int key="NSButtonFlags">147603711</int>
+ <int key="NSButtonFlags2">162</int>
<string key="NSAlternateContents"/>
- <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
</object>
</object>
</object>
- <string key="NSFrameSize">{418, 191}</string>
+ <string key="NSFrameSize">{418, 200}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{213, 129}</string>
+ <string key="NSMinSize">{213, 147}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="12594599">
@@ -7624,7 +7635,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{300, 130}</string>
<object class="NSView" key="NSWindowView" id="792706941">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -7696,7 +7707,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<nil key="NSDefaultParagraphStyle"/>
</object>
<int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{1068, 1e+07}</string>
+ <string key="NSMaxSize">{1108, 1e+07}</string>
<string key="NSMinize">{223, 0}</string>
<nil key="NSDelegate"/>
</object>
@@ -7780,7 +7791,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<string key="NSFrameSize">{575, 173}</string>
- <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{300, 152}</string>
@@ -10796,30 +10806,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="connectionID">739</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">copyQueryFavorite:</string>
- <reference key="source" ref="601471102"/>
- <reference key="destination" ref="1070571418"/>
- </object>
- <int key="connectionID">740</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeQueryFavorite:</string>
- <reference key="source" ref="601471102"/>
- <reference key="destination" ref="768409455"/>
- </object>
- <int key="connectionID">741</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">addQueryFavorite:</string>
- <reference key="source" ref="601471102"/>
- <reference key="destination" ref="32671958"/>
- </object>
- <int key="connectionID">742</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="292088665"/>
@@ -12343,6 +12329,46 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">4781</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addQueryFavorite:</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="611899502"/>
+ </object>
+ <int key="connectionID">4788</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeQueryFavorite:</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="795238066"/>
+ </object>
+ <int key="connectionID">4789</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copyQueryFavorite:</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="776693903"/>
+ </object>
+ <int key="connectionID">4792</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">removeQueryFavoriteButton</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="795238066"/>
+ </object>
+ <int key="connectionID">4793</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">copyQueryFavoriteButton</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="776693903"/>
+ </object>
+ <int key="connectionID">4794</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -13047,24 +13073,16 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="778680541"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="768409455"/>
<reference ref="597878738"/>
- <reference ref="1070571418"/>
- <reference ref="32671958"/>
+ <reference ref="611899502"/>
+ <reference ref="795238066"/>
+ <reference ref="1057808658"/>
+ <reference ref="776693903"/>
<reference ref="530386651"/>
</object>
<reference key="parent" ref="99553177"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">729</int>
- <reference key="object" ref="768409455"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="149179114"/>
- </object>
- <reference key="parent" ref="778680541"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">730</int>
<reference key="object" ref="597878738"/>
<object class="NSMutableArray" key="children">
@@ -13095,24 +13113,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="parent" ref="292088665"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">731</int>
- <reference key="object" ref="1070571418"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="836526182"/>
- </object>
- <reference key="parent" ref="778680541"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">733</int>
- <reference key="object" ref="32671958"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="55531777"/>
- </object>
- <reference key="parent" ref="778680541"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">743</int>
<reference key="object" ref="530386651"/>
<object class="NSMutableArray" key="children">
@@ -13929,21 +13929,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="parent" ref="534696980"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">3845</int>
- <reference key="object" ref="149179114"/>
- <reference key="parent" ref="768409455"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">3846</int>
- <reference key="object" ref="836526182"/>
- <reference key="parent" ref="1070571418"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">3847</int>
- <reference key="object" ref="55531777"/>
- <reference key="parent" ref="32671958"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">3848</int>
<reference key="object" ref="376218475"/>
<reference key="parent" ref="530386651"/>
@@ -17630,6 +17615,62 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="410007925"/>
<reference key="parent" ref="38191244"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4782</int>
+ <reference key="object" ref="611899502"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="2740690"/>
+ </object>
+ <reference key="parent" ref="778680541"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4783</int>
+ <reference key="object" ref="795238066"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="555847600"/>
+ </object>
+ <reference key="parent" ref="778680541"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4784</int>
+ <reference key="object" ref="1057808658"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="231121668"/>
+ </object>
+ <reference key="parent" ref="778680541"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4785</int>
+ <reference key="object" ref="231121668"/>
+ <reference key="parent" ref="1057808658"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4786</int>
+ <reference key="object" ref="555847600"/>
+ <reference key="parent" ref="795238066"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4787</int>
+ <reference key="object" ref="2740690"/>
+ <reference key="parent" ref="611899502"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4790</int>
+ <reference key="object" ref="776693903"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="789014580"/>
+ </object>
+ <reference key="parent" ref="778680541"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4791</int>
+ <reference key="object" ref="789014580"/>
+ <reference key="parent" ref="776693903"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -18175,9 +18216,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>3842.IBPluginDependency</string>
<string>3843.IBPluginDependency</string>
<string>3844.IBPluginDependency</string>
- <string>3845.IBPluginDependency</string>
- <string>3846.IBPluginDependency</string>
- <string>3847.IBPluginDependency</string>
<string>3848.IBPluginDependency</string>
<string>3849.IBPluginDependency</string>
<string>3850.IBPluginDependency</string>
@@ -18690,6 +18728,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>4776.ImportedFromIB2</string>
<string>4777.IBPluginDependency</string>
<string>4777.ImportedFromIB2</string>
+ <string>4782.IBPluginDependency</string>
+ <string>4783.IBPluginDependency</string>
+ <string>4784.IBPluginDependency</string>
+ <string>4785.IBPluginDependency</string>
+ <string>4786.IBPluginDependency</string>
+ <string>4787.IBPluginDependency</string>
+ <string>4790.IBPluginDependency</string>
+ <string>4791.IBPluginDependency</string>
<string>495.IBAttributePlaceholdersKey</string>
<string>495.IBPluginDependency</string>
<string>495.ImportedFromIB2</string>
@@ -18824,21 +18870,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>725.ImportedFromIB2</string>
<string>728.IBPluginDependency</string>
<string>728.ImportedFromIB2</string>
- <string>729.IBAttributePlaceholdersKey</string>
- <string>729.IBPluginDependency</string>
- <string>729.ImportedFromIB2</string>
<string>73.IBAttributePlaceholdersKey</string>
<string>73.IBPluginDependency</string>
<string>73.ImportedFromIB2</string>
<string>730.IBAttributePlaceholdersKey</string>
<string>730.IBPluginDependency</string>
<string>730.ImportedFromIB2</string>
- <string>731.IBAttributePlaceholdersKey</string>
- <string>731.IBPluginDependency</string>
- <string>731.ImportedFromIB2</string>
- <string>733.IBAttributePlaceholdersKey</string>
- <string>733.IBPluginDependency</string>
- <string>733.ImportedFromIB2</string>
<string>735.IBPluginDependency</string>
<string>735.ImportedFromIB2</string>
<string>74.IBAttributePlaceholdersKey</string>
@@ -19737,9 +19774,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{481, 388}, {519, 335}}</string>
<string>{{481, 388}, {519, 335}}</string>
<reference ref="9"/>
@@ -20258,6 +20292,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</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">
@@ -20395,25 +20437,15 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{252, 367}, {418, 191}}</string>
- <string>{{252, 367}, {418, 191}}</string>
+ <string>{{617, 624}, {418, 200}}</string>
+ <string>{{617, 624}, {418, 200}}</string>
<reference ref="9"/>
<reference ref="8"/>
<reference ref="9"/>
<string>{3.40282e+38, 3.40282e+38}</string>
- <string>{213, 107}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
+ <string>{213, 125}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <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="768409455"/>
- <string key="toolTip">Remove a query favorite</string>
- </object>
- </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<object class="NSMutableDictionary">
@@ -20437,26 +20469,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <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="1070571418"/>
- <string key="toolTip">Duplicate a query favorite</string>
- </object>
- </object>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
- <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="32671958"/>
- <string key="toolTip">Add a query favorite</string>
- </object>
- </object>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<object class="NSMutableDictionary">
@@ -20673,7 +20685,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">4781</int>
+ <int key="maxID">4794</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -20763,12 +20775,14 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>affectedRowsText</string>
+ <string>copyQueryFavoriteButton</string>
<string>customQueryView</string>
<string>errorText</string>
<string>queryFavoritesButton</string>
<string>queryFavoritesSheet</string>
<string>queryFavoritesView</string>
<string>queryHistoryButton</string>
+ <string>removeQueryFavoriteButton</string>
<string>tableWindow</string>
<string>textView</string>
<string>valueSheet</string>
@@ -20777,6 +20791,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
+ <string>id</string>
<string>CMCopyTable</string>
<string>id</string>
<string>id</string>
@@ -20787,6 +20802,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h
index 61dbc7b8..8e81c7e5 100644
--- a/Source/CustomQuery.h
+++ b/Source/CustomQuery.h
@@ -28,7 +28,6 @@
#import "CMMCPConnection.h"
#import "CMMCPResult.h"
-
@interface CustomQuery : NSObject {
IBOutlet id tableWindow;
@@ -42,62 +41,34 @@
IBOutlet id valueTextField;
IBOutlet id queryFavoritesSheet;
IBOutlet id queryFavoritesView;
+ IBOutlet id removeQueryFavoriteButton;
+ IBOutlet id copyQueryFavoriteButton;
- CMMCPConnection *mySQLConnection;
NSArray *queryResult;
NSUserDefaults *prefs;
NSMutableArray *queryFavorites;
+
+ CMMCPConnection *mySQLConnection;
}
-//IBAction methods
+// IBAction methods
- (IBAction)performQuery:(id)sender;
- (IBAction)chooseQueryFavorite:(id)sender;
- (IBAction)chooseQueryHistory:(id)sender;
- (IBAction)closeSheet:(id)sender;
-//queryFavoritesSheet methods
+// queryFavoritesSheet methods
- (IBAction)addQueryFavorite:(id)sender;
- (IBAction)removeQueryFavorite:(id)sender;
- (IBAction)copyQueryFavorite:(id)sender;
- (IBAction)closeQueryFavoritesSheet:(id)sender;
-//getter methods
+// Accessors
- (NSArray *)currentResult;
-//additional methods
+// Other
- (void)setConnection:(CMMCPConnection *)theConnection;
- (void)setFavorites;
- (void)doPerformQueryService:(NSString *)query;
-//tableView datasource methods
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
-- (id)tableView:(NSTableView *)aTableView
- objectValueForTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-- (void)tableView:(NSTableView *)aTableView
- setObjectValue:(id)anObject
- forTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-
-//tableView drag&drop datasource methods
-- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
-- (NSDragOperation)tableView:(NSTableView*)aTableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
- proposedDropOperation:(NSTableViewDropOperation)operation;
-- (BOOL)tableView:(NSTableView*)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation;
-
-//tableView delegate methods
-- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
-
-//splitView delegate methods
-- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview;
-- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset;
-- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset;
-
-//textView delegate methods
-- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector;
-
-//last but not least
-- (id)init;
-- (void)dealloc;
-
@end
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 7936e962..04b4b9f8 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -723,8 +723,20 @@ traps enter key and
return NO;
}
+/*
+ * Updates various interface elements based on the current table view selection.
+ */
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+ if ([notification object] == queryFavoritesView) {
+
+ // Enable/disable buttons
+ [removeQueryFavoriteButton setEnabled:([queryFavoritesView numberOfSelectedRows] == 1)];
+ [copyQueryFavoriteButton setEnabled:([queryFavoritesView numberOfSelectedRows] == 1)];
+ }
+}
-//last but not least
+// Last but not least
- (id)init;
{
self = [super init];
@@ -740,5 +752,4 @@ traps enter key and
[super dealloc];
}
-
@end