From ee588049b5a7f755d788b983dc8cabce24453641 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 2 Jan 2015 16:08:19 +0100 Subject: =?UTF-8?q?*=20Fix=20broken=20import=20on=2010.6=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Import would not work on a new installation where a certain preference key has not yet been set) * Also attached the gear menu in table structure view to the table header view, so the columns to show can now be selected by right-clicking on the table header (like in Activity Monitor) --- Interfaces/English.lproj/DBView.xib | 166 +++++++++++++++++++++--------------- Source/SPDataImport.m | 7 +- 2 files changed, 105 insertions(+), 68 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index a47effcc..192a0566 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -1141,11 +1141,12 @@ {{-6, -10}, {740, 564}} + source - + 274 @@ -1161,6 +1162,7 @@ -2147483356 {{124, -1}, {33, 25}} + YES @@ -1195,7 +1197,8 @@ 4352 {693, 288} - + + YES NO YES @@ -1204,6 +1207,7 @@ 256 {693, 17} + @@ -1212,12 +1216,13 @@ -2147483392 {15, 20} + name - 60 + 59 50 1000 @@ -1777,6 +1782,7 @@ {{1, 17}, {693, 288}} + @@ -1790,6 +1796,7 @@ {{1, 0}, {693, 17}} + @@ -1798,16 +1805,19 @@ -2147483392 {{674, 17}, {15, 274}} + NO _doScroller: + 0.94791666666666663 -2147483392 {{1, 289}, {689, 16}} + NO 1 @@ -1818,12 +1828,14 @@ {{-1, 22}, {695, 306}} - + + 133682 + QSAAAEEgAABBkAAAQZAAAA 0.25 4 @@ -1834,6 +1846,7 @@ 292 {{-1, -1}, {32, 25}} + YES @@ -1857,6 +1870,7 @@ 292 {{93, -1}, {32, 25}} + YES @@ -1880,6 +1894,7 @@ 292 {{30, -1}, {32, 25}} + YES @@ -1906,6 +1921,7 @@ 292 {{61, -1}, {32, 25}} + YES @@ -1930,8 +1946,9 @@ 289 - {{661.5, 0}, {36, 23}} + {{662, 0}, {36, 23}} + {250, 250} YES @@ -2031,6 +2048,7 @@ + 1 YES 1 YES @@ -2051,6 +2069,7 @@ {{125, 0}, {506, 23}} + YES @@ -2070,6 +2089,7 @@ 289 {{631, -1}, {32, 25}} + YES @@ -2094,6 +2114,7 @@ {694, 328} + YES NSView @@ -2111,6 +2132,7 @@ 268 {{3, 3}, {58, 14}} + YES @@ -2148,6 +2170,7 @@ {{677, 3}, {10, 13}} + YES @@ -2168,6 +2191,7 @@ {{0, 181}, {694, 20}} + @@ -2183,7 +2207,8 @@ 4352 {693, 141} - + + YES NO YES @@ -2192,6 +2217,7 @@ 256 {693, 17} + @@ -2200,6 +2226,7 @@ -2147483392 {15, 20} + @@ -2462,6 +2489,7 @@ {{1, 17}, {693, 141}} + @@ -2475,6 +2503,7 @@ {{1, 0}, {693, 17}} + @@ -2483,6 +2512,7 @@ -2147483392 {{611, 17}, {15, 126}} + NO @@ -2493,6 +2523,7 @@ -2147483392 {{1, 143}, {610, 15}} + NO 1 @@ -2503,12 +2534,14 @@ {{-1, 22}, {695, 159}} - + + 133682 + QSAAAEEgAABBkAAAQZAAAA 0.25 4 @@ -2519,6 +2552,7 @@ 292 {{-1, -1}, {32, 25}} + YES @@ -2542,6 +2576,7 @@ 292 {{61, -1}, {32, 25}} + YES @@ -2565,6 +2600,7 @@ 292 {{30, -1}, {32, 25}} + YES @@ -2596,6 +2632,7 @@ {{93, 0}, {601, 23}} + YES @@ -2613,6 +2650,7 @@ {{0, 329}, {694, 201}} + YES NSView @@ -2620,11 +2658,14 @@ {{7, 10}, {694, 530}} + 2 {{10, 7}, {705, 544}} + + Structure @@ -3533,7 +3574,7 @@ customQuery - + 274 @@ -3549,7 +3590,6 @@ {{6, 10}, {695, 23}} - YES @@ -3569,7 +3609,6 @@ 292 {{36, 10}, {36, 23}} - {250, 250} YES @@ -3655,7 +3694,6 @@ 292 {{6, 9}, {32, 25}} - YES @@ -3680,7 +3718,6 @@ 292 {{68, 9}, {32, 25}} - YES @@ -3727,28 +3764,8 @@ 6418 - - Apple HTML pasteboard type - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - Apple URL pasteboard type - CorePasteboardFlavorType 0x6D6F6F76 - NSColor pasteboard type - NSFilenamesPboardType - NSStringPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT RTFD pasteboard type - NeXT Rich Text Format v1.0 pasteboard type - NeXT TIFF v4.0 pasteboard type - NeXT font pasteboard type - NeXT ruler pasteboard type - WebURLsWithTitlesPboardType - public.url - {693, 141} - @@ -3807,12 +3824,11 @@ {{1, 1}, {693, 141}} - - {1, -1} + {5, 5} 0 4 @@ -3822,7 +3838,6 @@ -2147483392 {{-100, -100}, {87, 11}} - NO 257 @@ -3835,7 +3850,6 @@ -2147483392 {{224, 1}, {15, 133}} - NO @@ -3844,7 +3858,6 @@ {{0, 1}, {695, 143}} - 133650 @@ -3857,7 +3870,6 @@ {695, 143} - YES NSView @@ -3871,7 +3883,6 @@ 265 {{507, 214}, {180, 22}} - YES @@ -3973,7 +3984,6 @@ 4352 {694, 182} - YES NO @@ -3983,7 +3993,6 @@ 256 {694, 17} - @@ -3992,7 +4001,6 @@ -2147483392 {15, 20} - @@ -4044,7 +4052,6 @@ {{1, 17}, {693, 182}} {{0.5, 0}, {693, 182}} - @@ -4058,7 +4065,6 @@ {{1, 0}, {693, 17}} - @@ -4067,7 +4073,6 @@ -2147483392 {{680, 17}, {15, 199}} - NO @@ -4079,7 +4084,6 @@ 256 {{1, 199}, {693, 15}} - YES NO @@ -4093,7 +4097,6 @@ {{0, -1}, {695, 215}} - 133810 @@ -4111,7 +4114,6 @@ 268 {{156, 214}, {98, 22}} - YES @@ -4225,7 +4227,6 @@ 264 {{38, 214}, {108, 22}} - YES @@ -4339,7 +4340,6 @@ 268 {{-13, 214}, {48, 23}} - {250, 250} YES @@ -4651,7 +4651,6 @@ {{26, 214}, {669, 23}} - YES @@ -4669,7 +4668,6 @@ {{0, 152}, {695, 237}} - YES NSView @@ -4677,13 +4675,11 @@ {695, 389} - {695, 391} - YES @@ -4696,7 +4692,6 @@ 268 {{15, 91}, {363, 14}} - YES @@ -4724,7 +4719,6 @@ 2322 {671, 72} - @@ -4770,7 +4764,6 @@ {671, 72} - @@ -4782,7 +4775,6 @@ -2147483392 {{-100, -100}, {87, 18}} - NO 1 @@ -4795,7 +4787,6 @@ -2147483392 {{225, 0}, {15, 135}} - NO @@ -4804,7 +4795,6 @@ {{12, 12}, {671, 72}} - 133648 @@ -4817,14 +4807,12 @@ {{0, 392}, {695, 117}} - YES {{6, 33}, {695, 509}} - 2 @@ -4833,7 +4821,6 @@ 290 {{103, 12}, {581, 17}} - YES 67108864 @@ -4849,8 +4836,6 @@ {{10, 7}, {705, 544}} - - Custom Query @@ -6715,13 +6700,13 @@ - + 134217731 YES YES - + @@ -15856,6 +15841,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 7498 + + + menu + + + + Uxa-5O-Q0T + menu @@ -30315,6 +30308,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 id NSPopUpButton id + SPTableContentFilterController NSButton NSButton NSButton @@ -30394,6 +30388,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 filterButton id + + filterControllerInstance + SPTableContentFilterController + filterTableClearButton NSButton @@ -30647,6 +30645,35 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 SPTableContentFilterController NSObject + + SPSplitView + NSRuleEditor + SPTableData + SPDatabaseDocument + SPTablesList + + + + contentSplitView + SPSplitView + + + filterRuleEditor + NSRuleEditor + + + tableDataInstance + SPTableData + + + tableDocumentInstance + SPDatabaseDocument + + + tablesListInstance + SPTablesList + + IBProjectSource ../Source/SPTableContentFilterController.h @@ -30787,6 +30814,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 NSButton SPTableData SPDatabaseDocument + SPTableView SPTablesList @@ -30862,6 +30890,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 tableDocumentInstance SPDatabaseDocument + + tableList + SPTableView + tablesListInstance SPTablesList diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index 5859b75d..f1208a54 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -288,7 +288,12 @@ [openPanel setNameFieldStringValue:[lastFilename lastPathComponent]]; } - [openPanel setDirectoryURL:[NSURL URLWithString:[prefs objectForKey:@"openPath"]]]; + NSString *openPath; + if((openPath = [prefs objectForKey:@"openPath"])) { + // Doc says calling +[NSURL URLWithString:] with nil is fine, + // but at least on 10.6 this will cause an exception + [openPanel setDirectoryURL:[NSURL URLWithString:openPath]]; + } [openPanel beginSheetModalForWindow:[tableDocumentInstance parentWindow] completionHandler:^(NSInteger returnCode) { // Ensure text inputs are completed, preventing dead character entry -- cgit v1.2.3