aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/Preferences.xib351
-rw-r--r--Resources/PreferenceDefaults.plist2
-rw-r--r--Source/CMTextView.m88
-rw-r--r--Source/CustomQuery.m44
-rw-r--r--Source/SPConstants.h1
-rw-r--r--Source/SPConstants.m1
-rw-r--r--Source/SPPreferenceController.h4
-rw-r--r--Source/SPPreferenceController.m38
-rw-r--r--Source/SPTableView.m11
-rw-r--r--Source/TableContent.m20
-rw-r--r--Source/TableDocument.m8
11 files changed, 448 insertions, 120 deletions
diff --git a/Interfaces/English.lproj/Preferences.xib b/Interfaces/English.lproj/Preferences.xib
index c4f0892d..b9f04f4f 100644
--- a/Interfaces/English.lproj/Preferences.xib
+++ b/Interfaces/English.lproj/Preferences.xib
@@ -46,7 +46,7 @@
<string key="NSWindowTitle">Preferences</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{500, 0}</string>
<object class="NSView" key="NSWindowView" id="1006">
<nil key="NSNextResponder"/>
@@ -55,10 +55,10 @@
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{500, 22}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSCustomView" id="594324362">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -67,6 +67,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 121}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="562129977">
<int key="NSCellFlags">-2076049856</int>
@@ -404,6 +405,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{152, 214}, {209, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="964808674">
<int key="NSCellFlags">67239424</int>
@@ -431,6 +433,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{40, 242}, {108, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="996600667">
<int key="NSCellFlags">68288064</int>
@@ -444,7 +447,7 @@
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor" id="432854223">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="1035618107">
@@ -463,6 +466,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 236}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="406329678">
<int key="NSCellFlags">-2076049856</int>
@@ -495,6 +499,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{33, 85}, {116, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="513222356">
<int key="NSCellFlags">68288064</int>
@@ -511,6 +516,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{33, 127}, {116, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="163779676">
<int key="NSCellFlags">68288064</int>
@@ -527,6 +533,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{152, 84}, {166, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="530413242">
<int key="NSCellFlags">67239424</int>
@@ -549,6 +556,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{152, 62}, {181, 18}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="218042555">
<int key="NSCellFlags">67239424</int>
@@ -571,6 +579,7 @@
<int key="NSvFlags">12</int>
<string key="NSFrame">{{154, 156}, {326, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -601,6 +610,7 @@
<int key="NSvFlags">12</int>
<string key="NSFrame">{{154, 108}, {326, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -623,6 +633,7 @@
<int key="NSvFlags">12</int>
<string key="NSFrame">{{154, 53}, {326, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -645,6 +656,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{42, 23}, {106, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="899935643">
<int key="NSCellFlags">68288064</int>
@@ -661,6 +673,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{153, 20}, {38, 22}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="875775803">
<int key="NSCellFlags">-1804468671</int>
@@ -737,6 +750,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{197, 23}, {162, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="710086132">
<int key="NSCellFlags">68288064</int>
@@ -753,6 +767,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 169}, {254, 26}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="404009397">
<int key="NSCellFlags">-2076049856</int>
@@ -866,6 +881,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{61, 175}, {88, 17}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="840580273">
<int key="NSCellFlags">68288064</int>
@@ -882,6 +898,7 @@
<int key="NSvFlags">12</int>
<string key="NSFrame">{{154, 204}, {326, 5}}</string>
<reference key="NSSuperview" ref="594324362"/>
+ <reference key="NSWindow"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
@@ -901,6 +918,8 @@
</object>
</object>
<string key="NSFrameSize">{500, 280}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="395894064">
@@ -908,10 +927,51 @@
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="401684657">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{395, 12}, {90, 32}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="828765183">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Select…</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSControlView" ref="401684657"/>
+ <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="NSTextField" id="416182097">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{163, 20}, {221, 19}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="82174450">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">4327424</int>
+ <string key="NSContents"/>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <reference key="NSControlView" ref="416182097"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <reference key="NSBackgroundColor" ref="1001357688"/>
+ <reference key="NSTextColor" ref="6928728"/>
+ </object>
+ </object>
<object class="NSPopUpButton" id="67060802">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{160, 16}, {322, 26}}</string>
+ <string key="NSFrame">{{162, 56}, {320, 26}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="323591102">
@@ -977,10 +1037,26 @@
<int key="NSArrowPosition">2</int>
</object>
</object>
+ <object class="NSTextField" id="418062206">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{16, 22}, {140, 17}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="578929076">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">Table font:</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSControlView" ref="418062206"/>
+ <reference key="NSBackgroundColor" ref="700609571"/>
+ <reference key="NSTextColor" ref="1035618107"/>
+ </object>
+ </object>
<object class="NSTextField" id="743152467">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 22}, {140, 17}}</string>
+ <string key="NSFrame">{{17, 62}, {140, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="449580049">
@@ -996,7 +1072,7 @@
<object class="NSBox" id="169616697">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 46}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 86}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1018,7 +1094,7 @@
<object class="NSButton" id="282702408">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 198}, {123, 18}}</string>
+ <string key="NSFrame">{{161, 238}, {123, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="7693853">
@@ -1040,7 +1116,7 @@
<object class="NSTextField" id="302141262">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{32, 237}, {125, 17}}</string>
+ <string key="NSFrame">{{32, 277}, {125, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="524603578">
@@ -1056,7 +1132,7 @@
<object class="NSTextField" id="265036898">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{383, 104}, {38, 17}}</string>
+ <string key="NSFrame">{{383, 144}, {38, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="596167553">
@@ -1072,7 +1148,7 @@
<object class="NSButton" id="625748362">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 238}, {106, 18}}</string>
+ <string key="NSFrame">{{161, 278}, {106, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="29938940">
@@ -1094,7 +1170,7 @@
<object class="NSButton" id="728219401">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 103}, {115, 18}}</string>
+ <string key="NSFrame">{{161, 143}, {115, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="920748663">
@@ -1116,7 +1192,7 @@
<object class="NSButton" id="563352266">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 218}, {105, 18}}</string>
+ <string key="NSFrame">{{161, 258}, {105, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="516443326">
@@ -1138,7 +1214,7 @@
<object class="NSStepper" id="813674245">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{362, 98}, {19, 27}}</string>
+ <string key="NSFrame">{{362, 138}, {19, 27}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSStepperCell" key="NSCell" id="1061407286">
@@ -1156,7 +1232,7 @@
<object class="NSTextField" id="479121914">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{282, 101}, {75, 22}}</string>
+ <string key="NSFrame">{{282, 141}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="585678618">
@@ -1226,7 +1302,7 @@
<object class="NSTextField" id="618764971">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 59}, {140, 17}}</string>
+ <string key="NSFrame">{{17, 99}, {140, 17}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="609090823">
@@ -1242,7 +1318,7 @@
<object class="NSTextField" id="423928419">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{163, 57}, {75, 22}}</string>
+ <string key="NSFrame">{{163, 97}, {75, 22}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="82744709">
@@ -1260,7 +1336,7 @@
<object class="NSButton" id="41303511">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 158}, {297, 18}}</string>
+ <string key="NSFrame">{{161, 198}, {297, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="441275">
@@ -1279,10 +1355,32 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
+ <object class="NSBox" id="238389133">
+ <reference key="NSNextResponder" ref="395894064"/>
+ <int key="NSvFlags">12</int>
+ <string key="NSFrame">{{163, 45}, {316, 5}}</string>
+ <reference key="NSSuperview" ref="395894064"/>
+ <string key="NSOffsets">{0, 0}</string>
+ <object class="NSTextFieldCell" key="NSTitleCell">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Box</string>
+ <reference key="NSSupport" ref="320262838"/>
+ <reference key="NSBackgroundColor" ref="1001357688"/>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
+ </object>
+ </object>
+ <int key="NSBorderType">3</int>
+ <int key="NSBoxType">2</int>
+ <int key="NSTitlePosition">0</int>
+ <bool key="NSTransparent">NO</bool>
+ </object>
<object class="NSBox" id="692531763">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 184}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 224}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1304,7 +1402,7 @@
<object class="NSBox" id="205950287">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 129}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 169}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1326,7 +1424,7 @@
<object class="NSBox" id="17983744">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">12</int>
- <string key="NSFrame">{{163, 90}, {316, 5}}</string>
+ <string key="NSFrame">{{163, 130}, {316, 5}}</string>
<reference key="NSSuperview" ref="395894064"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@@ -1348,7 +1446,7 @@
<object class="NSButton" id="761347322">
<reference key="NSNextResponder" ref="395894064"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{161, 138}, {206, 18}}</string>
+ <string key="NSFrame">{{161, 178}, {206, 18}}</string>
<reference key="NSSuperview" ref="395894064"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="542131730">
@@ -1368,7 +1466,7 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{499, 276}</string>
+ <string key="NSFrameSize">{499, 316}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@@ -1491,11 +1589,7 @@
<int key="NSCellFlags">75628096</int>
<int key="NSCellFlags2">2048</int>
<string key="NSContents">Favorites</string>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">3100</int>
- </object>
+ <reference key="NSSupport" ref="26"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
@@ -3711,10 +3805,6 @@ AQAAAAA</bytes>
<string key="NSClassName">NSView</string>
</object>
<object class="NSUserDefaultsController" id="151174232">
- <object class="NSMutableArray" key="NSDeclaredKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>TableRowCountQueryLevel</string>
- </object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSArrayController" id="937123943">
@@ -5793,6 +5883,22 @@ AQAAAAA</bytes>
</object>
<int key="connectionID">1484</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">globalResultTableFontName</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="416182097"/>
+ </object>
+ <int key="connectionID">1493</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showGlobalResultTableFontPanel:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="401684657"/>
+ </object>
+ <int key="connectionID">1494</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -6349,7 +6455,11 @@ AQAAAAA</bytes>
<reference ref="265036898"/>
<reference ref="169616697"/>
<reference ref="743152467"/>
+ <reference ref="418062206"/>
+ <reference ref="416182097"/>
+ <reference ref="401684657"/>
<reference ref="67060802"/>
+ <reference ref="238389133"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Tables</string>
@@ -8226,6 +8336,53 @@ AQAAAAA</bytes>
<reference key="object" ref="274383011"/>
<reference key="parent" ref="938113486"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1485</int>
+ <reference key="object" ref="418062206"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="578929076"/>
+ </object>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1486</int>
+ <reference key="object" ref="578929076"/>
+ <reference key="parent" ref="418062206"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1487</int>
+ <reference key="object" ref="416182097"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="82174450"/>
+ </object>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1488</int>
+ <reference key="object" ref="401684657"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="828765183"/>
+ </object>
+ <reference key="parent" ref="395894064"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1489</int>
+ <reference key="object" ref="828765183"/>
+ <reference key="parent" ref="401684657"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1490</int>
+ <reference key="object" ref="82174450"/>
+ <reference key="parent" ref="416182097"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1492</int>
+ <reference key="object" ref="238389133"/>
+ <reference key="parent" ref="395894064"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -8428,6 +8585,13 @@ AQAAAAA</bytes>
<string>1473.IBPluginDependency</string>
<string>1474.IBPluginDependency</string>
<string>1475.IBPluginDependency</string>
+ <string>1485.IBPluginDependency</string>
+ <string>1486.IBPluginDependency</string>
+ <string>1487.IBPluginDependency</string>
+ <string>1488.IBPluginDependency</string>
+ <string>1489.IBPluginDependency</string>
+ <string>1490.IBPluginDependency</string>
+ <string>1492.IBPluginDependency</string>
<string>17.IBEditorWindowLastContentRect</string>
<string>17.IBPluginDependency</string>
<string>17.IBUserGuides</string>
@@ -8892,6 +9056,13 @@ AQAAAAA</bytes>
<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>{{571, 222}, {500, 280}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
@@ -9072,7 +9243,7 @@ AQAAAAA</bytes>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{318, 137}, {499, 276}}</string>
+ <string>{{751, 254}, {499, 316}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -9214,7 +9385,7 @@ AQAAAAA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{254, 361}, {500, 395}}</string>
+ <string>{{545, 361}, {500, 395}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -9275,7 +9446,7 @@ AQAAAAA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1484</int>
+ <int key="maxID">1494</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -9480,6 +9651,116 @@ AQAAAAA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">SPPreferenceController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addFavorite:</string>
+ <string>changeFont:</string>
+ <string>displayAutoUpdatePreferences:</string>
+ <string>displayEditorPreferences:</string>
+ <string>displayFavoritePreferences:</string>
+ <string>displayGeneralPreferences:</string>
+ <string>displayNetworkPreferences:</string>
+ <string>displayNotificationPreferences:</string>
+ <string>displayTablePreferences:</string>
+ <string>duplicateFavorite:</string>
+ <string>favoriteTypeDidChange:</string>
+ <string>removeFavorite:</string>
+ <string>saveFavorite:</string>
+ <string>setDefaultColors:</string>
+ <string>showCustomQueryFontPanel:</string>
+ <string>showGlobalResultTableFontPanel:</string>
+ <string>updateDefaultFavorite:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>autoUpdateView</string>
+ <string>defaultFavoritePopup</string>
+ <string>editorFontName</string>
+ <string>editorView</string>
+ <string>favoriteHostTextField</string>
+ <string>favoriteHostTextFieldSSH</string>
+ <string>favoriteNameTextField</string>
+ <string>favoriteUserTextField</string>
+ <string>favoriteUserTextFieldSSH</string>
+ <string>favoriteUserTextFieldSocket</string>
+ <string>favoritesController</string>
+ <string>favoritesTabView</string>
+ <string>favoritesTableView</string>
+ <string>favoritesView</string>
+ <string>generalView</string>
+ <string>globalResultTableFontName</string>
+ <string>networkView</string>
+ <string>notificationsView</string>
+ <string>preferencesWindow</string>
+ <string>socketPasswordField</string>
+ <string>sshPasswordField</string>
+ <string>sshSQLPasswordField</string>
+ <string>standardPasswordField</string>
+ <string>tableCell</string>
+ <string>tablesView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSView</string>
+ <string>NSPopUpButton</string>
+ <string>NSTextField</string>
+ <string>NSView</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSTextField</string>
+ <string>NSArrayController</string>
+ <string>NSTabView</string>
+ <string>NSTableView</string>
+ <string>NSView</string>
+ <string>NSView</string>
+ <string>NSTextField</string>
+ <string>NSView</string>
+ <string>NSView</string>
+ <string>NSWindow</string>
+ <string>NSSecureTextField</string>
+ <string>NSSecureTextField</string>
+ <string>NSSecureTextField</string>
+ <string>NSSecureTextField</string>
+ <string>id</string>
+ <string>NSView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Source/SPPreferenceController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SUUpdater</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
diff --git a/Resources/PreferenceDefaults.plist b/Resources/PreferenceDefaults.plist
index 233569d2..76eda386 100644
--- a/Resources/PreferenceDefaults.plist
+++ b/Resources/PreferenceDefaults.plist
@@ -10,6 +10,8 @@
<integer>1</integer>
<key>UseMonospacedFonts</key>
<false/>
+ <key>GlobalResultTableFont</key>
+ <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaSSEBVszNmNdBgAAABoAAAD//kwAdQBjAGkAZABhAEcAcgBhAG4AZABlAAAAhAFmC4QBYwCYAZgAmACG</data>
<key>CustomQueryMaxHistoryItems</key>
<integer>20</integer>
<key>ReloadAfterAddingRow</key>
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index e025296c..5afd08cb 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -169,6 +169,19 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
prefs = [[NSUserDefaults standardUserDefaults] retain];
+ [self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
+ [self setQueryEditorBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
+ [self setCommentColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]]];
+ [self setQuoteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]]];
+ [self setKeywordColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]]];
+ [self setBacktickColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]]];
+ [self setNumericColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]];
+ [self setVariableColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]];
+ [self setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
+ [self setTextColor:[self otherTextColor]];
+ [self setInsertionPointColor:[self otherTextColor]];
+ [self setShouldHiliteQuery:[prefs boolForKey:SPCustomQueryHighlightCurrentQuery]];
+
// Register observers for the when editor background colors preference changes
[prefs addObserver:self forKeyPath:SPCustomQueryEditorBackgroundColor options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:self forKeyPath:SPCustomQueryEditorHighlightQueryColor options:NSKeyValueObservingOptionNew context:NULL];
@@ -205,32 +218,32 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[self setNeedsDisplay:YES];
} else if ([keyPath isEqualToString:SPCustomQueryEditorCommentColor]) {
[self setCommentColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorQuoteColor]) {
[self setQuoteColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorSQLKeywordColor]) {
[self setKeywordColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorBacktickColor]) {
[self setBacktickColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorNumericColor]) {
[self setNumericColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorVariableColor]) {
[self setVariableColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
} else if ([keyPath isEqualToString:SPCustomQueryEditorTextColor]) {
[self setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
[self setTextColor:[self otherTextColor]];
- if([[self string] length]<100000)
+ if([[self string] length]<100000 && [self isEditable])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.1];
}
}
@@ -2981,37 +2994,42 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[[self queryEditorBackgroundColor] setFill];
NSRectFill(rect);
- // Highlightes the current query if set in the Pref and no snippet session
- // and if nothing is selected in the text view
- if ([self shouldHiliteQuery] && snippetControlCounter<=-1 && ![self selectedRange].length) {
- NSUInteger rectCount;
- [[self textStorage] ensureAttributesAreFixedInRange:[self queryRange]];
- NSRectArray queryRects = [[self layoutManager] rectArrayForCharacterRange: [self queryRange]
- withinSelectedCharacterRange: [self queryRange]
- inTextContainer: [self textContainer]
- rectCount: &rectCount ];
- [[self queryHiliteColor] setFill];
- NSRectFillList(queryRects, rectCount);
- }
+ if([[self delegate] isKindOfClass:[CustomQuery class]]) {
+
+ // Highlightes the current query if set in the Pref and no snippet session
+ // and if nothing is selected in the text view
+ if ([self shouldHiliteQuery] && snippetControlCounter<=-1 && ![self selectedRange].length) {
+ NSUInteger rectCount;
+ [[self textStorage] ensureAttributesAreFixedInRange:[self queryRange]];
+ NSRectArray queryRects = [[self layoutManager] rectArrayForCharacterRange: [self queryRange]
+ withinSelectedCharacterRange: [self queryRange]
+ inTextContainer: [self textContainer]
+ rectCount: &rectCount ];
+ [[self queryHiliteColor] setFill];
+ NSRectFillList(queryRects, rectCount);
+ }
- // Highlight snippets coming from the Query Favorite text macro
- if(snippetControlCounter > -1) {
- for(NSUInteger i=0; i<snippetControlMax; i++) {
- if(snippetControlArray[i][0] > -1) {
- // choose the colors for the snippet parts
- if(i == currentSnippetIndex) {
- [[NSColor colorWithCalibratedRed:1.0 green:0.6 blue:0.0 alpha:0.4] setFill];
- [[NSColor colorWithCalibratedRed:1.0 green:0.6 blue:0.0 alpha:0.8] setStroke];
- } else {
- [[NSColor colorWithCalibratedRed:1.0 green:0.8 blue:0.2 alpha:0.2] setFill];
- [[NSColor colorWithCalibratedRed:1.0 green:0.8 blue:0.2 alpha:0.5] setStroke];
+ // Highlight snippets coming from the Query Favorite text macro
+ if(snippetControlCounter > -1) {
+ for(NSUInteger i=0; i<snippetControlMax; i++) {
+ if(snippetControlArray[i][0] > -1) {
+ // choose the colors for the snippet parts
+ if(i == currentSnippetIndex) {
+ [[NSColor colorWithCalibratedRed:1.0 green:0.6 blue:0.0 alpha:0.4] setFill];
+ [[NSColor colorWithCalibratedRed:1.0 green:0.6 blue:0.0 alpha:0.8] setStroke];
+ } else {
+ [[NSColor colorWithCalibratedRed:1.0 green:0.8 blue:0.2 alpha:0.2] setFill];
+ [[NSColor colorWithCalibratedRed:1.0 green:0.8 blue:0.2 alpha:0.5] setStroke];
+ }
+ NSBezierPath *snippetPath = [self roundedBezierPathAroundRange: NSMakeRange(snippetControlArray[i][0],snippetControlArray[i][1]) ];
+ [snippetPath fill];
+ [snippetPath stroke];
}
- NSBezierPath *snippetPath = [self roundedBezierPathAroundRange: NSMakeRange(snippetControlArray[i][0],snippetControlArray[i][1]) ];
- [snippetPath fill];
- [snippetPath stroke];
}
}
+
}
+
[super drawRect:rect];
}
@@ -3275,11 +3293,11 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
}
/*
- * Show only setable modes in the font panel
+ * Set font panel's valid modes
*/
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
{
- return (NSFontPanelFaceModeMask | NSFontPanelSizeModeMask);
+ return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
}
#pragma mark -
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 1bc06e48..fd8af332 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -399,7 +399,7 @@
*/
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
{
- return (NSFontPanelAllModesMask ^ NSFontPanelAllEffectsModeMask);
+ return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
}
#pragma mark -
@@ -482,6 +482,8 @@
NSUInteger queryCount = [queries count];
NSMutableArray *tempQueries = [NSMutableArray arrayWithCapacity:queryCount];
+ NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]];
+ [customQueryView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height];
// Enable task cancellation
if (queryCount > 1)
@@ -533,7 +535,8 @@
SPTextAndLinkCell *dataCell = [[[SPTextAndLinkCell alloc] initTextCell:@""] autorelease];
[dataCell setEditable:YES];
[dataCell setFormatter:[[SPDataCellFormatter new] autorelease]];
- [dataCell setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [dataCell setFont:tableFont];
+
[dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
[theCol setDataCell:dataCell];
[[theCol headerCell] setStringValue:NSArrayObjectAtIndex(theColumns, j)];
@@ -855,7 +858,7 @@
// Init copyTable with necessary information for copying selected rows as SQL INSERT
[customQueryView setTableInstance:self withTableData:resultData withColumns:cqColumnDefinition withTableName:resultTableName withConnection:mySQLConnection];
-
+
//query finished
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
@@ -1276,22 +1279,6 @@
// Set up the interface
[textView setAllowsDocumentBackgroundColorChange:YES];
- [textView setTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
- [textView setInsertionPointColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCaretColor]]];
-
- [textView setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
- [textView setQueryEditorBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
-
- [textView setCommentColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]]];
- [textView setQuoteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]]];
- [textView setKeywordColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]]];
- [textView setBacktickColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]]];
- [textView setNumericColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]];
- [textView setVariableColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]];
- [textView setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
- [textView setTextColor:[textView otherTextColor]];
-
- [textView setShouldHiliteQuery:[prefs boolForKey:SPCustomQueryHighlightCurrentQuery]];
[customQueryView setVerticalMotionCanBeginDrag:NO];
[textView setContinuousSpellCheckingEnabled:NO];
@@ -2822,16 +2809,11 @@
if ([keyPath isEqualToString:SPDisplayTableViewVerticalGridlines]) {
[customQueryView setGridStyleMask:([[change objectForKey:NSKeyValueChangeNewKey] boolValue]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone];
}
- // Use monospaced fonts preference changed
- else if ([keyPath isEqualToString:SPUseMonospacedFonts]) {
-
- BOOL useMonospacedFont = [[change objectForKey:NSKeyValueChangeNewKey] boolValue];
-
- for (NSTableColumn *column in [customQueryView tableColumns])
- {
- [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
- }
-
+ // Result Table Font preference changed
+ else if ([keyPath isEqualToString:SPGlobalResultTableFont]) {
+ NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]];
+ [customQueryView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height];
+ [customQueryView setFont:tableFont];
[customQueryView reloadData];
}
}
@@ -3101,6 +3083,10 @@
selector:@selector(endDocumentTaskForTab:)
name:SPDocumentTaskEndNotification
object:tableDocumentInstance];
+
+ [prefs addObserver:self forKeyPath:SPGlobalResultTableFont options:NSKeyValueObservingOptionNew context:NULL];
+
+
}
/**
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index a4f844d4..0c237e17 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -96,6 +96,7 @@ extern NSString *SPNewFieldsAllowNulls;
extern NSString *SPLimitResults;
extern NSString *SPLimitResultsValue;
extern NSString *SPNullValue;
+extern NSString *SPGlobalResultTableFont;
// Favorites Prefpane
extern NSString *SPFavorites;
diff --git a/Source/SPConstants.m b/Source/SPConstants.m
index f5f6e5bf..90fd0e2b 100644
--- a/Source/SPConstants.m
+++ b/Source/SPConstants.m
@@ -64,6 +64,7 @@ NSString *SPNewFieldsAllowNulls = @"NewFieldsAllowNulls";
NSString *SPLimitResults = @"LimitResults";
NSString *SPLimitResultsValue = @"LimitResultsValue";
NSString *SPNullValue = @"NullValue";
+NSString *SPGlobalResultTableFont = @"GlobalResultTableFont";
// Favorites Prefpane
NSString *SPFavorites = @"favorites";
diff --git a/Source/SPPreferenceController.h b/Source/SPPreferenceController.h
index b8cf7be3..62babfed 100644
--- a/Source/SPPreferenceController.h
+++ b/Source/SPPreferenceController.h
@@ -62,6 +62,9 @@
NSDictionary *currentFavorite;
IBOutlet NSTextField *editorFontName;
+ IBOutlet NSTextField *globalResultTableFontName;
+
+ NSInteger fontChangeTarget;
NSToolbar *toolbar;
@@ -89,6 +92,7 @@
- (IBAction)saveFavorite:(id)sender;
- (IBAction)updateDefaultFavorite:(id)sender;
- (IBAction)showCustomQueryFontPanel:(id)sender;
+- (IBAction)showGlobalResultTableFontPanel:(id)sender;
- (IBAction)setDefaultColors:(id)sender;
// Toolbar item IBAction methods
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 6377153a..d7d6bdbe 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -57,6 +57,7 @@
keychain = nil;
favoriteNameFieldWasTouched = YES;
favoriteType = 0;
+ fontChangeTarget = 0;
}
return self;
@@ -457,6 +458,8 @@
[[self window] setShowsResizeIndicator:NO];
[toolbar setSelectedItemIdentifier:SPPreferenceToolbarTables];
+ NSFont *nf = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]];
+ [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
[self _resizeWindowForContentView:tablesView];
}
@@ -1051,12 +1054,23 @@
}
// -------------------------------------------------------------------------------
+// global table font selection
+// -------------------------------------------------------------------------------
+// show the font panel
+- (IBAction)showGlobalResultTableFontPanel:(id)sender
+{
+ fontChangeTarget = 1;
+ [[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]] isMultiple:NO];
+ [[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
+}
+
+// -------------------------------------------------------------------------------
// query editor font selection
-//
// -------------------------------------------------------------------------------
// show the font panel
- (IBAction)showCustomQueryFontPanel:(id)sender
{
+ fontChangeTarget = 2;
[[NSFontPanel sharedFontPanel] setPanelFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]] isMultiple:NO];
[[NSFontPanel sharedFontPanel] makeKeyAndOrderFront:self];
}
@@ -1076,17 +1090,29 @@
[prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]] forKey:SPCustomQueryEditorBackgroundColor];
}
-// set font panel's valid modes
+
+// Set font panel's valid modes
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
{
- return (NSFontPanelAllModesMask ^ NSFontPanelAllEffectsModeMask);
+ return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
}
+
// Action receiver for a font change in the font panel
- (void)changeFont:(id)sender
{
- NSFont *nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
- [prefs setObject:[NSArchiver archivedDataWithRootObject:nf] forKey:SPCustomQueryEditorFont];
- [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
+ NSFont *nf;
+ switch(fontChangeTarget) {
+ case 1:
+ nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]]];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:nf] forKey:SPGlobalResultTableFont];
+ [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
+ break;
+ case 2:
+ nf = [[NSFontPanel sharedFontPanel] panelConvertFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
+ [prefs setObject:[NSArchiver archivedDataWithRootObject:nf] forKey:SPCustomQueryEditorFont];
+ [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [nf displayName], [nf pointSize]]];
+ break;
+ }
}
// -------------------------------------------------------------------------------
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index 753996fb..0a1592ca 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -97,4 +97,15 @@
}
+- (void)setFont:(NSFont *)font;
+{
+ NSArray *tableColumns;
+ NSUInteger columnIndex;
+
+ tableColumns = [self tableColumns];
+ columnIndex = [tableColumns count];
+ while (columnIndex--)
+ [[(NSTableColumn *)[tableColumns objectAtIndex:columnIndex] dataCell] setFont:font];
+}
+
@end
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 64996349..0a397707 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -224,7 +224,6 @@
// Init copyTable with necessary information for copying selected rows as SQL INSERT
[tableContentView setTableInstance:self withTableData:tableValues withColumns:dataColumns withTableName:selectedTable withConnection:mySQLConnection];
-
// Post the notification that the query is finished
[[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance];
@@ -374,6 +373,8 @@
}
NSString *nullValue = [prefs objectForKey:SPNullValue];
+ NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]];
+ [tableContentView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height];
// Add the new columns to the table
for ( i = 0 ; i < [dataColumns count] ; i++ ) {
@@ -419,7 +420,7 @@
}
// Set the data cell font according to the preferences
- [dataCell setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [dataCell setFont:tableFont];
// Assign the data cell
[theCol setDataCell:dataCell];
@@ -3118,16 +3119,11 @@
if ([keyPath isEqualToString:SPDisplayTableViewVerticalGridlines]) {
[tableContentView setGridStyleMask:([[change objectForKey:NSKeyValueChangeNewKey] boolValue]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone];
}
- // Use monospaced fonts preference changed
- else if ([keyPath isEqualToString:SPUseMonospacedFonts]) {
-
- BOOL useMonospacedFont = [[change objectForKey:NSKeyValueChangeNewKey] boolValue];
-
- for (NSTableColumn *column in [tableContentView tableColumns])
- {
- [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
- }
-
+ // Table font preference changed
+ else if ([keyPath isEqualToString:SPGlobalResultTableFont]) {
+ NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]];
+ [tableContentView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height];
+ [tableContentView setFont:tableFont];
[tableContentView reloadData];
}
}
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index fecea349..368d9f94 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -179,10 +179,12 @@
// Register observers for the when the UseMonospacedFonts preference changes
[prefs addObserver:tableSourceInstance forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
- [prefs addObserver:tableContentInstance forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
- [prefs addObserver:customQueryInstance forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
+ // [prefs addObserver:tableContentInstance forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
+ // [prefs addObserver:customQueryInstance forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:[SPQueryController sharedQueryController] forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL];
-
+
+ [prefs addObserver:tableContentInstance forKeyPath:SPGlobalResultTableFont options:NSKeyValueObservingOptionNew context:NULL];
+
// Register observers for when the logging preference changes
[prefs addObserver:[SPQueryController sharedQueryController] forKeyPath:SPConsoleEnableLogging options:NSKeyValueObservingOptionNew context:NULL];