aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/Console.xib992
-rw-r--r--Interfaces/English.lproj/DBView.xib364
-rw-r--r--Source/SPConsoleMessage.h40
-rw-r--r--Source/SPConsoleMessage.m54
-rw-r--r--Source/SPGrowlController.m38
-rw-r--r--Source/SPQueryConsole.h18
-rw-r--r--Source/SPQueryConsole.m436
-rw-r--r--Source/SPStringAdditions.m66
-rw-r--r--Source/TableContent.h6
-rw-r--r--Source/TableContent.m7
-rw-r--r--Source/TableDocument.h5
-rw-r--r--Source/TableDocument.m43
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj30
13 files changed, 1572 insertions, 527 deletions
diff --git a/Interfaces/English.lproj/Console.xib b/Interfaces/English.lproj/Console.xib
new file mode 100644
index 00000000..8166f443
--- /dev/null
+++ b/Interfaces/English.lproj/Console.xib
@@ -0,0 +1,992 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">1050</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="7"/>
+ <integer value="64"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">SPQueryConsole</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSWindowTemplate" id="209913341">
+ <int key="NSWindowStyleMask">15</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{426, 331}, {575, 203}}</string>
+ <int key="NSWTFlags">611845120</int>
+ <string key="NSWindowTitle">Console</string>
+ <string key="NSWindowClass">NSPanel</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSWindowContentMinSize">{575, 130}</string>
+ <object class="NSView" key="NSWindowView" id="215475093">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="591384017">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{353, 5}, {118, 28}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="95087038">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Save As...</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <reference key="NSControlView" ref="591384017"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="255852348">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{469, 5}, {101, 28}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="507600749">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Clear</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="255852348"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSSearchField" id="139811820">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{10, 174}, {555, 19}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSSearchFieldCell" key="NSCell" id="220914667">
+ <int key="NSCellFlags">343014976</int>
+ <int key="NSCellFlags2">268567552</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString">Filter</string>
+ <reference key="NSControlView" ref="139811820"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <int key="NSTextBezelStyle">1</int>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor" id="746094096">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="22056724">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <object class="NSColor" key="NSColor" id="17197167">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ <object class="NSButtonCell" key="NSSearchButtonCell">
+ <int key="NSCellFlags">130560</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">search</string>
+ <string key="NSAction">_searchFieldSearch:</string>
+ <reference key="NSTarget" ref="220914667"/>
+ <reference key="NSControlView" ref="139811820"/>
+ <int key="NSButtonFlags">138690815</int>
+ <int key="NSButtonFlags2">0</int>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ <object class="NSButtonCell" key="NSCancelButtonCell">
+ <int key="NSCellFlags">130560</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">clear</string>
+ <object class="NSMutableArray" key="NSAccessibilityOverriddenAttributes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>AXDescription</string>
+ <string>NSAccessibilityEncodedAttributesValueType</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>cancel</string>
+ <integer value="1"/>
+ </object>
+ </object>
+ </object>
+ <string key="NSAction">_searchFieldCancel:</string>
+ <reference key="NSTarget" ref="220914667"/>
+ <reference key="NSControlView" ref="139811820"/>
+ <int key="NSButtonFlags">138690815</int>
+ <int key="NSButtonFlags2">0</int>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ <int key="NSMaximumRecents">255</int>
+ </object>
+ </object>
+ <object class="NSScrollView" id="865703622">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSClipView" id="264199078">
+ <reference key="NSNextResponder" ref="865703622"/>
+ <int key="NSvFlags">2304</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableView" id="243353733">
+ <reference key="NSNextResponder" ref="264199078"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{553, 124}</string>
+ <reference key="NSSuperview" ref="264199078"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="_NSCornerView" key="NSCornerView">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{-26, 0}, {16, 17}}</string>
+ </object>
+ <object class="NSMutableArray" key="NSTableColumns">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableColumn" id="424669154">
+ <string key="NSIdentifier">messageDate</string>
+ <double key="NSWidth">1.450000e+02</double>
+ <double key="NSMinWidth">5.000000e+01</double>
+ <double key="NSMaxWidth">1.000000e+03</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628032</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="489725497">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <reference key="NSColor" ref="17197167"/>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="353829655">
+ <int key="NSCellFlags">67239488</int>
+ <int key="NSCellFlags2">133120</int>
+ <string key="NSContents">Text Cell</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="243353733"/>
+ <object class="NSColor" key="NSBackgroundColor" id="357371173">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+ </object>
+ </object>
+ <reference key="NSTextColor" ref="22056724"/>
+ </object>
+ <reference key="NSTableView" ref="243353733"/>
+ </object>
+ <object class="NSTableColumn" id="781897583">
+ <string key="NSIdentifier">message</string>
+ <double key="NSWidth">4.020000e+02</double>
+ <double key="NSMinWidth">1.000000e+01</double>
+ <double key="NSMaxWidth">3.402823e+38</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628032</int>
+ <int key="NSCellFlags2">0</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="746094096"/>
+ </object>
+ <reference key="NSTextColor" ref="489725497"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="973993322">
+ <int key="NSCellFlags">67239488</int>
+ <int key="NSCellFlags2">133120</int>
+ <string key="NSContents">Text Cell</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="243353733"/>
+ <reference key="NSBackgroundColor" ref="357371173"/>
+ <reference key="NSTextColor" ref="22056724"/>
+ </object>
+ <int key="NSResizingMask">1</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <reference key="NSTableView" ref="243353733"/>
+ </object>
+ </object>
+ <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+ <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+ <reference key="NSBackgroundColor" ref="746094096"/>
+ <object class="NSColor" key="NSGridColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">1.300000e+01</double>
+ <int key="NSTvFlags">440401920</int>
+ <int key="NSColumnAutoresizingStyle">4</int>
+ <int key="NSDraggingSourceMaskForLocal">15</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ </object>
+ </object>
+ <string key="NSFrame">{{1, 1}, {553, 124}}</string>
+ <reference key="NSSuperview" ref="865703622"/>
+ <reference key="NSNextKeyView" ref="243353733"/>
+ <reference key="NSDocView" ref="243353733"/>
+ <reference key="NSBGColor" ref="357371173"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="464398489">
+ <reference key="NSNextResponder" ref="865703622"/>
+ <int key="NSvFlags">-2147483392</int>
+ <string key="NSFrame">{{539, 1}, {15, 124}}</string>
+ <reference key="NSSuperview" ref="865703622"/>
+ <reference key="NSTarget" ref="865703622"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">9.920000e-01</double>
+ </object>
+ <object class="NSScroller" id="444118053">
+ <reference key="NSNextResponder" ref="865703622"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{-100, -100}, {238, 15}}</string>
+ <reference key="NSSuperview" ref="865703622"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="865703622"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">5.714286e-01</double>
+ </object>
+ </object>
+ <string key="NSFrame">{{10, 40}, {555, 126}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <reference key="NSNextKeyView" ref="264199078"/>
+ <int key="NSsFlags">530</int>
+ <reference key="NSVScroller" ref="464398489"/>
+ <reference key="NSHScroller" ref="444118053"/>
+ <reference key="NSContentView" ref="264199078"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBcAAAQXAAAA</bytes>
+ </object>
+ <object class="NSButton" id="1024597879">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{7, 11}, {120, 18}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="980749044">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">131072</int>
+ <string key="NSContents">Show time stamps</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="1024597879"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="539077046">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="850144303">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="270576501">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{130, 11}, {192, 18}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="922531493">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">131072</int>
+ <string key="NSContents">Show SELECT/SHOW statements</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="270576501"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="539077046"/>
+ <reference key="NSAlternateImage" ref="850144303"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSProgressIndicator" id="223792049">
+ <reference key="NSNextResponder" ref="215475093"/>
+ <int key="NSvFlags">-2147482335</int>
+ <object class="NSPSMatrix" key="NSDrawMatrix"/>
+ <string key="NSFrame">{{334, 13}, {16, 16}}</string>
+ <reference key="NSSuperview" ref="215475093"/>
+ <int key="NSpiFlags">20746</int>
+ <double key="NSMinValue">1.600000e+01</double>
+ <double key="NSMaxValue">1.000000e+02</double>
+ </object>
+ </object>
+ <string key="NSFrameSize">{575, 203}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMinSize">{575, 152}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSFrameAutosaveName">QueryConsole</string>
+ </object>
+ <object class="NSCustomView" id="841319465">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="296628662">
+ <reference key="NSNextResponder" ref="841319465"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{10, 6}, {150, 18}}</string>
+ <reference key="NSSuperview" ref="841319465"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="640143248">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Include time stamps</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.300000e+01</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="296628662"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="539077046"/>
+ <reference key="NSAlternateImage" ref="850144303"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{170, 30}</string>
+ <string key="NSClassName">NSView</string>
+ </object>
+ <object class="NSMenu" id="1011399888">
+ <string key="NSTitle"/>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="833308614">
+ <reference key="NSMenu" ref="1011399888"/>
+ <string key="NSTitle">Copy</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <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="209913341"/>
+ </object>
+ <int key="connectionID">23</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">clearConsoleButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="255852348"/>
+ </object>
+ <int key="connectionID">24</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">saveConsoleButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="591384017"/>
+ </object>
+ <int key="connectionID">25</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">includeTimeStampsButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1024597879"/>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">consoleSearchField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="139811820"/>
+ </object>
+ <int key="connectionID">27</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">saveLogView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="841319465"/>
+ </object>
+ <int key="connectionID">52</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">clearConsole:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="255852348"/>
+ </object>
+ <int key="connectionID">53</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">saveConsoleAs:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="591384017"/>
+ </object>
+ <int key="connectionID">54</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleShowTimeStamps:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1024597879"/>
+ </object>
+ <int key="connectionID">56</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleShowSelectShowStatements:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="270576501"/>
+ </object>
+ <int key="connectionID">57</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">consoleTableView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="243353733"/>
+ </object>
+ <int key="connectionID">58</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="243353733"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">59</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="243353733"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">60</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="139811820"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">61</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">progressIndicator</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="223792049"/>
+ </object>
+ <int key="connectionID">63</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="243353733"/>
+ <reference key="destination" ref="1011399888"/>
+ </object>
+ <int key="connectionID">68</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copy:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="833308614"/>
+ </object>
+ <int key="connectionID">69</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="1002">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="1002"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="209913341"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="215475093"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">Console</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="215475093"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="270576501"/>
+ <reference ref="1024597879"/>
+ <reference ref="865703622"/>
+ <reference ref="139811820"/>
+ <reference ref="591384017"/>
+ <reference ref="255852348"/>
+ <reference ref="223792049"/>
+ </object>
+ <reference key="parent" ref="209913341"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="270576501"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="922531493"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="1024597879"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="980749044"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7</int>
+ <reference key="object" ref="865703622"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="243353733"/>
+ <reference ref="444118053"/>
+ <reference ref="464398489"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="139811820"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="220914667"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="591384017"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="95087038"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="255852348"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="507600749"/>
+ </object>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="507600749"/>
+ <reference key="parent" ref="255852348"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="95087038"/>
+ <reference key="parent" ref="591384017"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="220914667"/>
+ <reference key="parent" ref="139811820"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="243353733"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="781897583"/>
+ <reference ref="424669154"/>
+ </object>
+ <reference key="parent" ref="865703622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">15</int>
+ <reference key="object" ref="444118053"/>
+ <reference key="parent" ref="865703622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="464398489"/>
+ <reference key="parent" ref="865703622"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">17</int>
+ <reference key="object" ref="781897583"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="973993322"/>
+ </object>
+ <reference key="parent" ref="243353733"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">18</int>
+ <reference key="object" ref="424669154"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="353829655"/>
+ </object>
+ <reference key="parent" ref="243353733"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="353829655"/>
+ <reference key="parent" ref="424669154"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">20</int>
+ <reference key="object" ref="973993322"/>
+ <reference key="parent" ref="781897583"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">21</int>
+ <reference key="object" ref="980749044"/>
+ <reference key="parent" ref="1024597879"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">22</int>
+ <reference key="object" ref="922531493"/>
+ <reference key="parent" ref="270576501"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">49</int>
+ <reference key="object" ref="841319465"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="296628662"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">saveLogView</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">50</int>
+ <reference key="object" ref="296628662"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="640143248"/>
+ </object>
+ <reference key="parent" ref="841319465"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">51</int>
+ <reference key="object" ref="640143248"/>
+ <reference key="parent" ref="296628662"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">62</int>
+ <reference key="object" ref="223792049"/>
+ <reference key="parent" ref="215475093"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">64</int>
+ <reference key="object" ref="1011399888"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="833308614"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">65</int>
+ <reference key="object" ref="833308614"/>
+ <reference key="parent" ref="1011399888"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>10.IBPluginDependency</string>
+ <string>11.IBPluginDependency</string>
+ <string>12.IBPluginDependency</string>
+ <string>13.IBPluginDependency</string>
+ <string>14.IBPluginDependency</string>
+ <string>15.IBPluginDependency</string>
+ <string>16.IBPluginDependency</string>
+ <string>17.IBPluginDependency</string>
+ <string>18.IBPluginDependency</string>
+ <string>19.IBPluginDependency</string>
+ <string>20.IBPluginDependency</string>
+ <string>21.IBPluginDependency</string>
+ <string>22.IBPluginDependency</string>
+ <string>3.IBEditorWindowLastContentRect</string>
+ <string>3.IBWindowTemplateEditedContentRect</string>
+ <string>3.NSWindowTemplate.visibleAtLaunch</string>
+ <string>3.windowTemplate.hasMinSize</string>
+ <string>3.windowTemplate.minSize</string>
+ <string>4.IBPluginDependency</string>
+ <string>49.IBEditorWindowLastContentRect</string>
+ <string>49.IBPluginDependency</string>
+ <string>5.IBPluginDependency</string>
+ <string>50.IBPluginDependency</string>
+ <string>51.IBPluginDependency</string>
+ <string>6.IBPluginDependency</string>
+ <string>62.IBPluginDependency</string>
+ <string>64.IBEditorWindowLastContentRect</string>
+ <string>64.IBPluginDependency</string>
+ <string>65.IBPluginDependency</string>
+ <string>7.IBPluginDependency</string>
+ <string>8.IBPluginDependency</string>
+ <string>9.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{486, 501}, {575, 203}}</string>
+ <string>{{486, 501}, {575, 203}}</string>
+ <boolean value="NO"/>
+ <boolean value="YES"/>
+ <string>{575, 130}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{611, 287}, {170, 30}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{777, 303}, {90, 23}}</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>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">69</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/CMImageView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/CMMCPConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPQueryConsole</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>clearConsole:</string>
+ <string>copy:</string>
+ <string>saveConsoleAs:</string>
+ <string>toggleShowSelectShowStatements:</string>
+ <string>toggleShowTimeStamps:</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>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>clearConsoleButton</string>
+ <string>consoleSearchField</string>
+ <string>consoleTableView</string>
+ <string>includeTimeStampsButton</string>
+ <string>progressIndicator</string>
+ <string>saveConsoleButton</string>
+ <string>saveLogView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSButton</string>
+ <string>NSSearchField</string>
+ <string>NSTableView</string>
+ <string>NSButton</string>
+ <string>NSProgressIndicator</string>
+ <string>NSButton</string>
+ <string>NSView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Source/SPQueryConsole.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index ba8357de..2fc49b28 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -7110,179 +7110,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSMinSize">{300, 222}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
- <object class="NSWindowTemplate" id="105314919">
- <int key="NSWindowStyleMask">15</int>
- <int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{426, 361}, {575, 173}}</string>
- <int key="NSWTFlags">-1535638528</int>
- <string key="NSWindowTitle">Console</string>
- <string key="NSWindowClass">NSPanel</string>
- <nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="NSWindowContentMinSize">{300, 130}</string>
- <object class="NSView" key="NSWindowView" id="792706941">
- <nil key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="1028281149">
- <reference key="NSNextResponder" ref="792706941"/>
- <int key="NSvFlags">274</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="384949545">
- <reference key="NSNextResponder" ref="1028281149"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextView" id="577288167">
- <reference key="NSNextResponder" ref="384949545"/>
- <int key="NSvFlags">2322</int>
- <string key="NSFrameSize">{553, 14}</string>
- <reference key="NSSuperview" ref="384949545"/>
- <object class="NSTextContainer" key="NSTextContainer" id="330836813">
- <object class="NSLayoutManager" key="NSLayoutManager">
- <object class="NSTextStorage" key="NSTextStorage">
- <object class="NSMutableString" key="NSString">
- <characters key="NS.bytes"/>
- </object>
- <nil key="NSDelegate"/>
- </object>
- <object class="NSMutableArray" key="NSTextContainers">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="330836813"/>
- </object>
- <int key="NSLMFlags">6</int>
- <nil key="NSDelegate"/>
- </object>
- <reference key="NSTextView" ref="577288167"/>
- <double key="NSWidth">5.530000e+02</double>
- <int key="NSTCFlags">1</int>
- </object>
- <object class="NSTextViewSharedData" key="NSSharedData">
- <int key="NSFlags">2049</int>
- <reference key="NSBackgroundColor" ref="449903125"/>
- <reference key="NSInsertionColor" ref="304829493"/>
- <object class="NSDictionary" key="NSSelectedAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSBackgroundColor</string>
- <string>NSColor</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="905060551"/>
- <reference ref="63182758"/>
- </object>
- </object>
- <nil key="NSMarkedAttributes"/>
- <object class="NSDictionary" key="NSLinkAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSColor</string>
- <string>NSUnderline</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="114422645"/>
- <reference ref="9"/>
- </object>
- </object>
- <nil key="NSDefaultParagraphStyle"/>
- </object>
- <int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{1108, 1e+07}</string>
- <string key="NSMinize">{223, 0}</string>
- <nil key="NSDelegate"/>
- </object>
- </object>
- <string key="NSFrame">{{1, 1}, {553, 124}}</string>
- <reference key="NSSuperview" ref="1028281149"/>
- <reference key="NSNextKeyView" ref="577288167"/>
- <reference key="NSDocView" ref="577288167"/>
- <reference key="NSBGColor" ref="449903125"/>
- <reference key="NSCursor" ref="32917531"/>
- <int key="NScvFlags">6</int>
- </object>
- <object class="NSScroller" id="853817378">
- <reference key="NSNextResponder" ref="1028281149"/>
- <int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1054, 1}, {15, 230}}</string>
- <reference key="NSSuperview" ref="1028281149"/>
- <reference key="NSTarget" ref="1028281149"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">9.829060e-01</double>
- </object>
- <object class="NSScroller" id="277454734">
- <reference key="NSNextResponder" ref="1028281149"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{-100, -100}, {518, 15}}</string>
- <reference key="NSSuperview" ref="1028281149"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="1028281149"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1.000000e+00</double>
- <double key="NSPercent">9.456522e-01</double>
- </object>
- </object>
- <string key="NSFrame">{{10, 37}, {555, 126}}</string>
- <reference key="NSSuperview" ref="792706941"/>
- <reference key="NSNextKeyView" ref="384949545"/>
- <int key="NSsFlags">530</int>
- <reference key="NSVScroller" ref="853817378"/>
- <reference key="NSHScroller" ref="277454734"/>
- <reference key="NSContentView" ref="384949545"/>
- </object>
- <object class="NSButton" id="938900699">
- <reference key="NSNextResponder" ref="792706941"/>
- <int key="NSvFlags">289</int>
- <string key="NSFrame">{{370, 5}, {101, 28}}</string>
- <reference key="NSSuperview" ref="792706941"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="602747131">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Save As...</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="938900699"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">129</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSButton" id="811773728">
- <reference key="NSNextResponder" ref="792706941"/>
- <int key="NSvFlags">289</int>
- <string key="NSFrame">{{469, 5}, {101, 28}}</string>
- <reference key="NSSuperview" ref="792706941"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="304768838">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Clear</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="811773728"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">129</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- </object>
- <string key="NSFrameSize">{575, 173}</string>
- </object>
- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMinSize">{300, 152}</string>
- <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="NSFrameAutosaveName">QueryConsole</string>
- </object>
<object class="NSCustomView" id="139279766">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -9479,9 +9306,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSCustomObject" id="1006422530">
<string key="NSClassName">SPTableData</string>
</object>
- <object class="NSCustomObject" id="1017299506">
- <string key="NSClassName">SPQueryConsole</string>
- </object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@@ -11476,54 +11300,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">queryConsoleInstance</string>
- <reference key="source" ref="427689665"/>
- <reference key="destination" ref="1017299506"/>
- </object>
- <int key="connectionID">4721</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">queryConsoleInstance</string>
- <reference key="source" ref="392169872"/>
- <reference key="destination" ref="1017299506"/>
- </object>
- <int key="connectionID">4722</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">window</string>
- <reference key="source" ref="1017299506"/>
- <reference key="destination" ref="105314919"/>
- </object>
- <int key="connectionID">4729</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">consoleTextView</string>
- <reference key="source" ref="1017299506"/>
- <reference key="destination" ref="577288167"/>
- </object>
- <int key="connectionID">4734</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">saveConsoleAs:</string>
- <reference key="source" ref="1017299506"/>
- <reference key="destination" ref="938900699"/>
- </object>
- <int key="connectionID">4739</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">clearConsole:</string>
- <reference key="source" ref="1017299506"/>
- <reference key="destination" ref="811773728"/>
- </object>
- <int key="connectionID">4740</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">databaseEncodingButton</string>
<reference key="source" ref="427689665"/>
<reference key="destination" ref="437431578"/>
@@ -14658,87 +14434,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="objectName">SPTableData</string>
</object>
<object class="IBObjectRecord">
- <int key="objectID">4720</int>
- <reference key="object" ref="1017299506"/>
- <reference key="parent" ref="1043842561"/>
- <string key="objectName">SPQueryConsole</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4723</int>
- <reference key="object" ref="105314919"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="792706941"/>
- </object>
- <reference key="parent" ref="1043842561"/>
- <string key="objectName">queryConsole</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4724</int>
- <reference key="object" ref="792706941"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1028281149"/>
- <reference ref="811773728"/>
- <reference ref="938900699"/>
- </object>
- <reference key="parent" ref="105314919"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4730</int>
- <reference key="object" ref="1028281149"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="853817378"/>
- <reference ref="277454734"/>
- <reference ref="577288167"/>
- </object>
- <reference key="parent" ref="792706941"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4731</int>
- <reference key="object" ref="853817378"/>
- <reference key="parent" ref="1028281149"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4732</int>
- <reference key="object" ref="277454734"/>
- <reference key="parent" ref="1028281149"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4733</int>
- <reference key="object" ref="577288167"/>
- <reference key="parent" ref="1028281149"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4735</int>
- <reference key="object" ref="938900699"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="602747131"/>
- </object>
- <reference key="parent" ref="792706941"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4736</int>
- <reference key="object" ref="602747131"/>
- <reference key="parent" ref="938900699"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4737</int>
- <reference key="object" ref="811773728"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="304768838"/>
- </object>
- <reference key="parent" ref="792706941"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">4738</int>
- <reference key="object" ref="304768838"/>
- <reference key="parent" ref="811773728"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">4741</int>
<reference key="object" ref="602251216"/>
<object class="NSMutableArray" key="children">
@@ -17610,21 +17305,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>47.ImportedFromIB2</string>
<string>4700.IBPluginDependency</string>
<string>4702.IBPluginDependency</string>
- <string>4720.IBPluginDependency</string>
- <string>4723.IBEditorWindowLastContentRect</string>
- <string>4723.IBWindowTemplateEditedContentRect</string>
- <string>4723.NSWindowTemplate.visibleAtLaunch</string>
- <string>4723.windowTemplate.hasMinSize</string>
- <string>4723.windowTemplate.minSize</string>
- <string>4724.IBPluginDependency</string>
- <string>4730.IBPluginDependency</string>
- <string>4731.IBPluginDependency</string>
- <string>4732.IBPluginDependency</string>
- <string>4733.IBPluginDependency</string>
- <string>4735.IBPluginDependency</string>
- <string>4736.IBPluginDependency</string>
- <string>4737.IBPluginDependency</string>
- <string>4738.IBPluginDependency</string>
<string>4741.IBPluginDependency</string>
<string>4741.ImportedFromIB2</string>
<string>4742.IBPluginDependency</string>
@@ -19014,21 +18694,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{383, 326}, {575, 173}}</string>
- <string>{{383, 326}, {575, 173}}</string>
- <reference ref="8"/>
- <reference ref="9"/>
- <string>{300, 130}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -19786,31 +19451,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">SPQueryConsole</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearConsole:</string>
- <string>saveConsoleAs:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">consoleTextView</string>
- <string key="NS.object.0">NSTextView</string>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPQueryConsole.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">SPTableData</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
@@ -19920,7 +19560,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>limitRowsStepper</string>
<string>limitRowsText</string>
<string>multipleLineEditingButton</string>
- <string>queryConsoleInstance</string>
<string>removeButton</string>
<string>tableContentView</string>
<string>tableDataInstance</string>
@@ -19949,7 +19588,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
<string>CMCopyTable</string>
<string>id</string>
<string>id</string>
@@ -20067,7 +19705,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>keyChainInstance</string>
<string>passwordField</string>
<string>portField</string>
- <string>queryConsoleInstance</string>
<string>queryProgressBar</string>
<string>sidebarGrabber</string>
<string>socketField</string>
@@ -20116,7 +19753,6 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
<string>NSTabView</string>
<string>id</string>
<string>id</string>
diff --git a/Source/SPConsoleMessage.h b/Source/SPConsoleMessage.h
new file mode 100644
index 00000000..647a50a9
--- /dev/null
+++ b/Source/SPConsoleMessage.h
@@ -0,0 +1,40 @@
+//
+// SPConsoleMessage.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on Mar 12, 2009
+//
+// 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
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import <Cocoa/Cocoa.h>
+
+@interface SPConsoleMessage : NSObject
+{
+ BOOL isError;
+ NSDate *messageDate;
+ NSString *message;
+}
+
+@property (readwrite, assign) BOOL isError;
+@property (readwrite, retain) NSDate *messageDate;
+@property (readwrite, retain) NSString *message;
+
++ (SPConsoleMessage *)consoleMessageWithMessage:(NSString *)consoleMessage date:(NSDate *)date;
+
+- (id)initWithMessage:(NSString *)message date:(NSDate *)date;
+
+@end
diff --git a/Source/SPConsoleMessage.m b/Source/SPConsoleMessage.m
new file mode 100644
index 00000000..7f7273cc
--- /dev/null
+++ b/Source/SPConsoleMessage.m
@@ -0,0 +1,54 @@
+//
+// SPConsoleMessage.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on Mar 12, 2009
+//
+// 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
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPConsoleMessage.h"
+
+@implementation SPConsoleMessage
+
+@synthesize isError;
+@synthesize messageDate;
+@synthesize message;
+
++ (SPConsoleMessage *)consoleMessageWithMessage:(NSString *)message date:(NSDate *)date
+{
+ return [[[SPConsoleMessage alloc] initWithMessage:message date:date] autorelease];
+}
+
+- (id)initWithMessage:(NSString *)consoleMessage date:(NSDate *)date
+{
+ if ((self = [super init])) {
+ [self setMessage:consoleMessage];
+ [self setMessageDate:date];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [message release], message = nil;
+ [messageDate release], messageDate = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/Source/SPGrowlController.m b/Source/SPGrowlController.m
index 3f429067..4583f33e 100644
--- a/Source/SPGrowlController.m
+++ b/Source/SPGrowlController.m
@@ -26,11 +26,9 @@ static SPGrowlController *sharedGrowlController = nil;
@implementation SPGrowlController
-// -------------------------------------------------------------------------------
-// sharedGrowlController
-//
-// Returns the shared Growl controller.
-// -------------------------------------------------------------------------------
+/*
+ * Returns the shared Growl controller.
+ */
+ (SPGrowlController *)sharedGrowlController
{
@synchronized(self) {
@@ -42,9 +40,6 @@ static SPGrowlController *sharedGrowlController = nil;
return sharedGrowlController;
}
-// -------------------------------------------------------------------------------
-// allocWithZone:
-// -------------------------------------------------------------------------------
+ (id)allocWithZone:(NSZone *)zone
{
@synchronized(self) {
@@ -58,9 +53,6 @@ static SPGrowlController *sharedGrowlController = nil;
return nil; // On subsequent allocation attempts return nil
}
-// -------------------------------------------------------------------------------
-// init
-// -------------------------------------------------------------------------------
- (id)init
{
if (self = [super init]) {
@@ -70,10 +62,9 @@ static SPGrowlController *sharedGrowlController = nil;
return self;
}
-// -------------------------------------------------------------------------------
-// The following base protocol methods are implemented to ensure the singleton
-// status of this class.
-// -------------------------------------------------------------------------------
+/*
+ * The following base protocol methods are implemented to ensure the singleton status of this class.
+ */
- (id)copyWithZone:(NSZone *)zone { return self; }
@@ -85,11 +76,9 @@ static SPGrowlController *sharedGrowlController = nil;
- (void)release { }
-// -------------------------------------------------------------------------------
-// notifyWithTitle:description:notificationName:
-//
-// Posts a Growl notification using the supplied details and default values.
-// -------------------------------------------------------------------------------
+/*
+ * Posts a Growl notification using the supplied details and default values.
+ */
- (void)notifyWithTitle:(NSString *)title description:(NSString *)description notificationName:(NSString *)name
{
// Post notification
@@ -102,12 +91,9 @@ static SPGrowlController *sharedGrowlController = nil;
clickContext:nil];
}
-// -------------------------------------------------------------------------------
-// notifyWithTitle:description:notificationName:
-//
-// Posts a Growl notification using the supplied details and effectively ignoring
-// the default values.
-// -------------------------------------------------------------------------------
+/*
+ * Posts a Growl notification using the supplied details and effectively ignoring the default values.
+ */
- (void)notifyWithTitle:(NSString *)title description:(NSString *)description notificationName:(NSString *)name iconData:(NSData *)data priority:(int)priority isSticky:(BOOL)sticky clickContext:(id)clickContext
{
// Post notification
diff --git a/Source/SPQueryConsole.h b/Source/SPQueryConsole.h
index e1072904..65d716d4 100644
--- a/Source/SPQueryConsole.h
+++ b/Source/SPQueryConsole.h
@@ -24,15 +24,27 @@
@interface SPQueryConsole : NSWindowController
{
- IBOutlet NSTextView *consoleTextView;
+ NSFont *consoleFont;
+ NSMutableArray *messages, *messagesActiveSet, *messagesFilterSet, *messagesSubset;
+
+ IBOutlet NSView *saveLogView;
+ IBOutlet NSTableView *consoleTableView;
+ IBOutlet NSSearchField *consoleSearchField;
+ IBOutlet NSProgressIndicator *progressIndicator;
+ IBOutlet NSButton *includeTimeStampsButton, *saveConsoleButton, *clearConsoleButton;
}
+@property (readwrite, retain) NSFont *consoleFont;
+
++ (SPQueryConsole *)sharedQueryConsole;
+
+- (IBAction)copy:(id)sender;
- (IBAction)clearConsole:(id)sender;
- (IBAction)saveConsoleAs:(id)sender;
+- (IBAction)toggleShowTimeStamps:(id)sender;
+- (IBAction)toggleShowSelectShowStatements:(id)sender;
- (void)showMessageInConsole:(NSString *)message;
- (void)showErrorInConsole:(NSString *)error;
-- (NSTextView *)consoleTextView;
-
@end
diff --git a/Source/SPQueryConsole.m b/Source/SPQueryConsole.m
index 4c171de7..ffae7479 100644
--- a/Source/SPQueryConsole.m
+++ b/Source/SPQueryConsole.m
@@ -21,45 +21,156 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPQueryConsole.h"
+#import "SPConsoleMessage.h"
+
+#define MESSAGE_TRUNCATE_CHARACTER_LENGTH 256
+#define MESSAGE_TIME_STAMP_FORMAT @"%H:%M:%S"
#define DEFAULT_CONSOLE_LOG_FILENAME @"untitled"
#define DEFAULT_CONSOLE_LOG_FILE_EXTENSION @"log"
#define CONSOLE_WINDOW_AUTO_SAVE_NAME @"QueryConsole"
+// Table view column identifiers
+#define TABLEVIEW_MESSAGE_COLUMN_IDENTIFIER @"message"
+#define TABLEVIEW_DATE_COLUMN_IDENTIFIER @"messageDate"
+
@interface SPQueryConsole (PrivateAPI)
-- (void)_appendMessageToConsole:(NSString *)message withColor:(NSColor *)color;
+- (NSString *)_getConsoleStringWithTimeStamps:(BOOL)timeStamps;
+
+- (void)_hideSelectShowStatements:(BOOL)show;
+- (void)_filterConsoleUsingSearchString:(NSString *)string;
+- (void)_addMessageToConsole:(NSString *)message isError:(BOOL)error;
@end
+static SPQueryConsole *sharedQueryConsole = nil;
+
@implementation SPQueryConsole
-// -------------------------------------------------------------------------------
-// awakeFromNib
-//
-// Set the window's auto save name.
-// -------------------------------------------------------------------------------
+@synthesize consoleFont;
+
+/*
+ * Returns the shared query console.
+ */
++ (SPQueryConsole *)sharedQueryConsole
+{
+ @synchronized(self) {
+ if (sharedQueryConsole == nil) {
+ [[self alloc] init];
+ }
+ }
+
+ return sharedQueryConsole;
+}
+
++ (id)allocWithZone:(NSZone *)zone
+{
+ @synchronized(self) {
+ if (sharedQueryConsole == nil) {
+ sharedQueryConsole = [super allocWithZone:zone];
+
+ return sharedQueryConsole;
+ }
+ }
+
+ return nil; // On subsequent allocation attempts return nil
+}
+
+- (id)init
+{
+ if ((self = [super initWithWindowNibName:@"Console"])) {
+ messages = [[NSMutableArray alloc] init];
+ messagesSubset = [[NSMutableArray alloc] init];
+ messagesFilterSet = [[NSMutableArray alloc] init];
+
+ // Weak reference
+ messagesActiveSet = messages;
+ messagesFilterSet = messagesActiveSet;
+ }
+
+ return self;
+}
+
+/*
+ * The following base protocol methods are implemented to ensure the singleton status of this class.
+ */
+
+- (id)copyWithZone:(NSZone *)zone { return self; }
+
+- (id)retain { return self; }
+
+- (unsigned)retainCount { return UINT_MAX; }
+
+- (id)autorelease { return self; }
+
+- (void)release { }
+
+/**
+ * Set the window's auto save name.
+ */
- (void)awakeFromNib
{
[self setWindowFrameAutosaveName:CONSOLE_WINDOW_AUTO_SAVE_NAME];
}
-// -------------------------------------------------------------------------------
-// clearConsole:
-//
-// Clears the console by setting its displayed text to an empty string.
-// -------------------------------------------------------------------------------
+/**
+ * Copy implementation for console table view.
+ */
+- (void)copy:(id)sender
+{
+ NSResponder *firstResponder = [[self window] firstResponder];
+
+ if ((firstResponder == consoleTableView) && ([consoleTableView numberOfSelectedRows] > 0)) {
+
+ NSString *string = @"";
+ NSIndexSet *rows = [consoleTableView selectedRowIndexes];
+
+ NSUInteger i = [rows firstIndex];
+
+ while (i != NSNotFound)
+ {
+ if (i < [messagesFilterSet count]) {
+ SPConsoleMessage *message = [messagesFilterSet objectAtIndex:i];
+
+ NSString *consoleMessage = [message message];
+
+ // If the timestamp column is not hidden we need to include them in the copy
+ if (![[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] isHidden]) {
+
+ NSString *dateString = [[message messageDate] descriptionWithCalendarFormat:MESSAGE_TIME_STAMP_FORMAT timeZone:nil locale:nil];
+
+ consoleMessage = [NSString stringWithFormat:@"/* MySQL %@ */ %@", dateString, consoleMessage];
+ }
+
+ string = [string stringByAppendingFormat:@"%@\n", consoleMessage];
+ }
+
+ i = [rows indexGreaterThanIndex:i];
+ }
+
+ NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
+
+ // Copy the string to the pasteboard
+ [pasteBoard declareTypes:[NSArray arrayWithObjects:NSStringPboardType, nil] owner:nil];
+ [pasteBoard setString:string forType:NSStringPboardType];
+ }
+}
+
+/**
+ * Clears the console by removing all of its messages.
+ */
- (IBAction)clearConsole:(id)sender
{
- [consoleTextView setString:@""];
+ [messages removeAllObjects];
+
+ [consoleTableView reloadData];
}
-// -------------------------------------------------------------------------------
-// saveConsoleAs:
-//
-// Presents the user with a save panel to the save the current console to a log file.
-// -------------------------------------------------------------------------------
+/**
+ * Presents the user with a save panel to the save the current console to a log file.
+ */
- (IBAction)saveConsoleAs:(id)sender
{
NSSavePanel *panel = [NSSavePanel savePanel];
@@ -70,6 +181,9 @@
[panel setAllowsOtherFileTypes:YES];
[panel setCanSelectHiddenExtension:YES];
+ [panel setAccessoryView:saveLogView];
+
+ [panel beginSheetForDirectory:nil file:DEFAULT_CONSOLE_LOG_FILENAME modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
[panel beginSheetForDirectory:nil
file:DEFAULT_CONSOLE_LOG_FILENAME
modalForWindow:[self window]
@@ -78,75 +192,273 @@
contextInfo:NULL];
}
-// -------------------------------------------------------------------------------
-// showMessageInConsole:
-//
-// Shows the supplied message in the console.
-// -------------------------------------------------------------------------------
-- (void)showMessageInConsole:(NSString *)message
+/**
+ * Toggles the display of the message time stamp column in the table view.
+ */
+- (IBAction)toggleShowTimeStamps:(id)sender
{
- [self _appendMessageToConsole:message withColor:[NSColor blackColor]];
+ [[consoleTableView tableColumnWithIdentifier:TABLEVIEW_DATE_COLUMN_IDENTIFIER] setHidden:(![sender intValue])];
}
-// -------------------------------------------------------------------------------
-// showErrorInConsole:
-//
-// Shows the supplied error in the console.
-// -------------------------------------------------------------------------------
-- (void)showErrorInConsole:(NSString *)error
+/**
+ * Toggles the hiding of messages containing SELECT and SHOW statements
+ */
+- (IBAction)toggleShowSelectShowStatements:(id)sender
{
- [self _appendMessageToConsole:error withColor:[NSColor redColor]];
+ [self _hideSelectShowStatements:(![sender intValue])];
}
-// -------------------------------------------------------------------------------
-// consoleTextView
-//
-// Return a reference to the console's text view.
-// -------------------------------------------------------------------------------
-- (NSTextView *)consoleTextView
+/**
+ * Shows the supplied message in the console.
+ */
+- (void)showMessageInConsole:(NSString *)message
{
- return consoleTextView;
+ [self _addMessageToConsole:message isError:NO];
}
-// -------------------------------------------------------------------------------
-// savePanelDidEnd:returnCode:contextInfo:
-//
-// Called when the NSSavePanel sheet ends.
-// -------------------------------------------------------------------------------
+/**
+ * Shows the supplied error in the console.
+ */
+- (void)showErrorInConsole:(NSString *)error
+{
+ [self _addMessageToConsole:error isError:YES];
+}
+
+/**
+ * Called when the NSSavePanel sheet ends. Writes the console's current content to the selected file if required.
+ */
- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
if (returnCode == NSOKButton) {
- [[[consoleTextView textStorage] string] writeToFile:[sheet filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
+ [[self _getConsoleStringWithTimeStamps:[includeTimeStampsButton intValue]] writeToFile:[sheet filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL];
}
}
+#pragma mark -
+#pragma mark Tableview delegate methods
+
+/**
+ * Table view delegate method. Returns the number of rows in the table veiw.
+ */
+- (int)numberOfRowsInTableView:(NSTableView *)tableView
+{
+ return [messagesFilterSet count];
+}
+
+/**
+ * Table view delegate method. Returns the specific object for the request column and row.
+ */
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSUInteger)row
+{
+ NSString *returnValue = nil;
+
+ id object = [[messagesFilterSet objectAtIndex:row] valueForKey:[tableColumn identifier]];
+
+ if ([[tableColumn identifier] isEqualToString:TABLEVIEW_DATE_COLUMN_IDENTIFIER]) {
+
+ NSString *dateString = [(NSDate *)object descriptionWithCalendarFormat:MESSAGE_TIME_STAMP_FORMAT timeZone:nil locale:nil];
+
+ returnValue = [NSString stringWithFormat:@"/* MySQL %@ */", dateString];
+ }
+ else {
+ if ([(NSString *)object length] > MESSAGE_TRUNCATE_CHARACTER_LENGTH) {
+ object = [NSString stringWithFormat:@"%@...", [object substringToIndex:MESSAGE_TRUNCATE_CHARACTER_LENGTH]];
+ }
+
+ returnValue = object;
+ }
+
+ NSMutableDictionary *stringAtributes = nil;
+
+ if (consoleFont) {
+ stringAtributes = [NSMutableDictionary dictionaryWithObject:consoleFont forKey:NSFontAttributeName];
+ }
+
+ // If this is an error message give it a red colour
+ if ([(SPConsoleMessage *)[messagesFilterSet objectAtIndex:row] isError]) {
+ if (stringAtributes) {
+ [stringAtributes setObject:[NSColor redColor] forKey:NSForegroundColorAttributeName];
+ }
+ else {
+ stringAtributes = [NSMutableDictionary dictionaryWithObject:[NSColor redColor] forKey:NSForegroundColorAttributeName];
+ }
+ }
+
+ return [[[NSAttributedString alloc] initWithString:returnValue attributes:stringAtributes] autorelease];
+}
+
+#pragma mark -
+#pragma mark Other
+
+/**
+ * Called whenver the test within the search field changes.
+ */
+- (void)controlTextDidChange:(NSNotification *)notification
+{
+ id object = [notification object];
+
+ if ([object isEqualTo:consoleSearchField]) {
+ [self _filterConsoleUsingSearchString:[[object stringValue] lowercaseString]];
+ }
+}
+
+/**
+ * Menu item validation for console table view contextual menu.
+ */
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ BOOL validate = NO;
+
+ if ([menuItem action] == @selector(copy:)) {
+ validate = ([consoleTableView numberOfSelectedRows] > 0);
+ }
+
+ return validate;
+}
+
+/**
+ * Standard dealloc.
+ */
+- (void)dealloc
+{
+ messagesSubset = nil;
+
+ [messages release], messages = nil;
+ [messagesSubset release], messagesSubset = nil;
+ [messagesFilterSet release], messagesFilterSet = nil;
+
+ [super dealloc];
+}
+
@end
@implementation SPQueryConsole (PrivateAPI)
-// -------------------------------------------------------------------------------
-// _appendMessageToConsole:withColor:
-//
-// Appeds the supplied string to the query console, coloring the text using the
-// supplied color.
-// -------------------------------------------------------------------------------
-- (void)_appendMessageToConsole:(NSString *)message withColor:(NSColor *)color
+/**
+ * Creates and returns a string made entirely of all of the console's messages and includes the message
+ * time stamps if specified.
+ */
+- (NSString *)_getConsoleStringWithTimeStamps:(BOOL)timeStamps
{
- int begin, end;
+ NSMutableString *consoleString = [[[NSMutableString alloc] init] autorelease];
- // Set the selected range of the text view to be the very last character
- [consoleTextView setSelectedRange:NSMakeRange([[consoleTextView string] length], 0)];
- begin = [[consoleTextView string] length];
+ for (SPConsoleMessage *message in messagesFilterSet)
+ {
+ if (timeStamps) {
+ NSString *dateString = [[message messageDate] descriptionWithCalendarFormat:MESSAGE_TIME_STAMP_FORMAT timeZone:nil locale:nil];
+
+ [consoleString appendString:[NSString stringWithFormat:@"/* MySQL %@ */ ", dateString]];
+ }
+
+ [consoleString appendString:[NSString stringWithFormat:@"%@\n", [message message]]];
+ }
+
+ return consoleString;
+}
+
+/**
+ * Either hides or shows all SELECT and SHOW statements within the console.
+ */
+- (void)_hideSelectShowStatements:(BOOL)show
+{
+ if (!show) {
+ messagesActiveSet = messages;
+ messagesFilterSet = messagesActiveSet;
+
+ [consoleTableView reloadData];
+
+ return;
+ }
+
+ messagesActiveSet = [messages mutableCopy];
+
+ // Filter out messages that have a prefix of either SELECT or SHOW
+ for (SPConsoleMessage *message in messages)
+ {
+ if ([[message message] hasPrefix:@"SELECT"] || [[message message] hasPrefix:@"SHOW"]) {
+ [messagesActiveSet removeObject:message];
+ }
+ }
+
+ messagesFilterSet = messagesActiveSet;
+
+ [consoleTableView reloadData];
+}
+
+/**
+ * Filters the messages array using the supplued search string.
+ */
+- (void)_filterConsoleUsingSearchString:(NSString *)searchString
+{
+ // Display start progress spinner
+ [progressIndicator setHidden:NO];
+ [progressIndicator startAnimation:self];
- // Apped the message to the current text storage using the text view's current typing attributes
- [[consoleTextView textStorage] appendAttributedString:[[NSAttributedString alloc] initWithString:message attributes:[consoleTextView typingAttributes]]];
- end = [[consoleTextView string] length];
+ // Don't allow clearing the console while filtering its content
+ [saveConsoleButton setEnabled:NO];
+ [clearConsoleButton setEnabled:NO];
- // Color the text we just added
- [consoleTextView setTextColor:color range:NSMakeRange(begin, (end - begin))];
+ [saveConsoleButton setTitle:@"Save View As..."];
+
+ // If there's no search string assign the active messages array back to the message array
+ if ([searchString length] == 0) {
+ [messagesFilterSet removeAllObjects];
+
+ messagesFilterSet = messagesActiveSet;
+
+ [consoleTableView reloadData];
+ [consoleTableView scrollRowToVisible:([messagesFilterSet count] - 1)];
+
+ [saveConsoleButton setEnabled:YES];
+ [clearConsoleButton setEnabled:YES];
+
+ [saveConsoleButton setTitle:@"Save As..."];
+
+ // Display start progress spinner
+ [progressIndicator setHidden:YES];
+ [progressIndicator stopAnimation:self];
+
+ return;
+ }
+
+ // Remove all objects in the subset
+ [messagesSubset removeAllObjects];
+
+ // Filter the messages
+ for (SPConsoleMessage *message in messagesActiveSet)
+ {
+ if ([[message message] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound) {
+ [messagesSubset addObject:message];
+ }
+ }
+
+ messagesFilterSet = messagesSubset;
+
+ [consoleTableView reloadData];
+ [consoleTableView scrollRowToVisible:([messagesFilterSet count] - 1)];
+
+ if ([messagesFilterSet count] > 0) {
+ [saveConsoleButton setEnabled:YES];
+ }
+
+ // Display start progress spinner
+ [progressIndicator setHidden:YES];
+ [progressIndicator stopAnimation:self];
+}
- // Scroll to the text we just added
- [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
+/**
+ * Adds the supplied message to the query console.
+ */
+- (void)_addMessageToConsole:(NSString *)message isError:(BOOL)error
+{
+ SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:[[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByAppendingString:@";"] date:[NSDate date]];
+
+ [consoleMessage setIsError:error];
+
+ [messages addObject:consoleMessage];
+
+ [consoleTableView reloadData];
+ [consoleTableView scrollRowToVisible:([messages count] - 1)];
}
@end
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index a26a878e..74c98b4f 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -24,11 +24,9 @@
@implementation NSString (SPStringAdditions)
-// -------------------------------------------------------------------------------
-// stringForByteSize:
-//
-// Returns a human readable version string of the supplied byte size.
-// -------------------------------------------------------------------------------
+/*
+ * Returns a human readable version string of the supplied byte size.
+ */
+ (NSString *)stringForByteSize:(int)byteSize
{
float size = byteSize;
@@ -139,36 +137,36 @@
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
- // -------------------------------------------------------------------------------
- // componentsSeparatedByCharactersInSet:
- // Credit - Greg Hulands <ghulands@mac.com>
- // Needed for 10.4+ compatibility
- // -------------------------------------------------------------------------------
- - (NSArray *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)set // 10.5 adds this to NSString, but we are 10.4+
- {
- NSMutableArray *result = [NSMutableArray array];
- NSScanner *scanner = [NSScanner scannerWithString:self];
- NSString *chunk = nil;
-
- [scanner setCharactersToBeSkipped:nil];
- BOOL sepFound = [scanner scanCharactersFromSet:set intoString:(NSString **)nil]; // skip any preceding separators
-
- if (sepFound) { // if initial separator, start with empty component
- [result addObject:@""];
- }
-
- while ([scanner scanUpToCharactersFromSet:set intoString:&chunk]) {
- [result addObject:chunk];
- sepFound = [scanner scanCharactersFromSet: set intoString: (NSString **) nil];
- }
-
- if (sepFound) { // if final separator, end with empty component
- [result addObject: @""];
- }
-
- result = [result copy];
- return [result autorelease];
+/*
+ * componentsSeparatedByCharactersInSet:
+ * Credit - Greg Hulands <ghulands@mac.com>
+ * Needed for 10.4+ compatibility
+ */
+- (NSArray *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)set // 10.5 adds this to NSString, but we are 10.4+
+{
+ NSMutableArray *result = [NSMutableArray array];
+ NSScanner *scanner = [NSScanner scannerWithString:self];
+ NSString *chunk = nil;
+
+ [scanner setCharactersToBeSkipped:nil];
+ BOOL sepFound = [scanner scanCharactersFromSet:set intoString:(NSString **)nil]; // skip any preceding separators
+
+ if (sepFound) { // if initial separator, start with empty component
+ [result addObject:@""];
+ }
+
+ while ([scanner scanUpToCharactersFromSet:set intoString:&chunk]) {
+ [result addObject:chunk];
+ sepFound = [scanner scanCharactersFromSet: set intoString: (NSString **) nil];
}
+
+ if (sepFound) { // if final separator, end with empty component
+ [result addObject: @""];
+ }
+
+ result = [result copy];
+ return [result autorelease];
+}
#endif
@end
diff --git a/Source/TableContent.h b/Source/TableContent.h
index f18659a0..644a6b86 100644
--- a/Source/TableContent.h
+++ b/Source/TableContent.h
@@ -25,16 +25,14 @@
#import <Cocoa/Cocoa.h>
#import <MCPKit_bundled/MCPKit_bundled.h>
-#import "CMCopyTable.h"
-#import "CMMCPConnection.h"
-#import "CMMCPResult.h"
+
+@class CMMCPConnection, CMMCPResult, CMCopyTable;
@interface TableContent : NSObject
{
IBOutlet id tableDocumentInstance;
IBOutlet id tablesListInstance;
IBOutlet id tableDataInstance;
- IBOutlet id queryConsoleInstance;
IBOutlet id tableWindow;
IBOutlet CMCopyTable *tableContentView;
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 134e5234..0a474998 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -27,6 +27,9 @@
#import "TableDocument.h"
#import "TablesList.h"
#import "CMImageView.h"
+#import "CMCopyTable.h"
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
#import "SPDataCellFormatter.h"
#import "SPTableData.h"
#import "SPQueryConsole.h"
@@ -47,7 +50,7 @@
sortField = nil;
areShowingAllRows = false;
currentlyEditingRow = -1;
-
+
return self;
}
@@ -1264,7 +1267,7 @@
isEditingRow = NO;
isEditingNewRow = NO;
currentlyEditingRow = -1;
- [queryConsoleInstance showErrorInConsole:[NSString stringWithFormat:NSLocalizedString(@"/* WARNING %@ No rows have been affected */\n", @"warning shown in the console when no rows have been affected after writing to the db"), currentTime]];
+ [[SPQueryConsole sharedQueryConsole] showErrorInConsole:[NSString stringWithFormat:NSLocalizedString(@"/* WARNING %@ No rows have been affected */\n", @"warning shown in the console when no rows have been affected after writing to the db"), currentTime]];
return YES;
// On success...
diff --git a/Source/TableDocument.h b/Source/TableDocument.h
index 7227f0dd..c2d37910 100644
--- a/Source/TableDocument.h
+++ b/Source/TableDocument.h
@@ -25,8 +25,8 @@
#import <Cocoa/Cocoa.h>
#import <MCPKit_bundled/MCPKit_bundled.h>
-#import "CMMCPConnection.h"
-#import "CMMCPResult.h"
+
+@class CMMCPConnection, CMMCPResult;
/**
* The TableDocument class controls the primary database view window.
@@ -42,7 +42,6 @@
IBOutlet id tableDumpInstance;
IBOutlet id tableDataInstance;
IBOutlet id tableStatusInstance;
- IBOutlet id queryConsoleInstance;
IBOutlet id tableWindow;
IBOutlet id connectSheet;
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 2bb95ef4..0be640ec 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -37,6 +37,9 @@
#import "SPSQLParser.h"
#import "SPTableData.h"
#import "SPStringAdditions.h"
+#import "SPQueryConsole.h"
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocumentFavoritesControllerSelectionIndexDidChange";
NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFavoritesControllerFavoritesDidChange";
@@ -51,7 +54,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
_encoding = [@"utf8" retain];
chooseDatabaseButton = nil;
chooseDatabaseToolbarItem = nil;
-
+
return self;
}
@@ -600,7 +603,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
*/
- (void)toggleConsole:(id)sender
{
- [[queryConsoleInstance window] setIsVisible:![[queryConsoleInstance window] isVisible]];
+ [[[SPQueryConsole sharedQueryConsole] window] setIsVisible:![[[SPQueryConsole sharedQueryConsole] window] isVisible]];
}
#pragma mark Encoding Methods
@@ -1301,7 +1304,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
//set up tooltip and image
[toolbarItem setToolTip:NSLocalizedString(@"Show or hide the console which shows all MySQL commands performed by Sequel Pro", @"tooltip for toolbar item for show/hide console")];
- if ([[queryConsoleInstance window] isVisible]) {
+ if ([[[SPQueryConsole sharedQueryConsole] window] isVisible]) {
[toolbarItem setLabel:NSLocalizedString(@"Hide Console", @"toolbar item for hide console")];
[toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]];
} else {
@@ -1321,7 +1324,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[toolbarItem setToolTip:NSLocalizedString(@"Clear the console which shows all MySQL commands performed by Sequel Pro", @"tooltip for toolbar item for clear console")];
[toolbarItem setImage:[NSImage imageNamed:@"clearconsole"]];
//set up the target action
- [toolbarItem setTarget:queryConsoleInstance];
+ [toolbarItem setTarget:[SPQueryConsole sharedQueryConsole]];
[toolbarItem setAction:@selector(clearConsole:)];
} else if ([itemIdentifier isEqualToString:@"SwitchToTableStructureToolbarItemIdentifier"]) {
@@ -1425,7 +1428,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem;
{
if ([[toolbarItem itemIdentifier] isEqualToString:@"ToggleConsoleIdentifier"]) {
- if ([[queryConsoleInstance window] isVisible]) {
+ if ([[[SPQueryConsole sharedQueryConsole] window] isVisible]) {
[toolbarItem setLabel:@"Hide Console"];
[toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]];
} else {
@@ -1447,11 +1450,11 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
return @"DBView";
}
-- (void)windowControllerDidLoadNib:(NSWindowController *) aController
-/*
- code that need to be executed once the windowController has loaded the document's window
- sets upt the interface (small fonts)
+/**
+ * Code that need to be executed once the windowController has loaded the document's window
+ * sets upt the interface (small fonts).
*/
+- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[aController setShouldCascadeWindows:YES];
[super windowControllerDidLoadNib:aController];
@@ -1459,8 +1462,6 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
NSEnumerator *theCols = [[variablesTableView tableColumns] objectEnumerator];
NSTableColumn *theCol;
- // [tableWindow makeKeyAndOrderFront:self];
-
prefs = [[NSUserDefaults standardUserDefaults] retain];
//register for notifications
@@ -1473,14 +1474,14 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
//set up interface
if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
- [[queryConsoleInstance consoleTextView] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [[SPQueryConsole sharedQueryConsole] setConsoleFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
[syntaxViewContent setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
while ( (theCol = [theCols nextObject]) ) {
[[theCol dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
}
} else {
- [[queryConsoleInstance consoleTextView] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[SPQueryConsole sharedQueryConsole] setConsoleFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[syntaxViewContent setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
while ( (theCol = [theCols nextObject]) ) {
[[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
@@ -1503,11 +1504,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
[self setPrintInfo:[NSPrintInfo sharedPrintInfo]];
if ([mySQLConnection isConnected]) [self closeConnection];
- if ([[queryConsoleInstance window] isVisible]) [self toggleConsole:self];
+ if ([[[SPQueryConsole sharedQueryConsole] window] isVisible]) [self toggleConsole:self];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
-
//NSWindow delegate methods
- (BOOL)windowShouldClose:(id)sender
/*
@@ -1527,22 +1527,19 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
* Invoked when framework will perform a query
*/
- (void)willQueryString:(NSString *)query
-{
- NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil];
-
- [queryConsoleInstance showMessageInConsole:[NSString stringWithFormat:@"/* MySQL %@ */ %@;\n", currentTime, query]];
+{
+ [[SPQueryConsole sharedQueryConsole] showMessageInConsole:query];
}
/**
* Invoked when query gave an error
*/
- (void)queryGaveError:(NSString *)error
-{
- NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil];
-
- [queryConsoleInstance showErrorInConsole:[NSString stringWithFormat:@"/* ERROR %@ */ %@;\n", currentTime, error]];
+{
+ [[SPQueryConsole sharedQueryConsole] showErrorInConsole:error];
}
+#pragma mark -
#pragma mark Connection sheet delegate methods
/**
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index f96f5ed3..dea5f61d 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -8,8 +8,11 @@
/* Begin PBXBuildFile section */
170088CE0F5870E200DD6B51 /* SPQueryConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 170088CD0F5870E200DD6B51 /* SPQueryConsole.m */; };
+ 172A65110F7BED7A001E861A /* SPConsoleMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 172A65100F7BED7A001E861A /* SPConsoleMessage.m */; };
+ 172A65140F7BED8B001E861A /* Console.xib in Resources */ = {isa = PBXBuildFile; fileRef = 172A65120F7BED8B001E861A /* Console.xib */; };
1761FD480EF03A6F00331368 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1761FD460EF03A6F00331368 /* MainMenu.xib */; };
1789343C0F30C1DD0097539A /* SPStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 1789343B0F30C1DD0097539A /* SPStringAdditions.m */; };
+ 179F15060F7C433C00579954 /* SPEditorTokens.l in Sources */ = {isa = PBXBuildFile; fileRef = 179F15050F7C433C00579954 /* SPEditorTokens.l */; };
17E641460EF01EB5001BC333 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E641440EF01EB5001BC333 /* main.m */; };
17E641560EF01EF6001BC333 /* CustomQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E641490EF01EF6001BC333 /* CustomQuery.m */; };
17E641570EF01EF6001BC333 /* MainController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E6414B0EF01EF6001BC333 /* MainController.m */; };
@@ -54,7 +57,6 @@
17E6423B0EF0216C001BC333 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 17E642390EF0216C001BC333 /* Credits.rtf */; };
17E6423E0EF0218B001BC333 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 17E6423C0EF0218B001BC333 /* InfoPlist.strings */; };
344819020F793DB500624B14 /* SPArrayAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 344819010F793DB500624B14 /* SPArrayAdditions.m */; };
- 34ED5F750F6E7420007E51BD /* SPEditorTokens.l in Sources */ = {isa = PBXBuildFile; fileRef = 34ED5F740F6E7420007E51BD /* SPEditorTokens.l */; };
4DECC3350EC2A170008D359E /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DECC3320EC2A170008D359E /* Sparkle.framework */; };
4DECC3360EC2A170008D359E /* MCPKit_bundled.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DECC3330EC2A170008D359E /* MCPKit_bundled.framework */; };
4DECC3370EC2A170008D359E /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DECC3340EC2A170008D359E /* Growl.framework */; };
@@ -125,11 +127,16 @@
1703EF3E0F0B0742005BBE7E /* sequel-pro_logo.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "sequel-pro_logo.jpg"; sourceTree = "<group>"; };
1703EF3F0F0B0742005BBE7E /* syntax.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = syntax.html; sourceTree = "<group>"; };
1703EF400F0B0742005BBE7E /* tables.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = tables.html; sourceTree = "<group>"; };
+ 172A650F0F7BED7A001E861A /* SPConsoleMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPConsoleMessage.h; sourceTree = "<group>"; };
+ 172A65100F7BED7A001E861A /* SPConsoleMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPConsoleMessage.m; sourceTree = "<group>"; };
+ 172A65130F7BED8B001E861A /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Console.xib; sourceTree = "<group>"; };
1761FD470EF03A6F00331368 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
1761FD9D0EF0488900331368 /* build-version.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "build-version.pl"; sourceTree = "<group>"; };
1789343A0F30C1DD0097539A /* SPStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPStringAdditions.h; sourceTree = "<group>"; };
1789343B0F30C1DD0097539A /* SPStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPStringAdditions.m; sourceTree = "<group>"; };
178934980F30CDA10097539A /* trim-application.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "trim-application.sh"; sourceTree = "<group>"; };
+ 179F15040F7C433C00579954 /* SPEditorTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPEditorTokens.h; sourceTree = "<group>"; };
+ 179F15050F7C433C00579954 /* SPEditorTokens.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = SPEditorTokens.l; sourceTree = "<group>"; };
17E641440EF01EB5001BC333 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
17E641450EF01EB5001BC333 /* sequel-pro_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "sequel-pro_Prefix.pch"; sourceTree = "<group>"; };
17E641480EF01EF6001BC333 /* CustomQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomQuery.h; sourceTree = "<group>"; };
@@ -198,8 +205,6 @@
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
344819000F793DB500624B14 /* SPArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPArrayAdditions.h; sourceTree = "<group>"; };
344819010F793DB500624B14 /* SPArrayAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPArrayAdditions.m; sourceTree = "<group>"; };
- 34ED5F730F6E7420007E51BD /* SPEditorTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPEditorTokens.h; sourceTree = "<group>"; };
- 34ED5F740F6E7420007E51BD /* SPEditorTokens.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = SPEditorTokens.l; sourceTree = "<group>"; };
4DECC3320EC2A170008D359E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = "<group>"; };
4DECC3330EC2A170008D359E /* MCPKit_bundled.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MCPKit_bundled.framework; path = Frameworks/MCPKit_bundled.framework; sourceTree = "<group>"; };
4DECC3340EC2A170008D359E /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = Frameworks/Growl.framework; sourceTree = "<group>"; };
@@ -379,6 +384,8 @@
17E641610EF01F15001BC333 /* TablesList.m */,
17E641620EF01F15001BC333 /* TableStatus.h */,
17E641630EF01F15001BC333 /* TableStatus.m */,
+ 172A650F0F7BED7A001E861A /* SPConsoleMessage.h */,
+ 172A65100F7BED7A001E861A /* SPConsoleMessage.m */,
);
name = Model;
sourceTree = "<group>";
@@ -495,6 +502,7 @@
isa = PBXGroup;
children = (
17E642060EF020CB001BC333 /* DBView.xib */,
+ 172A65120F7BED8B001E861A /* Console.xib */,
1761FD460EF03A6F00331368 /* MainMenu.xib */,
58186D1F0F4CB38900851FE9 /* ConnectionErrorDialog.xib */,
B5FE36EB0F71E3A90021BC10 /* ConnectionView.xib */,
@@ -535,10 +543,10 @@
58FEF15E0F23D60A00518E8E /* Parsing */ = {
isa = PBXGroup;
children = (
- 34ED5F730F6E7420007E51BD /* SPEditorTokens.h */,
- 34ED5F740F6E7420007E51BD /* SPEditorTokens.l */,
58FEF16B0F23D66600518E8E /* SPSQLParser.h */,
58FEF16C0F23D66600518E8E /* SPSQLParser.m */,
+ 179F15040F7C433C00579954 /* SPEditorTokens.h */,
+ 179F15050F7C433C00579954 /* SPEditorTokens.l */,
);
name = Parsing;
sourceTree = "<group>";
@@ -629,6 +637,7 @@
B5A601E30F74DE7F00EE5FBA /* button_edit_mode.tiff in Resources */,
58CB20ED0F79A75D005EA204 /* button_edit_mode_selected.tiff in Resources */,
5885940F0F7AEE6000ED0E67 /* sparkle-public-key.pem in Resources */,
+ 172A65140F7BED8B001E861A /* Console.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -681,14 +690,23 @@
58FEF57E0F3B4E9700518E8E /* SPTableData.m in Sources */,
58C56EF50F438E120035701E /* SPDataCellFormatter.m in Sources */,
170088CE0F5870E200DD6B51 /* SPQueryConsole.m in Sources */,
- 34ED5F750F6E7420007E51BD /* SPEditorTokens.l in Sources */,
344819020F793DB500624B14 /* SPArrayAdditions.m in Sources */,
+ 172A65110F7BED7A001E861A /* SPConsoleMessage.m in Sources */,
+ 179F15060F7C433C00579954 /* SPEditorTokens.l in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
+ 172A65120F7BED8B001E861A /* Console.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 172A65130F7BED8B001E861A /* English */,
+ );
+ name = Console.xib;
+ sourceTree = "<group>";
+ };
1761FD460EF03A6F00331368 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (