From 8bcfd1207b4794fdd62fdf5df9343963b507b41c Mon Sep 17 00:00:00 2001 From: mtvee Date: Fri, 15 May 2009 00:36:38 +0000 Subject: UI cleanups for references tab --- Interfaces/English.lproj/DBView.xib | 246 ++++++++++++++++++------------------ Source/TableRelations.m | 6 + 2 files changed, 130 insertions(+), 122 deletions(-) diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 80c0fc45..5342b649 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -8,7 +8,8 @@ 353.00 YES - + + YES @@ -378,7 +379,7 @@ 1048576 2147483647 - + NSImage button_action @@ -2934,7 +2935,7 @@ 1048576 2147483647 - + _popUpItemAction: @@ -3711,9 +3712,9 @@ 338820672 - 1024 + 132096 Text Cell - + @@ -3738,9 +3739,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -3765,9 +3766,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -3792,9 +3793,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -3819,9 +3820,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -3846,9 +3847,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -3873,9 +3874,9 @@ 337772096 - 2048 + 133120 Text Cell - + @@ -8667,14 +8668,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 1 2 - {{196, 196}, {473, 314}} + {{196, 215}, {473, 295}} 1946157056 relationSheet NSWindow {3.40282e+38, 3.40282e+38} - + 256 YES @@ -8691,13 +8692,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{121, 10}, {299, 26}} + {{121, 10}, {299, 22}} YES -2076049856 - 2048 - + 133120 + 109199615 129 @@ -8756,25 +8757,25 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{-1, 16}, {120, 17}} + {{-1, 15}, {120, 14}} YES 68288064 - 71304192 + 71435264 Column - + - {{1, 1}, {435, 44}} + {{1, 1}, {435, 40}} - {{17, 246}, {437, 60}} + {{17, 231}, {437, 56}} {0, 0} @@ -8807,13 +8808,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{122, 40}, {180, 26}} + {{122, 40}, {180, 22}} YES -2076049856 - 2048 - + 133120 + 109199615 129 @@ -8892,13 +8893,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{122, 10}, {180, 26}} + {{122, 10}, {180, 22}} YES -2076049856 - 2048 - + 133120 + 109199615 129 @@ -8977,14 +8978,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{0, 46}, {120, 17}} + {{0, 45}, {120, 14}} YES 68288064 - 71304192 + 71435264 On Update - + @@ -8993,25 +8994,25 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{0, 16}, {120, 17}} + {{0, 15}, {120, 14}} YES 68288064 - 71304192 + 71435264 On Delete - + - {{1, 1}, {437, 74}} + {{1, 1}, {437, 71}} - {{17, 56}, {439, 90}} + {{17, 49}, {439, 87}} {0, 0} @@ -9044,13 +9045,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{123, 40}, {299, 26}} + {{123, 40}, {299, 22}} YES -2076049856 - 2048 - + 133120 + 109199615 129 @@ -9109,13 +9110,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{123, 10}, {299, 26}} + {{123, 10}, {299, 22}} YES -2076049856 - 2048 - + 133120 + 109199615 129 @@ -9174,7 +9175,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{123, 96}, {299, 26}} + {{123, 87}, {299, 26}} YES @@ -9236,12 +9237,44 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 2 + + + 268 + {{1, 45}, {120, 14}} + + YES + + 68288064 + 71435264 + Table + + + + + + + + + 268 + {{1, 15}, {120, 14}} + + YES + + 68288064 + 71435264 + Column + + + + + + - {{1, 1}, {437, 76}} + {{1, 1}, {437, 71}} - {{17, 150}, {439, 92}} + {{17, 140}, {439, 87}} {0, 0} @@ -9264,14 +9297,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{363, 12}, {96, 32}} + {{362, 13}, {96, 28}} YES 67239424 - 134217728 + 134348800 Add - + -2038284033 129 @@ -9284,14 +9317,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 268 - {{267, 12}, {96, 32}} + {{266, 13}, {96, 28}} YES 67239424 - 134217728 + 134348800 Cancel - + -2038284033 129 @@ -9301,40 +9334,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 25 - - - 268 - {{17, 199}, {120, 17}} - - YES - - 68288064 - 71304192 - Table - - - - - - - - - 268 - {{17, 169}, {120, 17}} - - YES - - 68288064 - 71304192 - Column - - - - - - - {473, 314} + {473, 295} + {{0, 0}, {1440, 878}} {3.40282e+38, 3.40282e+38} @@ -20456,8 +20458,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - - @@ -20491,42 +20491,16 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 - - 5608 - - - YES - - - - - - 5609 - - - - - 5642 - - - YES - - - - - - 5643 - - - 5652 YES - + + + @@ -20882,6 +20856,34 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8 + + 5608 + + + YES + + + + + + 5609 + + + + + 5642 + + + YES + + + + + + 5643 + + + @@ -23863,9 +23865,9 @@ aGUgYWN0aXZlIHNlbGVjdGlvbiAo4oyl4oyYUik com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{191, 539}, {473, 314}} + {{191, 558}, {473, 295}} com.apple.InterfaceBuilder.CocoaPlugin - {{191, 539}, {473, 314}} + {{191, 558}, {473, 295}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin diff --git a/Source/TableRelations.m b/Source/TableRelations.m index 322ab4e1..8bd204cb 100644 --- a/Source/TableRelations.m +++ b/Source/TableRelations.m @@ -80,6 +80,7 @@ */ - (IBAction)closeRelationSheet:(id)sender { + // 0 = success, [NSApp stopModalWithCode:0]; } @@ -136,6 +137,8 @@ NSDictionary *info = [tableDataInstance informationForTable:table]; NSArray *cols = [info objectForKey:@"columns"]; NSMutableArray *colNames = [[NSMutableArray alloc] init]; + // TODO depending on the selected column type, it would be smart to only + // show columns that are valid to linkage. this.int -> ints only for( int i = 0; i < [cols count]; i++ ) { [colNames addObject:[[cols objectAtIndex:i] objectForKey:@"name"]]; } @@ -149,12 +152,15 @@ */ - (IBAction)addRow:(id)sender { + // TODO check that this is an INNO table + // set up the controls [tableBox setTitle:[NSString stringWithFormat:@"Table: %@",[tablesListInstance tableName] ]]; [columnSelect removeAllItems]; [columnSelect addItemsWithTitles:[tableDataInstance columnNames]]; [refTableSelect removeAllItems]; // grab only real tables + // TODO filter this so it only shows INNO tables NSArray *tables = [tablesListInstance tables]; NSArray *types = [tablesListInstance tableTypes]; NSMutableArray *validTables = [[NSMutableArray alloc] init]; -- cgit v1.2.3