diff options
-rw-r--r-- | Interfaces/English.lproj/DBView.xib | 122 | ||||
-rw-r--r-- | Source/SPExportController.m | 13 | ||||
-rw-r--r-- | Source/SPTableInfo.m | 9 | ||||
-rw-r--r-- | Source/TableDocument.h | 3 | ||||
-rw-r--r-- | Source/TableDocument.m | 52 |
5 files changed, 122 insertions, 77 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index fa66a431..0985a69e 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -2,12 +2,13 @@ <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.SystemVersion">9J61</string> <string key="IBDocument.InterfaceBuilderVersion">677</string> - <string key="IBDocument.AppKitVersion">949.43</string> + <string key="IBDocument.AppKitVersion">949.46</string> <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="4487"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -77,9 +78,8 @@ <object class="NSTableView" id="251040077"> <reference key="NSNextResponder" ref="73685676"/> <int key="NSvFlags">4352</int> - <string key="NSFrameSize">{212, 393}</string> + <string key="NSFrameSize">{214, 395}</string> <reference key="NSSuperview" ref="73685676"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -90,7 +90,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTableColumn" id="544378883"> <string key="NSIdentifier">tables</string> - <double key="NSWidth">2.088690e+02</double> + <double key="NSWidth">2.108690e+02</double> <double key="NSMinWidth">4.286900e+01</double> <double key="NSMaxWidth">1.000000e+03</double> <object class="NSTableHeaderCell" key="NSHeaderCell"> @@ -174,9 +174,8 @@ <int key="NSTableViewSelectionHighlightStyle">1</int> </object> </object> - <string key="NSFrame">{{1, 1}, {212, 393}}</string> + <string key="NSFrameSize">{214, 395}</string> <reference key="NSSuperview" ref="233472824"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="251040077"/> <reference key="NSDocView" ref="251040077"/> <object class="NSColor" key="NSBGColor" id="1024678221"> @@ -192,7 +191,6 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{175, 1}, {15, 481}}</string> <reference key="NSSuperview" ref="233472824"/> - <reference key="NSWindow"/> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.979253e-01</double> @@ -202,7 +200,6 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="233472824"/> - <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> @@ -211,9 +208,8 @@ </object> <string key="NSFrameSize">{214, 395}</string> <reference key="NSSuperview" ref="355288374"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="73685676"/> - <int key="NSsFlags">530</int> + <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="693168867"/> <reference key="NSHScroller" ref="656188692"/> <reference key="NSContentView" ref="73685676"/> @@ -232,9 +228,8 @@ <object class="NSTableView" id="347093764"> <reference key="NSNextResponder" ref="685057119"/> <int key="NSvFlags">4352</int> - <string key="NSFrameSize">{212, 123}</string> + <string key="NSFrameSize">{214, 125}</string> <reference key="NSSuperview" ref="685057119"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -245,7 +240,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTableColumn" id="703008826"> <string key="NSIdentifier">info</string> - <double key="NSWidth">2.088690e+02</double> + <double key="NSWidth">2.108690e+02</double> <double key="NSMinWidth">4.286900e+01</double> <double key="NSMaxWidth">1.000000e+03</double> <object class="NSTableHeaderCell" key="NSHeaderCell"> @@ -296,20 +291,18 @@ <int key="NSTableViewSelectionHighlightStyle">1</int> </object> </object> - <string key="NSFrame">{{1, 1}, {212, 123}}</string> + <string key="NSFrameSize">{214, 125}</string> <reference key="NSSuperview" ref="298226231"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="347093764"/> <reference key="NSDocView" ref="347093764"/> <reference key="NSBGColor" ref="1024678221"/> - <int key="NScvFlags">4</int> + <int key="NScvFlags">6</int> </object> <object class="NSScroller" id="245346414"> <reference key="NSNextResponder" ref="298226231"/> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{175, 1}, {15, 481}}</string> <reference key="NSSuperview" ref="298226231"/> - <reference key="NSWindow"/> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.979253e-01</double> @@ -319,7 +312,6 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="298226231"/> - <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> @@ -328,9 +320,8 @@ </object> <string key="NSFrame">{{0, 404}, {214, 125}}</string> <reference key="NSSuperview" ref="355288374"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="685057119"/> - <int key="NSsFlags">530</int> + <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="245346414"/> <reference key="NSHScroller" ref="353686052"/> <reference key="NSContentView" ref="685057119"/> @@ -339,14 +330,12 @@ </object> <string key="NSFrame">{{-1, 22}, {214, 529}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> </object> <object class="NSButton" id="644515521"> <reference key="NSNextResponder" ref="372294785"/> <int key="NSvFlags">292</int> <string key="NSFrame">{{0, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="492393561"> <int key="NSCellFlags">-2080244224</int> @@ -375,7 +364,6 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{20, 0}, {46, 25}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="753352469"> <int key="NSCellFlags">-2076049856</int> @@ -486,7 +474,6 @@ </object> <string key="NSFrame">{{197, 0}, {15, 23}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="875296521"> <int key="NSCellFlags">130560</int> @@ -519,7 +506,6 @@ </object> <string key="NSFrame">{{93, 0}, {104, 23}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="761703901"> <int key="NSCellFlags">130560</int> @@ -540,7 +526,6 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{61, -1}, {32, 25}}</string> <reference key="NSSuperview" ref="372294785"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="529591350"> <int key="NSCellFlags">-2080244224</int> @@ -563,7 +548,6 @@ </object> <string key="NSFrameSize">{212, 550}</string> <reference key="NSSuperview" ref="937377983"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="604818293"> @@ -576,7 +560,6 @@ <int key="NSvFlags">274</int> <string key="NSFrame">{{-7, -10}, {735, 564}}</string> <reference key="NSSuperview" ref="604818293"/> - <reference key="NSWindow"/> <object class="NSMutableArray" key="NSTabViewItems"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTabViewItem" id="831053945"> @@ -2608,7 +2591,6 @@ </object> <string key="NSFrameSize">{688, 14}</string> <reference key="NSSuperview" ref="1072692119"/> - <reference key="NSWindow"/> <object class="NSTextContainer" key="NSTextContainer" id="326170846"> <object class="NSLayoutManager" key="NSLayoutManager"> <object class="NSTextStorage" key="NSTextStorage"> @@ -2667,7 +2649,6 @@ </object> <string key="NSFrame">{{1, 1}, {688, 155}}</string> <reference key="NSSuperview" ref="71560786"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1055190999"/> <reference key="NSDocView" ref="1055190999"/> <reference key="NSBGColor" ref="449903125"/> @@ -2682,7 +2663,6 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{598, 1}, {15, 68}}</string> <reference key="NSSuperview" ref="71560786"/> - <reference key="NSWindow"/> <reference key="NSTarget" ref="71560786"/> <string key="NSAction">_doScroller:</string> <double key="NSCurValue">1.000000e+00</double> @@ -2692,7 +2672,6 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {601, 11}}</string> <reference key="NSSuperview" ref="71560786"/> - <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="71560786"/> <string key="NSAction">_doScroller:</string> @@ -2702,7 +2681,6 @@ </object> <string key="NSFrameSize">{690, 157}</string> <reference key="NSSuperview" ref="873437769"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1072692119"/> <int key="NSsFlags">530</int> <reference key="NSVScroller" ref="413233170"/> @@ -2712,7 +2690,6 @@ </object> <string key="NSFrameSize">{690, 156}</string> <reference key="NSSuperview" ref="894339536"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="345834048"> @@ -2735,14 +2712,12 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{688, 228}</string> <reference key="NSSuperview" ref="90844306"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTableHeaderView" key="NSHeaderView" id="1038415606"> <reference key="NSNextResponder" ref="533922066"/> <int key="NSvFlags">256</int> <string key="NSFrameSize">{688, 17}</string> <reference key="NSSuperview" ref="533922066"/> - <reference key="NSWindow"/> <reference key="NSTableView" ref="581095761"/> </object> <object class="_NSCornerView" key="NSCornerView" id="151074124"> @@ -2750,7 +2725,6 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-26, 0}, {16, 17}}</string> <reference key="NSSuperview" ref="678281118"/> - <reference key="NSWindow"/> </object> <object class="NSMutableArray" key="NSTableColumns"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -2794,7 +2768,6 @@ </object> <string key="NSFrame">{{1, 17}, {688, 228}}</string> <reference key="NSSuperview" ref="678281118"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="581095761"/> <reference key="NSDocView" ref="581095761"/> <reference key="NSBGColor" ref="1024678221"/> @@ -2805,7 +2778,6 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{611, 17}, {15, 30}}</string> <reference key="NSSuperview" ref="678281118"/> - <reference key="NSWindow"/> <reference key="NSTarget" ref="678281118"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">9.375000e-01</double> @@ -2815,7 +2787,6 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{1, 47}, {610, 15}}</string> <reference key="NSSuperview" ref="678281118"/> - <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="678281118"/> <string key="NSAction">_doScroller:</string> @@ -2830,7 +2801,6 @@ </object> <string key="NSFrame">{{1, 0}, {688, 17}}</string> <reference key="NSSuperview" ref="678281118"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1038415606"/> <reference key="NSDocView" ref="1038415606"/> <reference key="NSBGColor" ref="1024678221"/> @@ -2840,7 +2810,6 @@ </object> <string key="NSFrameSize">{690, 246}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="90844306"/> <int key="NSsFlags">562</int> <reference key="NSVScroller" ref="472831765"/> @@ -2855,7 +2824,6 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{156, 246}, {98, 22}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="830957297"> <int key="NSCellFlags">-2076049856</int> @@ -2906,7 +2874,6 @@ <int key="NSvFlags">264</int> <string key="NSFrame">{{38, 246}, {108, 22}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="416049103"> <int key="NSCellFlags">-2076049856</int> @@ -2989,7 +2956,6 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{-10, 245}, {46, 25}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="984501775"> <int key="NSCellFlags">-2076049856</int> @@ -3210,7 +3176,7 @@ </object> <bool key="NSNoAutoenable">YES</bool> </object> - <int key="NSSelectedIndex">16</int> + <int key="NSSelectedIndex">13</int> <bool key="NSPullDown">YES</bool> <int key="NSPreferredEdge">1</int> <bool key="NSUsesItemFromMenu">YES</bool> @@ -3222,7 +3188,6 @@ <int key="NSvFlags">265</int> <string key="NSFrame">{{591, 248}, {90, 17}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="177866566"> <int key="NSCellFlags">-2080244224</int> @@ -3244,7 +3209,6 @@ <int key="NSvFlags">265</int> <string key="NSFrame">{{473, 248}, {110, 17}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="588489390"> <int key="NSCellFlags">604110336</int> @@ -3277,7 +3241,6 @@ </object> <string key="NSFrame">{{32, 246}, {658, 23}}</string> <reference key="NSSuperview" ref="345834048"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="76236597"> <int key="NSCellFlags">130560</int> @@ -3293,7 +3256,6 @@ </object> <string key="NSFrame">{{0, 165}, {690, 269}}</string> <reference key="NSSuperview" ref="894339536"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="875002707"> @@ -3306,7 +3268,6 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{242, 64}, {431, 17}}</string> <reference key="NSSuperview" ref="875002707"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="401235649"> <int key="NSCellFlags">67239424</int> @@ -3323,7 +3284,6 @@ <int key="NSvFlags">264</int> <string key="NSFrame">{{17, 67}, {143, 14}}</string> <reference key="NSSuperview" ref="875002707"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="194978207"> <int key="NSCellFlags">67239424</int> @@ -3344,7 +3304,6 @@ <int key="NSvFlags">274</int> <string key="NSFrame">{{17, 20}, {656, 43}}</string> <reference key="NSSuperview" ref="875002707"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="948571736"> <int key="NSCellFlags">67239424</int> @@ -3359,18 +3318,15 @@ </object> <string key="NSFrame">{{0, 443}, {690, 87}}</string> <reference key="NSSuperview" ref="894339536"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{6, 10}, {690, 530}}</string> <reference key="NSSuperview" ref="746504912"/> - <reference key="NSWindow"/> </object> </object> <string key="NSFrame">{{10, 7}, {700, 544}}</string> <reference key="NSSuperview" ref="714795046"/> - <reference key="NSWindow"/> </object> <string key="NSLabel">Custom Query</string> <reference key="NSColor" ref="62854682"/> @@ -4449,20 +4405,17 @@ </object> <string key="NSFrame">{{221, 0}, {723, 550}}</string> <reference key="NSSuperview" ref="937377983"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrameSize">{944, 550}</string> <reference key="NSSuperview" ref="579726586"/> - <reference key="NSWindow"/> <bool key="NSIsVertical">YES</bool> <string key="NSAutosaveName">DBViewSplitter</string> </object> </object> <string key="NSFrameSize">{944, 550}</string> <reference key="NSSuperview"/> - <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{780, 502}</string> @@ -12193,10 +12146,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSClassName">NSView</string> </object> <object class="NSUserDefaultsController" id="461189245"> - <object class="NSMutableArray" key="NSDeclaredKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>CustomQueryUpdateAutoHelp</string> - </object> <bool key="NSSharedInstance">YES</bool> </object> <object class="NSArrayController" id="302582105"> @@ -15809,6 +15758,38 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <int key="connectionID">5936</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">contentViewSplitter</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="937377983"/> + </object> + <int key="connectionID">5938</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">tableListSplitter</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="355288374"/> + </object> + <int key="connectionID">5939</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="355288374"/> + <reference key="destination" ref="427689665"/> + </object> + <int key="connectionID">5940</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">tableInfoTable</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="347093764"/> + </object> + <int key="connectionID">5941</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -24212,11 +24193,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBUserGuide"> <reference key="view" ref="730602982"/> - <float key="location">1.110000e+02</float> - <int key="affinity">0</int> - </object> - <object class="IBUserGuide"> - <reference key="view" ref="730602982"/> <float key="location">3.670000e+02</float> <int key="affinity">0</int> </object> @@ -25916,7 +25892,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> </object> </object> <nil key="sourceID"/> - <int key="maxID">5936</int> + <int key="maxID">5941</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -26728,6 +26704,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> <string>connectProgressBar</string> <string>connectProgressStatusText</string> <string>connectSheet</string> + <string>contentViewSplitter</string> <string>createTableSyntaxWindow</string> <string>customQueryInstance</string> <string>customQueryTextView</string> @@ -26759,6 +26736,8 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> <string>tableContentInstance</string> <string>tableDataInstance</string> <string>tableDumpInstance</string> + <string>tableInfoTable</string> + <string>tableListSplitter</string> <string>tableRelationsInstance</string> <string>tableSourceInstance</string> <string>tableTabView</string> @@ -26776,6 +26755,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> <string>NSProgressIndicator</string> <string>NSTextField</string> <string>id</string> + <string>NSSplitView</string> <string>NSWindow</string> <string>id</string> <string>NSTextView</string> @@ -26807,6 +26787,8 @@ Y2hhbmdlIHRoZSBvcmRlcg</string> <string>id</string> <string>id</string> <string>id</string> + <string>NSTableView</string> + <string>NSSplitView</string> <string>id</string> <string>id</string> <string>NSTabView</string> diff --git a/Source/SPExportController.m b/Source/SPExportController.m index d0cc34f9..bd72c9d2 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -32,10 +32,17 @@ -(void)export { - if ([NSBundle loadNibNamed:@"ExportDialog" owner:self]) { - [self loadTables]; - [NSApp beginSheet:exportWindow modalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:nil]; + if (!exportWindow) { + [NSBundle loadNibNamed:@"ExportDialog" owner:self]; } + + [self loadTables]; + + [NSApp beginSheet:exportWindow + modalForWindow:tableWindow + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; } - (IBAction)closeSheet:(id)sender diff --git a/Source/SPTableInfo.m b/Source/SPTableInfo.m index e9f3e3a1..9295aa38 100644 --- a/Source/SPTableInfo.m +++ b/Source/SPTableInfo.m @@ -159,6 +159,12 @@ return [info objectAtIndex:rowIndex]; } +- (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row +{ + return (row == 0 ? 25 : [tableView rowHeight]); +} + + - (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex { // row 1 and 6 should be editable - ie be able to rename the table and change the auto_increment value. @@ -176,9 +182,12 @@ if ((rowIndex > 0) && [[aTableColumn identifier] isEqualToString:@"info"]) { [(ImageAndTextCell*)aCell setImage:[NSImage imageNamed:@"table-property"]]; [(ImageAndTextCell*)aCell setIndentationLevel:1]; + [(ImageAndTextCell*)aCell setDrawsBackground:NO]; } else { [(ImageAndTextCell*)aCell setImage:nil]; [(ImageAndTextCell*)aCell setIndentationLevel:0]; + //[(ImageAndTextCell*)aCell setDrawsBackground:YES]; + //[(ImageAndTextCell*)aCell setBackgroundColor:[NSColor colorWithDeviceRed:0.894 green:0.917 blue:0.945 alpha:1]]; } } diff --git a/Source/TableDocument.h b/Source/TableDocument.h index 1a718b32..a7ba9d01 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -81,6 +81,9 @@ IBOutlet id variablesTableView; IBOutlet NSTabView *tableTabView; + IBOutlet NSTableView *tableInfoTable; + IBOutlet NSSplitView *tableListSplitter; + IBOutlet NSSplitView *contentViewSplitter; IBOutlet id sidebarGrabber; IBOutlet NSTextView *customQueryTextView; diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 9a7f863c..56ca2422 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -109,6 +109,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum // Hide the tabs in the tab view (we only show them to allow switching tabs in interface builder) [tableTabView setTabViewType:NSNoTabsNoBorder]; + [tableListSplitter setDividerStyle:NSSplitViewDividerStyleThin]; } - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context @@ -2341,7 +2342,8 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum */ - (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview { - return NO; + + return subview == [[tableInfoTable superview] superview]; } /** @@ -2349,7 +2351,12 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum */ - (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset { - return proposedMax - 600; + if (sender == contentViewSplitter) { + return 300; + } else { + // + return proposedMax;//([tableInfoTable rowHeight] * [tableInfoTable numberOfRows] + 25); + } } /** @@ -2357,12 +2364,49 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum */ - (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset { - return proposedMin + 140; + if (sender == tableListSplitter) { + return [sender frame].size.height - [sender dividerThickness] - 145; + //return [sender frame].size.height - [sender dividerThickness] - ([tableInfoTable rowHeight] * [tableInfoTable numberOfRows] + 25); + } else { + return 160; + } +} + +-(void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize +{ + [sender adjustSubviews]; + + if (sender == tableListSplitter && + ![tableListSplitter isSubviewCollapsed:[[sender subviews] objectAtIndex:1]]) { + + CGFloat dividerThickness = [sender dividerThickness]; + NSRect topRect = [[[sender subviews] objectAtIndex:0] frame]; + NSRect bottomRect = [[[sender subviews] objectAtIndex:1] frame]; + NSRect newFrame = [sender frame]; + + topRect.size.height = newFrame.size.height - 145 - dividerThickness; + topRect.size.width = newFrame.size.width; + topRect.origin = NSMakePoint(0, 0); + + bottomRect.size.height = newFrame.size.height - topRect.size.height - dividerThickness; + bottomRect.size.width = newFrame.size.width; + bottomRect.origin.y = topRect.size.height + dividerThickness; + + [[[sender subviews] objectAtIndex:0] setFrame:topRect]; + [[[sender subviews] objectAtIndex:1] setFrame:bottomRect]; + } +} + + +- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex +{ + return NO;//splitView == tableListSplitter; } - (void)splitViewDidResizeSubviews:(NSNotification *)notification { - [self updateChooseDatabaseToolbarItemWidth]; + if ([notification object] == contentViewSplitter) + [self updateChooseDatabaseToolbarItemWidth]; } - (NSRect)splitView:(NSSplitView *)splitView additionalEffectiveRectOfDividerAtIndex:(int)dividerIndex |