aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/ContentFilterManager.xib1259
-rw-r--r--Resources/English.lproj/ContentFilters.plist18
-rw-r--r--Source/SPContentFilterManager.h47
-rw-r--r--Source/SPContentFilterManager.m486
-rw-r--r--Source/SPQueryFavoriteManager.m3
-rw-r--r--Source/SPTableView.m4
-rw-r--r--Source/TableContent.h3
-rw-r--r--Source/TableContent.m60
8 files changed, 1142 insertions, 738 deletions
diff --git a/Interfaces/English.lproj/ContentFilterManager.xib b/Interfaces/English.lproj/ContentFilterManager.xib
index 2014d3e4..c5922b3b 100644
--- a/Interfaces/English.lproj/ContentFilterManager.xib
+++ b/Interfaces/English.lproj/ContentFilterManager.xib
@@ -21,6 +21,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="280"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -39,7 +40,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
- <string key="NSClassName">SPQueryFavoriteManager</string>
+ <string key="NSClassName">SPContentFilterManager</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -67,7 +68,6 @@
<int key="NSvFlags">10</int>
<string key="NSFrame">{{0, 358}, {500, 5}}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -117,7 +117,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{-1, -1}, {32, 25}}</string>
<reference key="NSSuperview" ref="12172024"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="63587388">
<int key="NSCellFlags">67239424</int>
@@ -142,7 +141,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{30, -1}, {32, 25}}</string>
<reference key="NSSuperview" ref="12172024"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1023807891">
<int key="NSCellFlags">67239424</int>
@@ -167,7 +165,6 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{61, -1}, {32, 24}}</string>
<reference key="NSSuperview" ref="12172024"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="BWAnchoredPopUpButtonCell" key="NSCell" id="929623756">
<int key="NSCellFlags">71433792</int>
@@ -233,7 +230,7 @@
</object>
<object class="NSMenuItem" id="988339768">
<reference key="NSMenu" ref="299613786"/>
- <string key="NSTitle">Export Selected Favorites…</string>
+ <string key="NSTitle">Export Selected Filters…</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="451328194"/>
@@ -244,7 +241,7 @@
<object class="NSMenuItem" id="335130454">
<reference key="NSMenu" ref="299613786"/>
<bool key="NSIsHidden">YES</bool>
- <string key="NSTitle">Import Favorites by Replacing…</string>
+ <string key="NSTitle">Import Filter by Replacing…</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -255,53 +252,7 @@
</object>
<object class="NSMenuItem" id="748257931">
<reference key="NSMenu" ref="299613786"/>
- <string key="NSTitle">Import Favorites…</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="929623756"/>
- </object>
- <object class="NSMenuItem" id="314514584">
- <reference key="NSMenu" ref="299613786"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="929623756"/>
- </object>
- <object class="NSMenuItem" id="717460538">
- <reference key="NSMenu" ref="299613786"/>
- <string key="NSTitle">Save Query to File...</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="929623756"/>
- </object>
- <object class="NSMenuItem" id="954405787">
- <reference key="NSMenu" ref="299613786"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <bool key="NSIsHidden">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="929623756"/>
- </object>
- <object class="NSMenuItem" id="846349687">
- <reference key="NSMenu" ref="299613786"/>
- <bool key="NSIsHidden">YES</bool>
- <string key="NSTitle">Remove All...</string>
+ <string key="NSTitle">Import Filters…</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="451328194"/>
@@ -320,7 +271,6 @@
</object>
<string key="NSFrameSize">{249, 23}</string>
<reference key="NSSuperview" ref="1030932325"/>
- <reference key="NSWindow"/>
<bool key="BWABBIsResizable">YES</bool>
<bool key="BWABBIsAtBottom">YES</bool>
<bool key="BWABBHandleIsRightAligned">NO</bool>
@@ -341,14 +291,12 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{249, 322}</string>
<reference key="NSSuperview" ref="106335880"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="724842455">
<reference key="NSNextResponder" ref="642947098"/>
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{249, 17}</string>
<reference key="NSSuperview" ref="642947098"/>
- <reference key="NSWindow"/>
<reference key="NSTableView" ref="522643855"/>
</object>
<object class="_NSCornerView" key="NSCornerView" id="299150059">
@@ -356,19 +304,18 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-22, 0}, {12, 17}}</string>
<reference key="NSSuperview" ref="205303038"/>
- <reference key="NSWindow"/>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="901293108">
- <string key="NSIdentifier">name</string>
- <double key="NSWidth">186</double>
+ <string key="NSIdentifier">MenuLabel</string>
+ <double key="NSWidth">246</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
<int key="NSCellFlags">75628096</int>
<int key="NSCellFlags2">2048</int>
- <string key="NSContents">Favorites</string>
+ <string key="NSContents">Content Filters</string>
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
@@ -378,7 +325,7 @@
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
</object>
- <object class="NSColor" key="NSTextColor" id="75208904">
+ <object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">headerTextColor</string>
@@ -415,37 +362,6 @@
<bool key="NSIsEditable">YES</bool>
<reference key="NSTableView" ref="522643855"/>
</object>
- <object class="NSTableColumn" id="183746003">
- <string key="NSIdentifier">tabtrigger</string>
- <double key="NSWidth">57</double>
- <double key="NSMinWidth">10</double>
- <double key="NSMaxWidth">3.4028229999999999e+38</double>
- <object class="NSTableHeaderCell" key="NSHeaderCell">
- <int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <reference key="NSColor" ref="359131077"/>
- </object>
- <reference key="NSTextColor" ref="75208904"/>
- </object>
- <object class="NSTextFieldCell" key="NSDataCell" id="577317691">
- <int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">133120</int>
- <string key="NSContents">Text Cell</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="522643855"/>
- <reference key="NSBackgroundColor" ref="392588142"/>
- <reference key="NSTextColor" ref="810868150"/>
- </object>
- <int key="NSResizingMask">3</int>
- <bool key="NSIsResizeable">YES</bool>
- <reference key="NSTableView" ref="522643855"/>
- </object>
</object>
<double key="NSIntercellSpacingWidth">3</double>
<double key="NSIntercellSpacingHeight">2</double>
@@ -468,11 +384,11 @@
</object>
</object>
<double key="NSRowHeight">16</double>
- <int key="NSTvFlags">1245741056</int>
+ <int key="NSTvFlags">1245708288</int>
<reference key="NSDelegate"/>
<reference key="NSDataSource"/>
- <string key="NSAutosaveName">SPQueryFavoriteManagerTable</string>
- <int key="NSColumnAutoresizingStyle">1</int>
+ <string key="NSAutosaveName">SPContentFilterManagerTable</string>
+ <int key="NSColumnAutoresizingStyle">5</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">YES</bool>
@@ -482,7 +398,6 @@
</object>
<string key="NSFrame">{{0, 17}, {249, 322}}</string>
<reference key="NSSuperview" ref="205303038"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="522643855"/>
<reference key="NSDocView" ref="522643855"/>
<reference key="NSBGColor" ref="392588142"/>
@@ -493,7 +408,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{158, 17}, {11, 322}}</string>
<reference key="NSSuperview" ref="205303038"/>
- <reference key="NSWindow"/>
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="205303038"/>
<string key="NSAction">_doScroller:</string>
@@ -505,7 +419,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {311, 15}}</string>
<reference key="NSSuperview" ref="205303038"/>
- <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="205303038"/>
<string key="NSAction">_doScroller:</string>
@@ -520,7 +433,6 @@
</object>
<string key="NSFrameSize">{249, 17}</string>
<reference key="NSSuperview" ref="205303038"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="724842455"/>
<reference key="NSDocView" ref="724842455"/>
<reference key="NSBGColor" ref="392588142"/>
@@ -530,7 +442,6 @@
</object>
<string key="NSFrame">{{0, 22}, {249, 339}}</string>
<reference key="NSSuperview" ref="1030932325"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="106335880"/>
<int key="NSsFlags">528</int>
<reference key="NSVScroller" ref="322405876"/>
@@ -543,7 +454,6 @@
</object>
<string key="NSFrameSize">{249, 361}</string>
<reference key="NSSuperview" ref="588484039"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="BWCustomView" id="954707656">
@@ -551,12 +461,229 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="935426286">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">-2147483358</int>
+ <string key="NSFrame">{{17, 125}, {216, 14}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="283565009">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">4326400</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="935426286"/>
+ <object class="NSColor" key="NSBackgroundColor" id="29351754">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <reference key="NSColor" ref="276872502"/>
+ </object>
+ <reference key="NSTextColor" ref="810868150"/>
+ </object>
+ </object>
+ <object class="NSBox" id="399059966">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">34</int>
+ <string key="NSFrame">{{0, 56}, {250, 5}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <string key="NSOffsets">{0, 0}</string>
+ <object class="NSTextFieldCell" key="NSTitleCell">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Box</string>
+ <reference key="NSSupport" ref="1071840538"/>
+ <reference key="NSBackgroundColor" ref="570692726"/>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+ </object>
+ </object>
+ <int key="NSBorderType">3</int>
+ <int key="NSBoxType">2</int>
+ <int key="NSTitlePosition">0</int>
+ <bool key="NSTransparent">NO</bool>
+ </object>
+ <object class="NSTextField" id="149454412">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">-2147483358</int>
+ <string key="NSFrame">{{28, 67}, {205, 55}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="385474112">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">4325632</int>
+ <string key="NSContents">Multiline Label</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="149454412"/>
+ <reference key="NSBackgroundColor" ref="29351754"/>
+ <reference key="NSTextColor" ref="810868150"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="291991287">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">-2147483382</int>
+ <string key="NSFrame">{{82, 306}, {151, 14}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="733649545">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">71435264</int>
+ <string key="NSContents">Label</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="291991287"/>
+ <reference key="NSBackgroundColor" ref="29351754"/>
+ <reference key="NSTextColor" ref="810868150"/>
+ </object>
+ </object>
+ <object class="NSPopUpButton" id="513522987">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 181}, {124, 25}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="964598175">
+ <int key="NSCellFlags">608304704</int>
+ <int key="NSCellFlags2">133120</int>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="513522987"/>
+ <int key="NSButtonFlags">-2035138305</int>
+ <int key="NSButtonFlags2">164</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="488632473">
+ <reference key="NSMenu" ref="209253969"/>
+ <bool key="NSIsHidden">YES</bool>
+ <string key="NSTitle">Insert Placeholder</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="451328194"/>
+ <reference key="NSMixedImage" ref="770393621"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="964598175"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="209253969">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="488632473"/>
+ <object class="NSMenuItem" id="676226099">
+ <reference key="NSMenu" ref="209253969"/>
+ <string key="NSTitle">Argument</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSOnImage" ref="451328194"/>
+ <reference key="NSMixedImage" ref="770393621"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="964598175"/>
+ </object>
+ <object class="NSMenuItem" id="839429682">
+ <reference key="NSMenu" ref="209253969"/>
+ <string key="NSTitle">Quoted Argument</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="451328194"/>
+ <reference key="NSMixedImage" ref="770393621"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="964598175"/>
+ </object>
+ <object class="NSMenuItem" id="1053261621">
+ <reference key="NSMenu" ref="209253969"/>
+ <string key="NSTitle">Current Field</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="451328194"/>
+ <reference key="NSMixedImage" ref="770393621"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="964598175"/>
+ </object>
+ <object class="NSMenuItem" id="355284193">
+ <reference key="NSMenu" ref="209253969"/>
+ <string key="NSTitle">BINARY</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="451328194"/>
+ <reference key="NSMixedImage" ref="770393621"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="964598175"/>
+ </object>
+ </object>
+ <reference key="NSMenuFont" ref="1071840538"/>
+ </object>
+ <int key="NSSelectedIndex">4</int>
+ <bool key="NSPullDown">YES</bool>
+ <int key="NSPreferredEdge">1</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">1</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="308055338">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">-2147483360</int>
+ <string key="NSFrame">{{17, 165}, {104, 14}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="701303461">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">272761856</int>
+ <string key="NSContents">Conjunction Label:</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="308055338"/>
+ <reference key="NSBackgroundColor" ref="29351754"/>
+ <reference key="NSTextColor" ref="810868150"/>
+ </object>
+ </object>
+ <object class="NSTextField" id="152340347">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">-2147483356</int>
+ <string key="NSFrame">{{20, 144}, {124, 19}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="967281858">
+ <int key="NSCellFlags">-1804468671</int>
+ <int key="NSCellFlags2">272761856</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="152340347"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <reference key="NSBackgroundColor" ref="570692726"/>
+ <object class="NSColor" key="NSTextColor" id="10285292">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <reference key="NSColor" ref="646528321"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="713893232">
+ <reference key="NSNextResponder" ref="954707656"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 306}, {55, 14}}</string>
+ <reference key="NSSuperview" ref="954707656"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="220915282">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">272761856</int>
+ <string key="NSContents">Clause:</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="713893232"/>
+ <reference key="NSBackgroundColor" ref="29351754"/>
+ <reference key="NSTextColor" ref="810868150"/>
+ </object>
+ </object>
<object class="NSTextField" id="350107303">
<reference key="NSNextResponder" ref="954707656"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 330}, {45, 14}}</string>
<reference key="NSSuperview" ref="954707656"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="448987091">
<int key="NSCellFlags">68288064</int>
@@ -564,12 +691,7 @@
<string key="NSContents">Name:</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="350107303"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <reference key="NSColor" ref="276872502"/>
- </object>
+ <reference key="NSBackgroundColor" ref="29351754"/>
<reference key="NSTextColor" ref="810868150"/>
</object>
</object>
@@ -578,7 +700,6 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{56, 328}, {174, 19}}</string>
<reference key="NSSuperview" ref="954707656"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="474077606">
<int key="NSCellFlags">-1804468671</int>
@@ -589,12 +710,7 @@
<reference key="NSControlView" ref="247897226"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="570692726"/>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textColor</string>
- <reference key="NSColor" ref="646528321"/>
- </object>
+ <reference key="NSTextColor" ref="10285292"/>
</object>
</object>
<object class="NSScrollView" id="407061848">
@@ -620,7 +736,6 @@
<string>Apple PNG pasteboard type</string>
<string>Apple URL pasteboard type</string>
<string>CorePasteboardFlavorType 0x6D6F6F76</string>
- <string>CorePasteboardFlavorType 0x75726C20</string>
<string>NSColor pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NSStringPboardType</string>
@@ -636,7 +751,6 @@
</object>
<string key="NSFrameSize">{208, 14}</string>
<reference key="NSSuperview" ref="221447089"/>
- <reference key="NSWindow"/>
<object class="NSTextContainer" key="NSTextContainer" id="74289808">
<object class="NSLayoutManager" key="NSLayoutManager">
<object class="NSTextStorage" key="NSTextStorage">
@@ -705,13 +819,12 @@
</object>
<int key="NSTVFlags">6</int>
<string key="NSMaxSize">{592, 1e+07}</string>
- <string key="NSMinize">{180, 0}</string>
+ <string key="NSMinize">{177, 0}</string>
<nil key="NSDelegate"/>
</object>
</object>
- <string key="NSFrame">{{1, 1}, {208, 264}}</string>
+ <string key="NSFrame">{{1, 1}, {208, 98}}</string>
<reference key="NSSuperview" ref="407061848"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="556251150"/>
<reference key="NSDocView" ref="556251150"/>
<reference key="NSBGColor" ref="359131077"/>
@@ -726,7 +839,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {11, 133}}</string>
<reference key="NSSuperview" ref="407061848"/>
- <reference key="NSWindow"/>
<int key="NSsFlags">256</int>
<reference key="NSTarget" ref="407061848"/>
<string key="NSAction">_doScroller:</string>
@@ -737,7 +849,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {87, 18}}</string>
<reference key="NSSuperview" ref="407061848"/>
- <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="407061848"/>
<string key="NSAction">_doScroller:</string>
@@ -745,9 +856,8 @@
<double key="NSPercent">0.94565220000000005</double>
</object>
</object>
- <string key="NSFrame">{{20, 54}, {210, 266}}</string>
+ <string key="NSFrame">{{20, 204}, {210, 100}}</string>
<reference key="NSSuperview" ref="954707656"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="221447089"/>
<int key="NSsFlags">514</int>
<reference key="NSVScroller" ref="978638217"/>
@@ -759,7 +869,6 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{130, 16}, {100, 25}}</string>
<reference key="NSSuperview" ref="954707656"/>
- <reference key="NSWindow"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="908635119">
@@ -786,7 +895,6 @@
<int key="NSvFlags">289</int>
<string key="NSFrame">{{20, 16}, {100, 25}}</string>
<reference key="NSSuperview" ref="954707656"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="615814080">
<int key="NSCellFlags">67239424</int>
@@ -805,16 +913,14 @@
</object>
<string key="NSFrame">{{250, 0}, {250, 361}}</string>
<reference key="NSSuperview" ref="588484039"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
<string key="NSFrameSize">{500, 361}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<bool key="NSIsVertical">YES</bool>
<int key="NSDividerStyle">2</int>
- <string key="NSAutosaveName">SPQueryFavoriteSplitView</string>
+ <string key="NSAutosaveName">SPContentFilterSplitView</string>
<object class="NSColor" key="BWSVColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC42NjY2NjY2NjY3IDAuNjY2NjY2NjY2NyAwLjY2NjY2NjY2NjcAA</bytes>
@@ -834,11 +940,8 @@
</object>
</object>
<object class="NSMutableDictionary" key="BWSVMaxValues">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <integer value="0" key="NS.key.0"/>
+ <integer value="250" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="BWSVMinUnits">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -872,7 +975,6 @@
</object>
<string key="NSFrameSize">{500, 371}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMinSize">{500, 393}</string>
@@ -902,32 +1004,14 @@
<reference key="NSOnImage" ref="451328194"/>
<reference key="NSMixedImage" ref="770393621"/>
</object>
- <object class="NSMenuItem" id="1029652483">
- <reference key="NSMenu" ref="855448788"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- </object>
- <object class="NSMenuItem" id="1015707754">
- <reference key="NSMenu" ref="855448788"/>
- <string key="NSTitle">Save to File...</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="451328194"/>
- <reference key="NSMixedImage" ref="770393621"/>
- </object>
</object>
</object>
<object class="NSArrayController" id="863945469">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>name</string>
- <string>query</string>
- <string>tabtrigger</string>
+ <string>Clause</string>
+ <string>MenuLabel</string>
+ <string>ConjunctionLabel</string>
</object>
<bool key="NSEditable">YES</bool>
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
@@ -941,316 +1025,319 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">window</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1005"/>
+ <string key="label">delegate</string>
+ <reference key="source" ref="1005"/>
+ <reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">133</int>
+ <int key="connectionID">187</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">favoriteNameTextField</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="247897226"/>
+ <string key="label">delegate</string>
+ <reference key="source" ref="247897226"/>
+ <reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">139</int>
+ <int key="connectionID">188</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">favoriteQueryTextView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="556251150"/>
+ <string key="label">delegate</string>
+ <reference key="source" ref="556251150"/>
+ <reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">140</int>
+ <int key="connectionID">198</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">favoritesTableView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="522643855"/>
- </object>
- <int key="connectionID">141</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">addQueryFavorite:</string>
+ <string key="label">removeButton</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="478413208"/>
+ <reference key="destination" ref="960187291"/>
</object>
- <int key="connectionID">180</int>
+ <int key="connectionID">275</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeQueryFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="960187291"/>
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: selection.Clause</string>
+ <reference key="source" ref="556251150"/>
+ <reference key="destination" ref="863945469"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="556251150"/>
+ <reference key="NSDestination" ref="863945469"/>
+ <string key="NSLabel">value: selection.Clause</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">selection.Clause</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
</object>
- <int key="connectionID">181</int>
+ <int key="connectionID">300</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">closeQueryManagerSheet:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="556514169"/>
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">font: values.CustomQueryEditorFont</string>
+ <reference key="source" ref="556251150"/>
+ <reference key="destination" ref="592597522"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="556251150"/>
+ <reference key="NSDestination" ref="592597522"/>
+ <string key="NSLabel">font: values.CustomQueryEditorFont</string>
+ <string key="NSBinding">font</string>
+ <string key="NSKeyPath">values.CustomQueryEditorFont</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSValueTransformerName</string>
+ <string key="NS.object.0">NSUnarchiveFromData</string>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
</object>
- <int key="connectionID">184</int>
+ <int key="connectionID">306</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">nextKeyView</string>
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: selection.MenuLabel</string>
<reference key="source" ref="247897226"/>
- <reference key="destination" ref="556251150"/>
+ <reference key="destination" ref="863945469"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="247897226"/>
+ <reference key="NSDestination" ref="863945469"/>
+ <string key="NSLabel">value: selection.MenuLabel</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">selection.MenuLabel</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
</object>
- <int key="connectionID">185</int>
+ <int key="connectionID">308</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">nextKeyView</string>
- <reference key="source" ref="407061848"/>
- <reference key="destination" ref="247897226"/>
+ <string key="label">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
</object>
- <int key="connectionID">186</int>
+ <int key="connectionID">310</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="1005"/>
- <reference key="destination" ref="1001"/>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closeContentFilterManagerSheet:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="556514169"/>
</object>
- <int key="connectionID">187</int>
+ <int key="connectionID">311</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="247897226"/>
- <reference key="destination" ref="1001"/>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closeContentFilterManagerSheet:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="602197876"/>
</object>
- <int key="connectionID">188</int>
+ <int key="connectionID">312</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="522643855"/>
- <reference key="destination" ref="1001"/>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addContentFilter:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="478413208"/>
</object>
- <int key="connectionID">193</int>
+ <int key="connectionID">313</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">scrollView</string>
- <reference key="source" ref="556251150"/>
- <reference key="destination" ref="407061848"/>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeContentFilter:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="960187291"/>
</object>
- <int key="connectionID">197</int>
+ <int key="connectionID">314</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="556251150"/>
- <reference key="destination" ref="1001"/>
+ <string key="label">contentFilterTableView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="522643855"/>
</object>
- <int key="connectionID">198</int>
+ <int key="connectionID">316</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">menu</string>
- <reference key="source" ref="522643855"/>
- <reference key="destination" ref="855448788"/>
- </object>
- <int key="connectionID">209</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">removeQueryFavorite:</string>
+ <string key="label">contentFilterConjunctionTextField</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="325985429"/>
+ <reference key="destination" ref="152340347"/>
</object>
- <int key="connectionID">211</int>
+ <int key="connectionID">323</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveFavoriteToFile:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1015707754"/>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="522643855"/>
+ <reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">249</int>
+ <int key="connectionID">324</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveFavoriteToFile:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="717460538"/>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="522643855"/>
+ <reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">250</int>
+ <int key="connectionID">325</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">removeAllQueryFavorites:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="846349687"/>
+ <string key="label">duplicateContentFilter:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="161398571"/>
</object>
- <int key="connectionID">251</int>
+ <int key="connectionID">326</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">exportFavorites:</string>
- <reference key="source" ref="1001"/>
+ <string key="label">exportContentFilter:</string>
+ <reference key="source" ref="1003"/>
<reference key="destination" ref="988339768"/>
</object>
- <int key="connectionID">257</int>
+ <int key="connectionID">327</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">importFavoritesByAdding:</string>
- <reference key="source" ref="1001"/>
+ <string key="label">importContentFilterByAdding:</string>
+ <reference key="source" ref="1003"/>
<reference key="destination" ref="748257931"/>
</object>
- <int key="connectionID">261</int>
+ <int key="connectionID">328</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">importFavoritesByReplacing:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="335130454"/>
+ <string key="label">removeContentFilter:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="325985429"/>
</object>
- <int key="connectionID">262</int>
+ <int key="connectionID">329</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">closeQueryManagerSheet:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="602197876"/>
+ <string key="label">duplicateContentFilter:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="247392372"/>
</object>
- <int key="connectionID">273</int>
+ <int key="connectionID">330</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">dataSource</string>
+ <string key="label">menu</string>
<reference key="source" ref="522643855"/>
- <reference key="destination" ref="1001"/>
+ <reference key="destination" ref="855448788"/>
</object>
- <int key="connectionID">274</int>
+ <int key="connectionID">331</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">removeButton</string>
+ <string key="label">contentFilterNameTextField</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="960187291"/>
+ <reference key="destination" ref="247897226"/>
</object>
- <int key="connectionID">275</int>
+ <int key="connectionID">332</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">nextKeyView</string>
- <reference key="source" ref="522643855"/>
- <reference key="destination" ref="556251150"/>
- </object>
- <int key="connectionID">277</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">duplicateQueryFavorite:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="161398571"/>
- </object>
- <int key="connectionID">282</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">duplicateQueryFavorite:</string>
+ <string key="label">contentFilterTextView</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="247392372"/>
+ <reference key="destination" ref="556251150"/>
</object>
- <int key="connectionID">283</int>
+ <int key="connectionID">333</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
- <string key="label">value: selection.name</string>
- <reference key="source" ref="247897226"/>
+ <string key="label">value: arrangedObjects.MenuLabel</string>
+ <reference key="source" ref="901293108"/>
<reference key="destination" ref="863945469"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="247897226"/>
+ <reference key="NSSource" ref="901293108"/>
<reference key="NSDestination" ref="863945469"/>
- <string key="NSLabel">value: selection.name</string>
+ <string key="NSLabel">value: arrangedObjects.MenuLabel</string>
<string key="NSBinding">value</string>
- <string key="NSKeyPath">selection.name</string>
+ <string key="NSKeyPath">arrangedObjects.MenuLabel</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">287</int>
+ <int key="connectionID">335</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">contentFilterArrayController</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="863945469"/>
+ </object>
+ <int key="connectionID">336</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
- <string key="label">value: selection.query</string>
- <reference key="source" ref="556251150"/>
+ <string key="label">value: selection.ConjunctionLabel</string>
+ <reference key="source" ref="152340347"/>
<reference key="destination" ref="863945469"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="556251150"/>
+ <reference key="NSSource" ref="152340347"/>
<reference key="NSDestination" ref="863945469"/>
- <string key="NSLabel">value: selection.query</string>
+ <string key="NSLabel">value: selection.ConjunctionLabel</string>
<string key="NSBinding">value</string>
- <string key="NSKeyPath">selection.query</string>
+ <string key="NSKeyPath">selection.ConjunctionLabel</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">291</int>
+ <int key="connectionID">338</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">favoritesArrayController</string>
+ <string key="label">contentFilterConjunctionLabel</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="863945469"/>
+ <reference key="destination" ref="308055338"/>
</object>
- <int key="connectionID">297</int>
+ <int key="connectionID">339</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">value: arrangedObjects.name</string>
- <reference key="source" ref="901293108"/>
- <reference key="destination" ref="863945469"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="901293108"/>
- <reference key="NSDestination" ref="863945469"/>
- <string key="NSLabel">value: arrangedObjects.name</string>
- <string key="NSBinding">value</string>
- <string key="NSKeyPath">arrangedObjects.name</string>
- <object class="NSDictionary" key="NSOptions">
- <string key="NS.key.0">NSCreatesSortDescriptor</string>
- <boolean value="NO" key="NS.object.0"/>
- </object>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">numberOfArgsLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="291991287"/>
</object>
- <int key="connectionID">298</int>
+ <int key="connectionID">354</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBBindingConnection" key="connection">
- <string key="label">value: arrangedObjects.tabtrigger</string>
- <reference key="source" ref="183746003"/>
- <reference key="destination" ref="863945469"/>
- <object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="183746003"/>
- <reference key="NSDestination" ref="863945469"/>
- <string key="NSLabel">value: arrangedObjects.tabtrigger</string>
- <string key="NSBinding">value</string>
- <string key="NSKeyPath">arrangedObjects.tabtrigger</string>
- <object class="NSDictionary" key="NSOptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSConditionallySetsEditable</string>
- <string>NSCreatesSortDescriptor</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <boolean value="YES"/>
- <boolean value="NO"/>
- </object>
- </object>
- <int key="NSNibBindingConnectorVersion">2</int>
- </object>
+ <object class="IBActionConnection" key="connection">
+ <string key="label">insertPlaceholder:</string>
+ <reference key="source" ref="1003"/>
+ <reference key="destination" ref="513522987"/>
+ </object>
+ <int key="connectionID">356</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">resultingClauseContentLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="149454412"/>
+ </object>
+ <int key="connectionID">363</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">resultingClauseLabel</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="935426286"/>
+ </object>
+ <int key="connectionID">364</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">insertPlaceholderButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="513522987"/>
</object>
- <int key="connectionID">299</int>
+ <int key="connectionID">365</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nextKeyView</string>
+ <reference key="source" ref="247897226"/>
+ <reference key="destination" ref="556251150"/>
+ </object>
+ <int key="connectionID">366</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -1317,8 +1404,6 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="325985429"/>
<reference ref="247392372"/>
- <reference ref="1029652483"/>
- <reference ref="1015707754"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Favorite Context Menu</string>
@@ -1334,16 +1419,6 @@
<reference key="parent" ref="855448788"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">247</int>
- <reference key="object" ref="1029652483"/>
- <reference key="parent" ref="855448788"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">248</int>
- <reference key="object" ref="1015707754"/>
- <reference key="parent" ref="855448788"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">278</int>
<reference key="object" ref="588484039"/>
<object class="NSMutableArray" key="children">
@@ -1359,10 +1434,18 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="247897226"/>
- <reference ref="407061848"/>
<reference ref="350107303"/>
- <reference ref="556514169"/>
+ <reference ref="152340347"/>
+ <reference ref="308055338"/>
+ <reference ref="713893232"/>
+ <reference ref="407061848"/>
+ <reference ref="291991287"/>
<reference ref="602197876"/>
+ <reference ref="556514169"/>
+ <reference ref="399059966"/>
+ <reference ref="149454412"/>
+ <reference ref="935426286"/>
+ <reference ref="513522987"/>
</object>
<reference key="parent" ref="588484039"/>
</object>
@@ -1439,14 +1522,10 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="335130454"/>
- <reference ref="717460538"/>
<reference ref="748257931"/>
- <reference ref="314514584"/>
<reference ref="646784384"/>
<reference ref="988339768"/>
<reference ref="161398571"/>
- <reference ref="846349687"/>
- <reference ref="954405787"/>
<reference ref="921722168"/>
</object>
<reference key="parent" ref="929623756"/>
@@ -1457,21 +1536,11 @@
<reference key="parent" ref="299613786"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">243</int>
- <reference key="object" ref="717460538"/>
- <reference key="parent" ref="299613786"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">255</int>
<reference key="object" ref="748257931"/>
<reference key="parent" ref="299613786"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">259</int>
- <reference key="object" ref="314514584"/>
- <reference key="parent" ref="299613786"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">258</int>
<reference key="object" ref="646784384"/>
<reference key="parent" ref="299613786"/>
@@ -1487,16 +1556,6 @@
<reference key="parent" ref="299613786"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">246</int>
- <reference key="object" ref="846349687"/>
- <reference key="parent" ref="299613786"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">244</int>
- <reference key="object" ref="954405787"/>
- <reference key="parent" ref="299613786"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">241</int>
<reference key="object" ref="921722168"/>
<reference key="parent" ref="299613786"/>
@@ -1533,21 +1592,11 @@
<reference key="object" ref="522643855"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="183746003"/>
<reference ref="901293108"/>
</object>
<reference key="parent" ref="205303038"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">263</int>
- <reference key="object" ref="183746003"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="577317691"/>
- </object>
- <reference key="parent" ref="522643855"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="901293108"/>
<object class="NSMutableArray" key="children">
@@ -1562,11 +1611,6 @@
<reference key="parent" ref="901293108"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">264</int>
- <reference key="object" ref="577317691"/>
- <reference key="parent" ref="183746003"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">121</int>
<reference key="object" ref="350107303"/>
<object class="NSMutableArray" key="children">
@@ -1654,6 +1698,151 @@
<reference key="parent" ref="0"/>
<string key="objectName">Favorites Controller</string>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">303</int>
+ <reference key="object" ref="713893232"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="220915282"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">304</int>
+ <reference key="object" ref="220915282"/>
+ <reference key="parent" ref="713893232"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">319</int>
+ <reference key="object" ref="152340347"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="967281858"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">320</int>
+ <reference key="object" ref="967281858"/>
+ <reference key="parent" ref="152340347"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">321</int>
+ <reference key="object" ref="308055338"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="701303461"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">322</int>
+ <reference key="object" ref="701303461"/>
+ <reference key="parent" ref="308055338"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">340</int>
+ <reference key="object" ref="513522987"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="964598175"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">341</int>
+ <reference key="object" ref="964598175"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="209253969"/>
+ </object>
+ <reference key="parent" ref="513522987"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">342</int>
+ <reference key="object" ref="209253969"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="676226099"/>
+ <reference ref="1053261621"/>
+ <reference ref="355284193"/>
+ <reference ref="839429682"/>
+ <reference ref="488632473"/>
+ </object>
+ <reference key="parent" ref="964598175"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">343</int>
+ <reference key="object" ref="676226099"/>
+ <reference key="parent" ref="209253969"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">344</int>
+ <reference key="object" ref="1053261621"/>
+ <reference key="parent" ref="209253969"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">345</int>
+ <reference key="object" ref="355284193"/>
+ <reference key="parent" ref="209253969"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">350</int>
+ <reference key="object" ref="291991287"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="733649545"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">351</int>
+ <reference key="object" ref="733649545"/>
+ <reference key="parent" ref="291991287"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">352</int>
+ <reference key="object" ref="149454412"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="385474112"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">353</int>
+ <reference key="object" ref="385474112"/>
+ <reference key="parent" ref="149454412"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">357</int>
+ <reference key="object" ref="839429682"/>
+ <reference key="parent" ref="209253969"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">358</int>
+ <reference key="object" ref="488632473"/>
+ <reference key="parent" ref="209253969"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">360</int>
+ <reference key="object" ref="399059966"/>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">361</int>
+ <reference key="object" ref="935426286"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="283565009"/>
+ </object>
+ <reference key="parent" ref="954707656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">362</int>
+ <reference key="object" ref="283565009"/>
+ <reference key="parent" ref="935426286"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -1706,13 +1895,6 @@
<string>240.IBEditorWindowLastContentRect</string>
<string>240.IBPluginDependency</string>
<string>241.IBPluginDependency</string>
- <string>243.IBAttributePlaceholdersKey</string>
- <string>243.IBPluginDependency</string>
- <string>244.IBPluginDependency</string>
- <string>246.IBAttributePlaceholdersKey</string>
- <string>246.IBPluginDependency</string>
- <string>247.IBPluginDependency</string>
- <string>248.IBPluginDependency</string>
<string>25.IBPluginDependency</string>
<string>25.IBShouldRemoveOnLegacySave</string>
<string>252.IBPluginDependency</string>
@@ -1721,13 +1903,10 @@
<string>255.IBAttributePlaceholdersKey</string>
<string>255.IBPluginDependency</string>
<string>258.IBPluginDependency</string>
- <string>259.IBPluginDependency</string>
<string>26.IBPluginDependency</string>
<string>26.ImportedFromIB2</string>
<string>260.IBAttributePlaceholdersKey</string>
<string>260.IBPluginDependency</string>
- <string>263.IBPluginDependency</string>
- <string>264.IBPluginDependency</string>
<string>265.IBPluginDependency</string>
<string>27.CustomClassName</string>
<string>27.IBPluginDependency</string>
@@ -1739,13 +1918,40 @@
<string>280.IBPluginDependency</string>
<string>281.IBPluginDependency</string>
<string>284.IBPluginDependency</string>
+ <string>303.IBPluginDependency</string>
+ <string>304.IBPluginDependency</string>
+ <string>319.IBPluginDependency</string>
+ <string>320.IBPluginDependency</string>
+ <string>321.IBAttributePlaceholdersKey</string>
+ <string>321.IBPluginDependency</string>
+ <string>322.IBPluginDependency</string>
+ <string>340.IBPluginDependency</string>
+ <string>341.IBPluginDependency</string>
+ <string>342.IBEditorWindowLastContentRect</string>
+ <string>342.IBPluginDependency</string>
+ <string>343.IBAttributePlaceholdersKey</string>
+ <string>343.IBPluginDependency</string>
+ <string>344.IBAttributePlaceholdersKey</string>
+ <string>344.IBPluginDependency</string>
+ <string>345.IBAttributePlaceholdersKey</string>
+ <string>345.IBPluginDependency</string>
+ <string>350.IBPluginDependency</string>
+ <string>351.IBPluginDependency</string>
+ <string>352.IBPluginDependency</string>
+ <string>353.IBPluginDependency</string>
+ <string>357.IBAttributePlaceholdersKey</string>
+ <string>357.IBPluginDependency</string>
+ <string>358.IBPluginDependency</string>
+ <string>360.IBPluginDependency</string>
+ <string>361.IBPluginDependency</string>
+ <string>362.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{209, 69}, {500, 371}}</string>
+ <string>{{118, 69}, {500, 371}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{209, 69}, {500, 371}}</string>
+ <string>{{118, 69}, {500, 371}}</string>
<boolean value="NO"/>
<string>{196, 240}</string>
<string>{{357, 418}, {480, 270}}</string>
@@ -1787,7 +1993,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{693, 450}, {145, 73}}</string>
+ <string>{{495, 480}, {116, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1806,76 +2012,114 @@
<string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{234, 203}, {241, 152}}</string>
+ <string>{{267, 40}, {217, 98}}</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <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="717460538"/>
- <string key="toolTip">Save query of selected favorite to file</string>
+ <reference key="object" ref="988339768"/>
+ <string key="toolTip">Export selected favorites as SPF file</string>
</object>
</object>
<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="846349687"/>
- <string key="toolTip">Remove all favorites</string>
+ <reference key="object" ref="748257931"/>
+ <string key="toolTip">Import query favorites from SPF file and append them to the favorite list</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <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="988339768"/>
- <string key="toolTip">Export selected favorites as SPF file</string>
+ <reference key="object" ref="335130454"/>
+ <string key="toolTip">Import query favorites from SPF file and replace the current favorites</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>ImageAndTextCell</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.brandonwalkin.BWToolkit</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">
<string key="name">ToolTip</string>
- <reference key="object" ref="748257931"/>
- <string key="toolTip">Import query favorites from SPF file and append them to the favorite list</string>
+ <reference key="object" ref="308055338"/>
+ <string key="toolTip">Label which appears between the argument input fields (as short as possible)</string>
</object>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
+ <string>{{377, 187}, {156, 88}}</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="335130454"/>
- <string key="toolTip">Import query favorites from SPF file and replace the current favorites</string>
+ <reference key="object" ref="676226099"/>
+ <string key="toolTip">${} – Argument placeholder.</string>
+ </object>
+ </object>
+ <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="1053261621"/>
+ <string key="toolTip">$CURRENT_FIELD – placeholder. That placeholder will be replaced by the current field name.</string>
+ </object>
+ </object>
+ <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="355284193"/>
+ <string key="toolTip">$BINARY – placeholder. The keyword BINARY will be inserted if ⇧ is pressed while invoking “Filter”.</string>
</object>
</object>
<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>ImageAndTextCell</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
+ <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="839429682"/>
+ <string key="toolTip">'${}' – quoted argument placeholder.</string>
+ </object>
+ </object>
+ <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.brandonwalkin.BWToolkit</string>
- <string>com.brandonwalkin.BWToolkit</string>
- <string>com.brandonwalkin.BWToolkit</string>
- <string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
@@ -1895,7 +2139,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">299</int>
+ <int key="maxID">366</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1954,7 +2198,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="559035321">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SPContentFilterManager.h</string>
</object>
@@ -1968,7 +2212,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="110708609">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Source/SPQueryFavoriteManager.h</string>
</object>
@@ -2034,21 +2278,18 @@
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">SPQueryFavoriteManager</string>
+ <string key="className">SPContentFilterManager</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>addQueryFavorite:</string>
- <string>closeQueryManagerSheet:</string>
- <string>duplicateQueryFavorite:</string>
- <string>exportFavorites:</string>
- <string>importFavoritesByAdding:</string>
- <string>importFavoritesByReplacing:</string>
- <string>removeAllQueryFavorites:</string>
- <string>removeQueryFavorite:</string>
- <string>saveFavoriteToFile:</string>
+ <string>addContentFilter:</string>
+ <string>closeContentFilterManagerSheet:</string>
+ <string>duplicateContentFilter:</string>
+ <string>exportContentFilter:</string>
+ <string>importContentFilterByAdding:</string>
+ <string>removeContentFilter:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2058,33 +2299,34 @@
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>contentFilterArrayController</string>
+ <string>contentFilterConjunctionTextField</string>
+ <string>contentFilterNameTextField</string>
+ <string>contentFilterTableView</string>
+ <string>contentFilterTextView</string>
<string>encodingPopUp</string>
- <string>favoriteNameTextField</string>
- <string>favoriteQueryTextView</string>
- <string>favoritesArrayController</string>
- <string>favoritesTableView</string>
<string>removeButton</string>
+ <string>tableHeader</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSPopUpButton</string>
- <string>NSTextField</string>
- <string>NSTextView</string>
- <string>NSArrayController</string>
- <string>NSTableView</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
<string>id</string>
</object>
</object>
- <reference key="sourceIdentifier" ref="110708609"/>
+ <reference key="sourceIdentifier" ref="559035321"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">SPTableView</string>
@@ -2095,6 +2337,77 @@
</object>
</object>
</object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="649671023">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Source/SPContentFilterManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPContentFilterManager</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addContentFilter:</string>
+ <string>closeContentFilterManagerSheet:</string>
+ <string>duplicateContentFilter:</string>
+ <string>exportContentFilter:</string>
+ <string>importContentFilterByAdding:</string>
+ <string>insertPlaceholder:</string>
+ <string>removeContentFilter:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>contentFilterArrayController</string>
+ <string>contentFilterConjunctionLabel</string>
+ <string>contentFilterConjunctionTextField</string>
+ <string>contentFilterNameTextField</string>
+ <string>contentFilterTableView</string>
+ <string>contentFilterTextView</string>
+ <string>encodingPopUp</string>
+ <string>insertPlaceholderButton</string>
+ <string>numberOfArgsLabel</string>
+ <string>removeButton</string>
+ <string>resultingClauseContentLabel</string>
+ <string>resultingClauseLabel</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <reference key="sourceIdentifier" ref="649671023"/>
+ </object>
+ </object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
@@ -2108,21 +2421,21 @@
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="122660709">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="722659309">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="49390716">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="49573053">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="170726235">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="374034481">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
</object>
@@ -2191,7 +2504,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSControl</string>
<string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="261042715">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="754930192">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
</object>
@@ -2215,7 +2528,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="639142134">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="339787212">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
</object>
@@ -2223,7 +2536,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSMenuItem</string>
<string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="273499029">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="392972684">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSMenuItem.h</string>
</object>
@@ -2245,19 +2558,19 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="122660709"/>
+ <reference key="sourceIdentifier" ref="722659309"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="49390716"/>
+ <reference key="sourceIdentifier" ref="49573053"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="170726235"/>
+ <reference key="sourceIdentifier" ref="374034481"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="261042715"/>
+ <reference key="sourceIdentifier" ref="754930192"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
@@ -2296,7 +2609,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="639142134"/>
+ <reference key="sourceIdentifier" ref="339787212"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
@@ -2328,7 +2641,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="396318795">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="996579531">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSTableView.h</string>
</object>
@@ -2342,7 +2655,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="397361516">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="185661729">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSView.h</string>
</object>
@@ -2653,7 +2966,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSTableView</string>
<string key="superclassName">NSControl</string>
- <reference key="sourceIdentifier" ref="396318795"/>
+ <reference key="sourceIdentifier" ref="996579531"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSText</string>
@@ -2704,7 +3017,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
- <reference key="sourceIdentifier" ref="273499029"/>
+ <reference key="sourceIdentifier" ref="392972684"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
@@ -2716,7 +3029,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
<string key="superclassName">NSResponder</string>
- <reference key="sourceIdentifier" ref="397361516"/>
+ <reference key="sourceIdentifier" ref="185661729"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
diff --git a/Resources/English.lproj/ContentFilters.plist b/Resources/English.lproj/ContentFilters.plist
index 5d79edc0..d153a108 100644
--- a/Resources/English.lproj/ContentFilters.plist
+++ b/Resources/English.lproj/ContentFilters.plist
@@ -106,8 +106,6 @@
<integer>1</integer>
<key>Clause</key>
<string>LIKE $BINARY '${}'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -116,8 +114,6 @@
<integer>1</integer>
<key>Clause</key>
<string>NOT LIKE $BINARY '${}'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -126,8 +122,6 @@
<integer>1</integer>
<key>Clause</key>
<string>LIKE $BINARY '%${}%'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -136,8 +130,6 @@
<integer>1</integer>
<key>Clause</key>
<string>NOT LIKE $BINARY '%${}%'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -146,8 +138,6 @@
<integer>1</integer>
<key>Clause</key>
<string>LIKE $BINARY '${}'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -156,8 +146,6 @@
<integer>1</integer>
<key>Clause</key>
<string>NOT LIKE $BINARY '${}'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -167,7 +155,9 @@
<key>Clause</key>
<string>IN (${})</string>
<key>Tooltip</key>
- <string>Do quote strings manually.</string>
+ <string>IN ([arg])
+
+Do quote strings manually.</string>
</dict>
<dict>
<key>MenuLabel</key>
@@ -180,8 +170,6 @@
</array>
<key>Clause</key>
<string>BETWEEN $BINARY '${}' AND '${}'</string>
- <key>Tooltip</key>
- <string>Press ⇧ for case-sensitive search.</string>
</dict>
<dict>
<key>MenuLabel</key>
diff --git a/Source/SPContentFilterManager.h b/Source/SPContentFilterManager.h
index c0b22cd9..50cdb95a 100644
--- a/Source/SPContentFilterManager.h
+++ b/Source/SPContentFilterManager.h
@@ -4,8 +4,8 @@
// SPContentFilterManager.h
// sequel-pro
//
-// Created by Stuart Connolly (stuconnolly.com) on Aug 23, 2009
-// Copyright (c) 2009 Stuart Connolly. All rights reserved.
+// Created by Hans-Jörg Bibiko on Sep 29, 2009
+// Copyright (c) 2009 Hans-Jörg Bibiko. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
@interface NSObject (SPContentFilterManagerDelegate)
-- (void)queryFavoritesHaveBeenUpdated:(id)manager;
+- (void)contentFiltersHaveBeenUpdated:(id)manager;
@end
@@ -36,34 +36,41 @@
NSUserDefaults *prefs;
NSURL *delegatesFileURL;
- IBOutlet NSPopUpButton *encodingPopUp;
- IBOutlet NSTableView *favoritesTableView;
- IBOutlet NSTextField *favoriteNameTextField;
- IBOutlet NSTextView *favoriteQueryTextView;
+ IBOutlet id encodingPopUp;
+ IBOutlet id contentFilterTableView;
+ IBOutlet id contentFilterNameTextField;
+ IBOutlet id contentFilterConjunctionTextField;
+ IBOutlet id contentFilterConjunctionLabel;
+ IBOutlet id contentFilterTextView;
IBOutlet id removeButton;
+ IBOutlet id numberOfArgsLabel;
+ IBOutlet id resultingClauseLabel;
+ IBOutlet id resultingClauseContentLabel;
+ IBOutlet id insertPlaceholderButton;
- IBOutlet NSArrayController *favoritesArrayController;
+ IBOutlet id contentFilterArrayController;
- NSMutableArray *favorites;
+ NSMutableArray *contentFilters;
BOOL isTableCellEditing;
+
+ NSString *filterType;
}
-- (id)initWithDelegate:(id)managerDelegate;
+- (id)initWithDelegate:(id)managerDelegate forFilterType:(NSString *)compareType;
// Accessors
-- (NSMutableArray *)queryFavoritesForFileURL:(NSURL *)fileURL;
+- (NSMutableArray *)contentFilterForFileURL:(NSURL *)fileURL;
- (id)customQueryInstance;
// IBAction methods
-- (IBAction)addQueryFavorite:(id)sender;
-- (IBAction)removeQueryFavorite:(id)sender;
-- (IBAction)removeAllQueryFavorites:(id)sender;
-- (IBAction)duplicateQueryFavorite:(id)sender;
-- (IBAction)saveFavoriteToFile:(id)sender;
-- (IBAction)exportFavorites:(id)sender;
-- (IBAction)importFavoritesByAdding:(id)sender;
-- (IBAction)importFavoritesByReplacing:(id)sender;
-- (IBAction)closeQueryManagerSheet:(id)sender;
+- (IBAction)addContentFilter:(id)sender;
+- (IBAction)removeContentFilter:(id)sender;
+- (IBAction)insertPlaceholder:(id)sender;
+- (IBAction)duplicateContentFilter:(id)sender;
+- (IBAction)exportContentFilter:(id)sender;
+- (IBAction)importContentFilterByAdding:(id)sender;
+// - (IBAction)importContentFilterByReplacing:(id)sender;
+- (IBAction)closeContentFilterManagerSheet:(id)sender;
@end
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index 46726bb8..8ac609b9 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -4,8 +4,8 @@
// SPContentFilterManager.m
// sequel-pro
//
-// Created by Stuart Connolly (stuconnolly.com) on Aug 23, 2009
-// Copyright (c) 2009 Stuart Connolly. All rights reserved.
+// Created by Hans-Jörg Bibiko on Sep 29, 2009
+// Copyright (c) 2009 Hans-Jörg Bibiko. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -25,16 +25,15 @@
#import "SPContentFilterManager.h"
#import "ImageAndTextCell.h"
-#import "SPEncodingPopupAccessory.h"
+#import "RegexKitLite.h"
#import "SPQueryController.h"
-#define DEFAULT_QUERY_FAVORITE_FILE_EXTENSION @"sql"
#define DEFAULT_SEQUELPRO_FILE_EXTENSION @"spf"
#define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]")
#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]")
-#define QUERY_FAVORITES_PB_DRAG_TYPE @"SequelProQueryFavoritesPasteboard"
+#define CONTENT_FILTER_PB_DRAG_TYPE @"SequelProContentFilterPasteboard"
@interface SPContentFilterManager (Private)
- (void)_initWithNoSelection;
@@ -45,20 +44,22 @@
/**
* Initialize the manager with the supplied delegate
*/
-- (id)initWithDelegate:(id)managerDelegate
+- (id)initWithDelegate:(id)managerDelegate forFilterType:(NSString *)compareType
{
- if ((self = [super initWithWindowNibName:@"QueryFavoriteManager"])) {
+ if ((self = [super initWithWindowNibName:@"ContentFilterManager"])) {
prefs = [NSUserDefaults standardUserDefaults];
- favorites = [[NSMutableArray alloc] init];
+ contentFilters = [[NSMutableArray alloc] init];
if(managerDelegate == nil) {
NSBeep();
- NSLog(@"Query Favorite Manger was called without a delegate.");
+ NSLog(@"ContentFilterManager was called without a delegate.");
return nil;
}
delegatesFileURL = [[managerDelegate valueForKeyPath:@"tableDocumentInstance"] fileURL];
+ filterType = [NSString stringWithString:compareType];
+
}
return self;
@@ -66,7 +67,7 @@
- (void)dealloc
{
- [favorites release];
+ [contentFilters release];
[super dealloc];
}
@@ -76,60 +77,68 @@
- (void)awakeFromNib
{
- [favoriteQueryTextView setAllowsDocumentBackgroundColorChange:YES];
+ [contentFilterTextView setAllowsDocumentBackgroundColorChange:YES];
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary];
[bindingOptions setObject:NSUnarchiveFromDataTransformerName forKey:@"NSValueTransformerName"];
- [favoriteQueryTextView bind:@"backgroundColor"
+ [contentFilterTextView bind:@"backgroundColor"
toObject:[NSUserDefaultsController sharedUserDefaultsController]
withKeyPath:@"values.CustomQueryEditorBackgroundColor"
options:bindingOptions];
- [favorites addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- @"Global", @"name",
+ [contentFilters addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"Global", @"MenuLabel",
@"", @"headerOfFileURL",
- @"", @"query",
+ @"", @"Clause",
+ @"", @"ConjunctionLabel",
nil]];
// Build data source for global queryFavorites (as mutable copy! otherwise each
// change will be stored in the prefs at once)
- if([prefs objectForKey:@"queryFavorites"]) {
- for(id fav in [prefs objectForKey:@"queryFavorites"])
- [favorites addObject:[[fav mutableCopy] autorelease]];
+ if([[prefs objectForKey:@"ContentFilters"] objectForKey:filterType]) {
+ for(id fav in [[prefs objectForKey:@"ContentFilters"] objectForKey:filterType]) {
+ id f = [[fav mutableCopy] autorelease];
+ if([f objectForKey:@"ConjunctionLabels"])
+ [f setObject:[[f objectForKey:@"ConjunctionLabels"] objectAtIndex:0] forKey:@"ConjunctionLabel"];
+ [contentFilters addObject:f];
+ }
}
- [favorites addObject:[NSDictionary dictionaryWithObjectsAndKeys:
- [[[delegatesFileURL absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent], @"name",
+ [contentFilters addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ [[[delegatesFileURL absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent], @"MenuLabel",
[delegatesFileURL absoluteString], @"headerOfFileURL",
- @"", @"query",
+ @"", @"Clause",
nil]];
- if([[SPQueryController sharedQueryController] favoritesForFileURL:delegatesFileURL]) {
- for(id fav in [[SPQueryController sharedQueryController] favoritesForFileURL:delegatesFileURL])
- [favorites addObject:[[fav mutableCopy] autorelease]];
- }
+ // if([[SPQueryController sharedQueryController] favoritesForFileURL:delegatesFileURL]) {
+ // for(id fav in [[SPQueryController sharedQueryController] favoritesForFileURL:delegatesFileURL])
+ // [contentFilters addObject:[[fav mutableCopy] autorelease]];
+ // }
// Select the first query if any
NSUInteger i = 0;
- for(i=0; i < [favorites count]; i++ )
- if(![[favorites objectAtIndex:i] objectForKey:@"headerOfFileURL"])
+ for(i=0; i < [contentFilters count]; i++ )
+ if(![[contentFilters objectAtIndex:i] objectForKey:@"headerOfFileURL"])
break;
- [[self window] makeFirstResponder:favoritesTableView];
+ [[self window] makeFirstResponder:contentFilterTableView];
[self _initWithNoSelection];
// Register drag types
- [favoritesTableView registerForDraggedTypes:[NSArray arrayWithObject:QUERY_FAVORITES_PB_DRAG_TYPE]];
+ [contentFilterTableView registerForDraggedTypes:[NSArray arrayWithObject:CONTENT_FILTER_PB_DRAG_TYPE]];
- [favoritesArrayController setContent:favorites];
- [favoritesTableView reloadData];
+ [contentFilterArrayController setContent:contentFilters];
+ [contentFilterTableView reloadData];
// Set Remove button state
- [removeButton setEnabled:([favoritesTableView numberOfSelectedRows] > 0)];
+ [removeButton setEnabled:([contentFilterTableView numberOfSelectedRows] > 0)];
+
+ // Set column header
+ [[[contentFilterTableView tableColumnWithIdentifier:@"MenuLabel"] headerCell] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ Fields Content Filters", @"content filter for field type ‘%@’"), filterType]];
}
@@ -137,12 +146,12 @@
#pragma mark Accessor methods
/**
- * Returns the query favorites array for fileURL.
- * fileURL == nil → global favorites
+ * Returns the content filters array for fileURL.
+ * fileURL == nil → global content filters
*/
-- (NSMutableArray *)queryFavoritesForFileURL:(NSURL *)fileURL
+- (NSMutableArray *)contentFilterForFileURL:(NSURL *)fileURL
{
- NSMutableArray *favs = [NSMutableArray array];
+ NSMutableArray *filters = [NSMutableArray array];
NSString *fileURLstring;
if(fileURL == nil)
@@ -153,26 +162,43 @@
NSUInteger i = 0;
// Look for the header specified by fileURL
- while(i<[favorites count]) {
- if ([[favorites objectAtIndex:i] objectForKey:@"headerOfFileURL"]
- && [[[favorites objectAtIndex:i] objectForKey:@"headerOfFileURL"] isEqualToString:fileURLstring]) {
+ while(i<[contentFilters count]) {
+ if ([[contentFilters objectAtIndex:i] objectForKey:@"headerOfFileURL"]
+ && [[[contentFilters objectAtIndex:i] objectForKey:@"headerOfFileURL"] isEqualToString:fileURLstring]) {
i++;
break;
}
i++;
}
- // Take all favorites until the next header or end of favorites
- for(i; i<[favorites count]; i++) {
-
- if(![[favorites objectAtIndex:i] objectForKey:@"headerOfFileURL"])
- [favs addObject:[favorites objectAtIndex:i]];
- else
+ // Take all content filters until the next header or end of all content filters
+ NSUInteger numOfArgs;
+ for(i; i<[contentFilters count]; i++) {
+
+ if(![[contentFilters objectAtIndex:i] objectForKey:@"headerOfFileURL"]) {
+ NSMutableDictionary *d = [[NSMutableDictionary alloc] init];
+ [d setDictionary:[contentFilters objectAtIndex:i]];
+ NSMutableArray *conjLabel = [[NSMutableArray alloc] init];
+ numOfArgs = [[[contentFilterTextView string] componentsMatchedByRegex:@"(?<!\\\\)(\\$\\{.*?\\})"] count];
+ if(numOfArgs > 1) {
+ if([d objectForKey:@"ConjunctionLabel"]) {
+ [conjLabel addObject:[d objectForKey:@"ConjunctionLabel"]];
+ [d setObject:conjLabel forKey:@"ConjunctionLabels"];
+ }
+ } else {
+ [d removeObjectForKey:@"ConjunctionLabels"];
+ }
+ [d removeObjectForKey:@"ConjunctionLabel"];
+ [conjLabel release];
+ [d setObject:[NSNumber numberWithInteger:numOfArgs] forKey:@"NumberOfArguments"];
+ [filters addObject:d];
+ [d release];
+ } else
break;
}
- return favs;
+ return filters;
}
/**
@@ -183,88 +209,70 @@
return [[[NSApp mainWindow] delegate] valueForKey:@"customQueryInstance"];
}
+
#pragma mark -
#pragma mark IBAction methods
/**
- * Adds/Inserts a query favorite
+ * Adds/Inserts a content filter
*/
-- (IBAction)addQueryFavorite:(id)sender
+- (IBAction)addContentFilter:(id)sender
{
- NSMutableDictionary *favorite;
+ NSMutableDictionary *filter;
NSUInteger insertIndex;
- // Duplicate a selected favorite if sender == self
+ // Store pending changes in Clause
+ [[self window] makeFirstResponder:contentFilterNameTextField];
+
+ // Duplicate a selected filter if sender == self
if(sender == self)
- favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[[favoriteNameTextField stringValue] stringByAppendingFormat:@" Copy"], [favoriteQueryTextView string], nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]];
- // Add a new favorite
+ filter = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[[contentFilterNameTextField stringValue] stringByAppendingFormat:@" Copy"], [contentFilterTextView string], nil] forKeys:[NSArray arrayWithObjects:@"MenuLabel", @"Clause", nil]];
+ // Add a new filter
else
- favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"New Favorite", @"", nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]];
-
- if([favoritesTableView numberOfSelectedRows] > 0) {
- insertIndex = [[favoritesTableView selectedRowIndexes] lastIndex]+1;
- [favorites insertObject:favorite atIndex:insertIndex];
+ filter = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"New Filter", @"", @"", nil] forKeys:[NSArray arrayWithObjects:@"MenuLabel", @"Clause", @"ConjunctionLabel", nil]];
+
+ if([contentFilterTableView numberOfSelectedRows] > 0) {
+ insertIndex = [[contentFilterTableView selectedRowIndexes] lastIndex]+1;
+ [contentFilters insertObject:filter atIndex:insertIndex];
} else {
- [favorites addObject:favorite];
- insertIndex = [favorites count] - 1;
+ [contentFilters addObject:filter];
+ insertIndex = [contentFilters count] - 1;
}
- [favoritesArrayController rearrangeObjects];
- [favoritesTableView reloadData];
+ [contentFilterArrayController rearrangeObjects];
+ [contentFilterTableView reloadData];
- [favoritesTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:insertIndex] byExtendingSelection:NO];
+ [contentFilterTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:insertIndex] byExtendingSelection:NO];
- [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]];
+ [contentFilterTableView scrollRowToVisible:[contentFilterTableView selectedRow]];
- [removeButton setEnabled:([favoritesTableView numberOfSelectedRows] > 0)];
- [[self window] makeFirstResponder:favoriteNameTextField];
+ [removeButton setEnabled:([contentFilterTableView numberOfSelectedRows] > 0)];
+ [[self window] makeFirstResponder:contentFilterNameTextField];
}
/**
- * Duplicates a query favorite
+ * Duplicates a filter
*/
-- (IBAction)duplicateQueryFavorite:(id)sender
+- (IBAction)duplicateContentFilter:(id)sender
{
- if ([favoritesTableView numberOfSelectedRows] == 1)
- [self addQueryFavorite:self];
+ if ([contentFilterTableView numberOfSelectedRows] == 1)
+ [self addContentFilter:self];
else
NSBeep();
}
/**
- * Removes a query favorite
+ * Removes a filter
*/
-- (IBAction)removeQueryFavorite:(id)sender
+- (IBAction)removeContentFilter:(id)sender
{
- NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected query favorites?", @"remove selected query favorites message")
+ NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected content filters?", @"remove selected content filters message")
defaultButton:NSLocalizedString(@"Cancel", @"cancel button")
alternateButton:NSLocalizedString(@"Remove", @"remove button")
otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to remove all selected query favorites? This action cannot be undone.", @"remove all selected query favorites informative message")];
-
- [alert setAlertStyle:NSCriticalAlertStyle];
-
- NSArray *buttons = [alert buttons];
-
- // Change the alert's cancel button to have the key equivalent of return
- [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"];
- [[buttons objectAtIndex:1] setKeyEquivalent:@""];
-
- [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeSelectedFavorites"];
-}
-
-/**
- * Removes all query favorites
- */
-- (IBAction)removeAllQueryFavorites:(id)sender
-{
- NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove all query favorites?", @"remove all query favorites message")
- defaultButton:NSLocalizedString(@"Cancel", @"cancel button")
- alternateButton:NSLocalizedString(@"Remove All", @"remove all button")
- otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to remove all of your saved query favorites? This action cannot be undone.", @"remove all query favorites informative message")];
+ informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to remove all selected content filters? This action cannot be undone.", @"remove all selected content filters informative message")];
[alert setAlertStyle:NSCriticalAlertStyle];
@@ -274,31 +282,18 @@
[[buttons objectAtIndex:0] setKeyEquivalent:@"\r"];
[[buttons objectAtIndex:1] setKeyEquivalent:@""];
- [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeAllFavorites"];
+ [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeSelectedFilters"];
}
/**
- * Saves the currently selected query favorite to a user specified file.
+ * Insert placeholder - the placeholder string is stored as tooltip
*/
-- (IBAction)saveFavoriteToFile:(id)sender
+- (IBAction)insertPlaceholder:(id)sender
{
- NSSavePanel *panel = [NSSavePanel savePanel];
-
- [panel setRequiredFileType:DEFAULT_QUERY_FAVORITE_FILE_EXTENSION];
-
- [panel setExtensionHidden:NO];
- [panel setAllowsOtherFileTypes:YES];
- [panel setCanSelectHiddenExtension:YES];
- [panel setCanCreateDirectories:YES];
-
- [panel setAccessoryView:[SPEncodingPopupAccessory encodingAccessory:[prefs integerForKey:@"lastSqlFileEncoding"] includeDefaultEntry:NO encodingPopUp:&encodingPopUp]];
-
- [encodingPopUp setEnabled:YES];
-
- [panel beginSheetForDirectory:nil file:[favoriteNameTextField stringValue] modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"saveQuery"];
+ [contentFilterTextView insertText:[[[sender selectedItem] toolTip] substringToIndex:[[[sender selectedItem] toolTip] rangeOfString:@" – "].location]];
}
-- (IBAction)exportFavorites:(id)sender
+- (IBAction)exportContentFilter:(id)sender
{
NSSavePanel *panel = [NSSavePanel savePanel];
@@ -309,10 +304,10 @@
[panel setCanSelectHiddenExtension:YES];
[panel setCanCreateDirectories:YES];
- [panel beginSheetForDirectory:nil file:nil modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"exportFavorites"];
+ [panel beginSheetForDirectory:nil file:nil modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"exportFilter"];
}
-- (IBAction)importFavoritesByAdding:(id)sender
+- (IBAction)importContentFilterByAdding:(id)sender
{
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanSelectHiddenExtension:YES];
@@ -323,7 +318,7 @@
[panel beginSheetForDirectory:nil
file:@""
- types:[NSArray arrayWithObjects:@"spf", @"sql", nil]
+ types:[NSArray arrayWithObjects:@"spf", nil]
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(importPanelDidEnd:returnCode:contextInfo:)
@@ -336,14 +331,14 @@
}
/**
- * Closes the query favorite manager
+ * Closes the content filter manager
*/
-- (IBAction)closeQueryManagerSheet:(id)sender
+- (IBAction)closeContentFilterManagerSheet:(id)sender
{
// First check for ESC if pressed while inline editing
if(![sender tag] && isTableCellEditing) {
- [favoritesTableView abortEditing];
+ [contentFilterTableView abortEditing];
isTableCellEditing = NO;
return;
}
@@ -355,22 +350,24 @@
if([sender tag]) {
// Ensure that last changes will be written back
- // if only one favorite is selected; otherwise unstable state
- if ([favoritesTableView numberOfSelectedRows] == 1) {
- [[self window] makeFirstResponder:favoritesTableView];
+ // if only one filter is selected; otherwise unstable state
+ if ([contentFilterTableView numberOfSelectedRows] == 1) {
+ [[self window] makeFirstResponder:contentFilterTableView];
}
-
- // Update current document's query favorites in the SPQueryController
- [[SPQueryController sharedQueryController] replaceFavoritesByArray:
- [self queryFavoritesForFileURL:delegatesFileURL] forFileURL:delegatesFileURL];
-
+
+ // Update current document's content filters in the SPQueryController
+ // [[SPQueryController sharedQueryController] replaceFavoritesByArray:
+ // [self contentFilterForFileURL:delegatesFileURL] forFileURL:delegatesFileURL];
+ //
// Update global preferences' list
- [prefs setObject:[self queryFavoritesForFileURL:nil] forKey:@"queryFavorites"];
+ id cf = [[prefs objectForKey:@"ContentFilters"] mutableCopy];
+ [cf setObject:[self contentFilterForFileURL:nil] forKey:filterType];
+ [prefs setObject:cf forKey:@"ContentFilters"];
- // Inform all opened documents to update the query favorites list
- for(id doc in [[NSDocumentController sharedDocumentController] documents])
- if([[doc valueForKeyPath:@"customQueryInstance"] respondsToSelector:@selector(queryFavoritesHaveBeenUpdated:)])
- [[doc valueForKeyPath:@"customQueryInstance"] queryFavoritesHaveBeenUpdated:self];
+ // // Inform all opened documents to update the query favorites list
+ // for(id doc in [[NSDocumentController sharedDocumentController] documents])
+ // if([[doc valueForKeyPath:@"customQueryInstance"] respondsToSelector:@selector(queryFavoritesHaveBeenUpdated:)])
+ // [[doc valueForKeyPath:@"customQueryInstance"] queryFavoritesHaveBeenUpdated:self];
}
@@ -400,11 +397,11 @@
#pragma mark TableView datasource methods
/**
- * Returns the number of query favorites.
+ * Returns the number of all content filters.
*/
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
- return [favorites count];
+ return [contentFilters count];
}
/**
@@ -412,49 +409,55 @@
*/
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
- if(![[favorites objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]) return @"";
+ if(![[contentFilters objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]) return @"";
- return [[favorites objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
+ return [[contentFilters objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
}
/*
- * Save favorite names if inline edited (suppress empty names)
+ * Save content filter name (MenuLabel) if inline edited (suppress empty names)
*/
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
- if([[aTableColumn identifier] isEqualToString:@"name"] && [anObject length]) {
- [[favorites objectAtIndex:rowIndex] setObject:[anObject description] forKey:@"name"];
- // [[favorites objectAtIndex:rowIndex] setObject:[favoriteQueryTextView string] forKey:@"query"];
- [favoriteNameTextField setStringValue:[anObject description]];
+ if([[aTableColumn identifier] isEqualToString:@"MenuLabel"] && [anObject length]) {
+ [[contentFilters objectAtIndex:rowIndex] setObject:[anObject description] forKey:@"MenuLabel"];
+ [contentFilterNameTextField setStringValue:[anObject description]];
}
- [favoritesTableView reloadData];
+ [contentFilterTableView reloadData];
}
/*
- * Before selecting an other favorite save pending query string changes
+ * Before selecting an other filter save pending query string changes
* and make sure that no group table item can be selected
*/
- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex
{
- return ([[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? NO : YES;
+ BOOL enable = ([contentFilterTableView numberOfSelectedRows] > 0);
+ [removeButton setEnabled:enable];
+ [numberOfArgsLabel setHidden:!enable];
+ [resultingClauseLabel setHidden:!enable];
+ [resultingClauseContentLabel setHidden:!enable];
+ [insertPlaceholderButton setEnabled:enable];
+
+ return ([[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? NO : YES;
}
/*
- * Set indention levels for headers and favorites
+ * Set indention levels for headers and filters
* (maybe in the future use an image for headers for expanding and collapsing)
*/
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
- if([[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"] && [[aTableColumn identifier] isEqualToString:@"name"]) {
+ if([[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"] && [[aTableColumn identifier] isEqualToString:@"MenuLabel"]) {
// if([[[favoriteProperties objectAtIndex:rowIndex] objectForKey:@"isGroup"] isEqualToString:@"1"])
// [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"NSRightFacingTriangleTemplate"]];
// else
// [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"NSLeftFacingTriangleTemplate"]];
[(ImageAndTextCell*)aCell setIndentationLevel:0];
}
- else if(![[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"] && [[aTableColumn identifier] isEqualToString:@"name"]) {
+ else if(![[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"] && [[aTableColumn identifier] isEqualToString:@"MenuLabel"]) {
// [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"dummy-small"]];
[(ImageAndTextCell*)aCell setIndentationLevel:1];
}
@@ -465,15 +468,15 @@
*/
- (CGFloat)tableView:(NSTableView *)aTableView heightOfRow:(NSInteger)rowIndex
{
- return ([[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? 20 : 18;
+ return ([[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? 20 : 18;
}
/*
- * Only favorite name can be edited inline
+ * Only filter name can be edited inline
*/
- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
- if([[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) {
+ if([[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) {
return NO;
} else {
isTableCellEditing = YES;
@@ -491,11 +494,11 @@
}
/*
- * favoriteProperties holds the data if a table row is a group header or not
+ * contentFilters holds the data if a table row is a group header or not
*/
- (BOOL)tableView:(NSTableView *)aTableView isGroupRow:(NSInteger)rowIndex
{
- return ([[favorites objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? YES : NO;
+ return ([[contentFilters objectAtIndex:rowIndex] objectForKey:@"headerOfFileURL"]) ? YES : NO;
}
/*
* Detect if inline editing was done - then ESC to close the sheet will be activate
@@ -512,18 +515,59 @@
- (void)controlTextDidChange:(NSNotification *)notification
{
- // Do nothing if no favorite is selected
- if([favoritesTableView numberOfSelectedRows] < 1) return;
+ // Do nothing if no filter is selected
+ if([contentFilterTableView numberOfSelectedRows] < 1) return;
id object = [notification object];
- if(object == favoriteNameTextField) {
- [[favorites objectAtIndex:[favoritesTableView selectedRow]] setObject:[favoriteNameTextField stringValue] forKey:@"name"];
- [favoritesTableView reloadData];
+ if(object == contentFilterNameTextField) {
+ [[contentFilters objectAtIndex:[contentFilterTableView selectedRow]] setObject:[contentFilterNameTextField stringValue] forKey:@"MenuLabel"];
+ [contentFilterTableView reloadData];
}
}
+/*
+ * Parse clause and update labels accordingly
+ */
+- (void)textViewDidChangeSelection:(NSNotification *)notification
+{
+ // Do nothing if no filter is selected
+ if([contentFilterTableView numberOfSelectedRows] < 1) return;
+
+ id object = [notification object];
+
+ if(object == contentFilterTextView) {
+ [insertPlaceholderButton setEnabled:([[contentFilterTextView string] length])];
+ [resultingClauseLabel setHidden:(![[contentFilterTextView string] length])];
+ [resultingClauseContentLabel setHidden:(![[contentFilterTextView string] length])];
+ [numberOfArgsLabel setHidden:(![[contentFilterTextView string] length])];
+
+ NSUInteger numOfArgs = [[[contentFilterTextView string] componentsMatchedByRegex:@"(?<!\\\\)(\\$\\{.*?\\})"] count];
+ [numberOfArgsLabel setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Number of arguments: %d", @"Number of arguments: %d"), numOfArgs]];
+
+ [contentFilterConjunctionTextField setHidden:(numOfArgs < 2)];
+ [contentFilterConjunctionLabel setHidden:(numOfArgs < 2)];
+
+ if(numOfArgs > 2) {
+ [resultingClauseLabel setStringValue:NSLocalizedString(@"Error", @"Error")];
+ [resultingClauseContentLabel setStringValue:NSLocalizedString(@"Maximum number of arguments is 2!", @"Maximum number of arguments is 2!")];
+ } else {
+ [resultingClauseLabel setStringValue:@"SELECT * FROM <table> WHERE"];
+ NSMutableString *c = [[NSMutableString alloc] init];
+ [c setString:[contentFilterTextView string]];
+ [c replaceOccurrencesOfRegex:@"(?<!\\\\)\\$BINARY" withString:@"[BINARY]"];
+ [c flushCachedRegexData];
+ [c replaceOccurrencesOfRegex:@"(?<!\\\\)(\\$\\{.*?\\})" withString:@"[arg]"];
+ [c flushCachedRegexData];
+ [c replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:@"<field>"];
+ [c flushCachedRegexData];
+ [resultingClauseContentLabel setStringValue:[NSString stringWithFormat:@"<field> %@", c]];
+ [c release];
+ }
+
+ }
+}
#pragma mark -
#pragma mark Menu validation
@@ -534,22 +578,18 @@
{
// Disable all if only GLOBAL is in the table
- if([favorites count] < 2) return NO;
+ if([contentFilters count] < 2) return NO;
SEL action = [menuItem action];
- if ( (action == @selector(duplicateQueryFavorite:)) ||
- (action == @selector(saveFavoriteToFile:)))
+ if ( (action == @selector(duplicateContentFilter:)))
{
- return ([favoritesTableView numberOfSelectedRows] == 1);
+ return ([contentFilterTableView numberOfSelectedRows] == 1);
}
- else if ( (action == @selector(removeQueryFavorite:)) ||
+ else if ( (action == @selector(removeContentFilter:)) ||
( action == @selector(exportFavorites:)))
{
- return ([favoritesTableView numberOfSelectedRows] > 0);
- }
- else if (action == @selector(removeAllQueryFavorites:)) {
- return ([favorites count] > 0);
+ return ([contentFilterTableView numberOfSelectedRows] > 0);
}
return YES;
@@ -564,30 +604,24 @@
- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard
{
- // Up to now only one row can be dragged
- // if ([rows count] == 1) {
-
- NSArray *pboardTypes = [NSArray arrayWithObject:QUERY_FAVORITES_PB_DRAG_TYPE];
- NSInteger originalRow = [[rows objectAtIndex:0] intValue];
+ NSArray *pboardTypes = [NSArray arrayWithObject:CONTENT_FILTER_PB_DRAG_TYPE];
+ NSInteger originalRow = [[rows objectAtIndex:0] intValue];
- if(originalRow < 1) return NO;
+ if(originalRow < 1) return NO;
- // Do not drag headers
- if([[favorites objectAtIndex:originalRow] objectForKey:@"headerOfFileURL"]) return NO;
+ // Do not drag headers
+ if([[contentFilters objectAtIndex:originalRow] objectForKey:@"headerOfFileURL"]) return NO;
- [pboard declareTypes:pboardTypes owner:nil];
+ [pboard declareTypes:pboardTypes owner:nil];
- NSMutableData *indexdata = [[[NSMutableData alloc] init] autorelease];
- NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:indexdata] autorelease];
- [archiver encodeObject:rows forKey:@"indexdata"];
- [archiver finishEncoding];
- [pboard setData:indexdata forType:QUERY_FAVORITES_PB_DRAG_TYPE];
+ NSMutableData *indexdata = [[[NSMutableData alloc] init] autorelease];
+ NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:indexdata] autorelease];
+ [archiver encodeObject:rows forKey:@"indexdata"];
+ [archiver finishEncoding];
+ [pboard setData:indexdata forType:CONTENT_FILTER_PB_DRAG_TYPE];
- return YES;
-
- // }
+ return YES;
- // return NO;
}
/**
@@ -598,7 +632,7 @@
NSArray *pboardTypes = [[info draggingPasteboard] types];
if (([pboardTypes count] > 1) && (row != -1)) {
- if (([pboardTypes containsObject:QUERY_FAVORITES_PB_DRAG_TYPE]) && (operation == NSTableViewDropAbove)) {
+ if (([pboardTypes containsObject:CONTENT_FILTER_PB_DRAG_TYPE]) && (operation == NSTableViewDropAbove)) {
if (row > 0) {
return NSDragOperationMove;
}
@@ -617,7 +651,7 @@
if(row < 1) return NO;
- NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:QUERY_FAVORITES_PB_DRAG_TYPE]] autorelease];
+ NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:CONTENT_FILTER_PB_DRAG_TYPE]] autorelease];
NSArray *draggedRows = [NSArray arrayWithArray:(NSArray *)[unarchiver decodeObjectForKey:@"indexdata"]];
[unarchiver finishDecoding];
@@ -635,23 +669,23 @@
originalRow += offset;
// For safety reasons
- if(originalRow > [favorites count]-1) originalRow = [favorites count] - 1;
+ if(originalRow > [contentFilters count]-1) originalRow = [contentFilters count] - 1;
- NSMutableDictionary *draggedRow = [NSMutableDictionary dictionaryWithDictionary:[favorites objectAtIndex:originalRow]];
- [favorites removeObjectAtIndex:originalRow];
- [favoritesTableView reloadData];
+ NSMutableDictionary *draggedRow = [NSMutableDictionary dictionaryWithDictionary:[contentFilters objectAtIndex:originalRow]];
+ [contentFilters removeObjectAtIndex:originalRow];
+ [contentFilterTableView reloadData];
- if(destinationRow+i >= [favorites count])
- [favorites addObject:draggedRow];
+ if(destinationRow+i >= [contentFilters count])
+ [contentFilters addObject:draggedRow];
else
- [favorites insertObject:draggedRow atIndex:destinationRow+i];
+ [contentFilters insertObject:draggedRow atIndex:destinationRow+i];
if(originalRow < row) offset--;
}
- [favoritesTableView reloadData];
- [favoritesArrayController rearrangeObjects];
+ [contentFilterTableView reloadData];
+ [contentFilterArrayController rearrangeObjects];
return YES;
}
@@ -670,26 +704,26 @@
// [favorites removeObjects:[queryFavoritesController arrangedObjects]];
// }
// }
- if([contextInfo isEqualToString:@"removeSelectedFavorites"]) {
+ if([contextInfo isEqualToString:@"removeSelectedFilters"]) {
if (returnCode == NSAlertAlternateReturn) {
- NSIndexSet *indexes = [favoritesTableView selectedRowIndexes];
+ NSIndexSet *indexes = [contentFilterTableView selectedRowIndexes];
// get last index
NSUInteger currentIndex = [indexes lastIndex];
while (currentIndex != NSNotFound) {
- [favorites removeObjectAtIndex:currentIndex];
+ [contentFilters removeObjectAtIndex:currentIndex];
// get next index (beginning from the end)
currentIndex = [indexes indexLessThanIndex:currentIndex];
}
- [favoritesArrayController rearrangeObjects];
- [favoritesTableView reloadData];
+ [contentFilterArrayController rearrangeObjects];
+ [contentFilterTableView reloadData];
- // Set focus to favorite list to avoid an unstable state
- [[self window] makeFirstResponder:favoritesTableView];
+ // Set focus to filter list to avoid an unstable state
+ [[self window] makeFirstResponder:contentFilterTableView];
- [removeButton setEnabled:([favoritesTableView numberOfSelectedRows] > 0)];
+ [removeButton setEnabled:([contentFilterTableView numberOfSelectedRows] > 0)];
}
}
}
@@ -727,26 +761,26 @@
return;
}
- if([spf objectForKey:@"queryFavorites"] && [[spf objectForKey:@"queryFavorites"] count]) {
- if([favoritesTableView numberOfSelectedRows] > 0) {
- // Insert imported queries after the last selected favorite
- NSUInteger insertIndex = [[favoritesTableView selectedRowIndexes] lastIndex] + 1;
+ if([[spf objectForKey:@"ContentFilters"] objectForKey:filterType] && [[[spf objectForKey:@"ContentFilters"] objectForKey:filterType] count]) {
+ if([contentFilterTableView numberOfSelectedRows] > 0) {
+ // Insert imported filters after the last selected filter
+ NSUInteger insertIndex = [[contentFilterTableView selectedRowIndexes] lastIndex] + 1;
NSUInteger i;
- for(i=0; i<[[spf objectForKey:@"queryFavorites"] count]; i++) {
- [favorites insertObject:[[spf objectForKey:@"queryFavorites"] objectAtIndex:i] atIndex:insertIndex+i];
+ for(i=0; i<[[[spf objectForKey:@"ContentFilters"] objectForKey:filterType] count]; i++) {
+ [contentFilters insertObject:[[spf objectForKey:@"queryFavorites"] objectAtIndex:i] atIndex:insertIndex+i];
}
} else {
// If no selection add them
- [favorites addObjectsFromArray:[spf objectForKey:@"queryFavorites"]];
+ [contentFilters addObjectsFromArray:[[spf objectForKey:@"ContentFilters"] objectForKey:filterType]];
}
- [favoritesArrayController rearrangeObjects];
- [favoritesTableView reloadData];
+ [contentFilterArrayController rearrangeObjects];
+ [contentFilterTableView reloadData];
} else {
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading data file", @"error while reading data file")]
defaultButton:NSLocalizedString(@"OK", @"OK button")
alternateButton:nil
otherButton:nil
- informativeTextWithFormat:NSLocalizedString(@"No query favorites found.", @"error that no query favorites found")];
+ informativeTextWithFormat:NSLocalizedString(@"No content filters found.", @"error that no content filters found")];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert runModal];
@@ -770,7 +804,7 @@
[prefs setInteger:[[encodingPopUp selectedItem] tag] forKey:@"lastSqlFileEncoding"];
[prefs synchronize];
- [[favoriteQueryTextView string] writeToFile:[panel filename] atomically:YES encoding:[[encodingPopUp selectedItem] tag] error:&error];
+ [[contentFilterTextView string] writeToFile:[panel filename] atomically:YES encoding:[[encodingPopUp selectedItem] tag] error:&error];
if (error) [[NSAlert alertWithError:error] runModal];
}
@@ -778,24 +812,24 @@
else if([contextInfo isEqualToString:@"exportFavorites"]) {
if (returnCode == NSOKButton) {
- // Build a SPF with format = "query favorites"
+ // Build a SPF with format = "content filters"
NSMutableDictionary *spfdata = [NSMutableDictionary dictionary];
- NSMutableArray *favoriteData = [NSMutableArray array];
+ NSMutableArray *filterData = [NSMutableArray array];
[spfdata setObject:[NSNumber numberWithInt:1] forKey:@"version"];
- [spfdata setObject:@"query favorites" forKey:@"format"];
+ [spfdata setObject:@"content filters" forKey:@"format"];
[spfdata setObject:[NSNumber numberWithBool:NO] forKey:@"encrypted"];
- NSIndexSet *indexes = [favoritesTableView selectedRowIndexes];
+ NSIndexSet *indexes = [contentFilterTableView selectedRowIndexes];
// Get selected items and preserve the order
NSUInteger i;
- for (i=1; i<[favorites count]; i++)
+ for (i=1; i<[contentFilters count]; i++)
if([indexes containsIndex:i])
- [favoriteData addObject:[favorites objectAtIndex:i]];
+ [filterData addObject:[contentFilters objectAtIndex:i]];
- [spfdata setObject:favoriteData forKey:@"queryFavorites"];
+ [spfdata setObject:filterData forKey:@"ContentFilter"];
NSString *err = nil;
NSData *plist = [NSPropertyListSerialization dataFromPropertyList:spfdata
@@ -803,7 +837,7 @@
errorDescription:&err];
if(err != nil) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting query favorite data", @"error while converting query favorite data")]
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting content filter data", @"error while converting content filter data")]
defaultButton:NSLocalizedString(@"OK", @"OK button")
alternateButton:nil
otherButton:nil
@@ -824,9 +858,9 @@
- (void)_initWithNoSelection
{
- [favoritesTableView selectRowIndexes:[NSIndexSet indexSet] byExtendingSelection:NO];
- [[favoriteNameTextField cell] setPlaceholderString:SP_NO_SELECTION_PLACEHOLDER_STRING];
- [favoriteNameTextField setStringValue:@""];
- [favoriteQueryTextView setString:@""];
+ [contentFilterTableView selectRowIndexes:[NSIndexSet indexSet] byExtendingSelection:NO];
+ [[contentFilterNameTextField cell] setPlaceholderString:SP_NO_SELECTION_PLACEHOLDER_STRING];
+ [contentFilterNameTextField setStringValue:@""];
+ [contentFilterTextView setString:@""];
}
@end
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 202cfa09..590bf3c9 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -195,6 +195,9 @@
NSMutableDictionary *favorite;
NSUInteger insertIndex;
+ // Store pending changes in Query
+ [[self window] makeFirstResponder:favoriteNameTextField];
+
// Duplicate a selected favorite if sender == self
if(sender == self)
favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[[favoriteNameTextField stringValue] stringByAppendingFormat:@" Copy"], [favoriteQueryTextView string], nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]];
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index 9a0db4fc..1727494a 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -51,6 +51,10 @@
if([NSArrayObjectAtIndex([[self delegate] valueForKeyPath:@"favorites"], row) objectForKey:@"headerOfFileURL"])
return nil;
}
+ if([[[[self delegate] class] description] isEqualToString:@"SPContentFilterManager"]) {
+ if([NSArrayObjectAtIndex([[self delegate] valueForKeyPath:@"contentFilters"], row) objectForKey:@"headerOfFileURL"])
+ return nil;
+ }
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
[[self window] makeFirstResponder:self];
diff --git a/Source/TableContent.h b/Source/TableContent.h
index e2d7237b..6ecc3a8e 100644
--- a/Source/TableContent.h
+++ b/Source/TableContent.h
@@ -69,6 +69,8 @@
NSMutableDictionary *contentFilters;
NSMutableDictionary *numberOfDefaultFilters;
+ NSUInteger lastSelectedContentFilterIndex;
+ id contentFilterManager;
BOOL sortColumnToRestoreIsAsc;
NSString *sortColumnToRestore;
@@ -131,5 +133,6 @@
- (void) clearDetailsToRestore;
- (NSString *)escapeFilterArgument:(NSString *)argument againstClause:(NSString *)clause;
+- (void)openContentFilterManager;
@end
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 8fcf0454..369cfaec 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -45,6 +45,7 @@
#import "SPFieldEditorController.h"
#import "SPTooltip.h"
#import "RegexKitLite.h"
+#import "SPContentFilterManager.h"
@implementation TableContent
@@ -169,7 +170,7 @@
[countText setStringValue:@""];
// Reset sort column
- if (sortCol) [sortCol release], sortCol = nil;
+ if (sortCol) [sortCol release]; sortCol = nil;
isDesc = NO;
// Empty and disable filter options
@@ -585,7 +586,9 @@
NSMutableString *clause = [[NSMutableString alloc] init];
[clause setString:[filter objectForKey:@"Clause"]];
- [clause replaceOccurrencesOfRegex:@"\\$BINARY" withString:(caseSensitive) ? @"BINARY" : @""];
+ [clause replaceOccurrencesOfRegex:@"(?<!\\\\)\\$BINARY" withString:(caseSensitive) ? @"BINARY" : @""];
+ [clause flushCachedRegexData];
+ [clause replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:[[fieldField titleOfSelectedItem] backtickQuotedString]];
[clause flushCachedRegexData];
// Escape % sign
@@ -663,7 +666,6 @@
[arg flushCachedRegexData];
}
if([clause isMatchedByRegex:@"(?i)\\blike\\b.*?%(?!@)"]) {
- NSLog(@"asdas", _cmd);
[arg replaceOccurrencesOfRegex:@"([_%])" withString:@"\\\\$1"];
[arg flushCachedRegexData];
}
@@ -772,7 +774,16 @@
- (IBAction)toggleFilterField:(id)sender
{
- NSDictionary *filter = [[contentFilters objectForKey:compareType] objectAtIndex:[[compareField selectedItem] tag]];
+ // Check if user called "Edit filter…"
+ if([[compareField selectedItem] tag] == [[contentFilters objectForKey:compareType] count]) {
+ [self openContentFilterManager];
+ return;
+ }
+
+ // Remember last selection for "Edit filter…"
+ lastSelectedContentFilterIndex = [[compareField selectedItem] tag];
+
+ NSDictionary *filter = [[contentFilters objectForKey:compareType] objectAtIndex:lastSelectedContentFilterIndex];
if ([[filter objectForKey:@"NumberOfArguments"] intValue] == 2) {
[argumentField setHidden:YES];
@@ -1203,14 +1214,35 @@
if([contentFilters objectForKey:compareType])
for(id filter in [contentFilters objectForKey:compareType]) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:([filter objectForKey:@"MenuLabel"])?[filter objectForKey:@"MenuLabel"]:@"not specified" action:NULL keyEquivalent:@""];
+ // Create the tooltip
if([filter objectForKey:@"Tooltip"])
[item setToolTip:[filter objectForKey:@"Tooltip"]];
+ else {
+ NSMutableString *tip = [[NSMutableString alloc] init];
+ [tip setString:[[filter objectForKey:@"Clause"] stringByReplacingOccurrencesOfRegex:@"(?<!\\\\)(\\$\\{.*?\\})" withString:@"[arg]"]];
+ if([tip isMatchedByRegex:@"(?<!\\\\)\\$BINARY"]) {
+ [tip replaceOccurrencesOfRegex:@"(?<!\\\\)\\$BINARY" withString:@""];
+ [tip appendString:NSLocalizedString(@"\n\nPress ⇧ for binary search (case-sensitive).", @"\n\npress shift for binary search tooltip message")];
+ }
+ [tip flushCachedRegexData];
+ [tip replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:[[fieldField titleOfSelectedItem] backtickQuotedString]];
+ [tip flushCachedRegexData];
+ [item setToolTip:tip];
+ [tip release];
+ }
[item setTag:i];
[menu addItem:item];
[item release];
i++;
}
+ [menu addItem:[NSMenuItem separatorItem]];
+ NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Edit Filter…", @"edit filter") action:NULL keyEquivalent:@""];
+ [item setToolTip:NSLocalizedString(@"Edit user-defined Filter…", @"edit user-defined filter")];
+ [item setTag:i];
+ [menu addItem:item];
+ [item release];
+
// Update the argumentField enabled state
[self toggleFilterField:self];
@@ -1219,6 +1251,26 @@
}
+- (void)openContentFilterManager
+{
+ [compareField selectItemWithTag:lastSelectedContentFilterIndex];
+
+ [SPTooltip showWithObject:@"<h1><font color='#0000FB'>&nbsp;&nbsp;Please be patient. Under constructions. <span style='font-size:50pt'>☺</span>&nbsp;&nbsp;</font></h1>" atLocation:[NSEvent mouseLocation] ofType:@"html"];
+ return;
+
+ // init query favorites controller
+ [prefs synchronize];
+ if(contentFilterManager) [contentFilterManager release];
+ contentFilterManager = [[SPContentFilterManager alloc] initWithDelegate:self forFilterType:compareType];
+
+ // Open query favorite manager
+ [NSApp beginSheet:[contentFilterManager window]
+ modalForWindow:tableWindow
+ modalDelegate:contentFilterManager
+ didEndSelector:nil
+ contextInfo:nil];
+}
+
- (IBAction)stepLimitRows:(id)sender
/*
steps the start row up or down (+/- limitRowsValue)