diff options
author | rowanbeentje <rowan@beent.je> | 2010-06-06 14:22:24 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-06-06 14:22:24 +0000 |
commit | 24c1421cd5ff96d567a64903f4134f3364a3dd9c (patch) | |
tree | e4f8a85bf4b0019d2d2b9e302e97a25f340be9b8 | |
parent | 685b4b1787297ae3a419a57a95d4110708b5110f (diff) | |
download | sequelpro-24c1421cd5ff96d567a64903f4134f3364a3dd9c.tar.gz sequelpro-24c1421cd5ff96d567a64903f4134f3364a3dd9c.tar.bz2 sequelpro-24c1421cd5ff96d567a64903f4134f3364a3dd9c.zip |
- Exporter: SQL select/deselect all will now toggle structure/drop table if those are enabled
- Exporter: SQL export now correctly excludes structure/drop table if the global structure/drop toggles are disabled
- Exporter: Save exporter window size
-rw-r--r-- | Interfaces/English.lproj/ExportDialog.xib | 29 | ||||
-rw-r--r-- | Source/SPExportController.m | 19 | ||||
-rw-r--r-- | Source/SPExportInitializer.m | 9 |
3 files changed, 41 insertions, 16 deletions
diff --git a/Interfaces/English.lproj/ExportDialog.xib b/Interfaces/English.lproj/ExportDialog.xib index 4b97d410..9dbedacf 100644 --- a/Interfaces/English.lproj/ExportDialog.xib +++ b/Interfaces/English.lproj/ExportDialog.xib @@ -2,7 +2,7 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10D573</string> + <string key="IBDocument.SystemVersion">10D2094</string> <string key="IBDocument.InterfaceBuilderVersion">762</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">460.00</string> @@ -21,12 +21,12 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="78"/> + <integer value="1"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>com.brandonwalkin.BWToolkit</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.brandonwalkin.BWToolkit</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -182,7 +182,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSWindowContentMinSize">{450, 462}</string> <object class="NSView" key="NSWindowView" id="13817034"> <reference key="NSNextResponder"/> @@ -267,7 +267,7 @@ <string key="NSColorName">controlBackgroundColor</string> <object class="NSColor" key="NSColor" id="1056664274"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> </object> </object> <object class="NSColor" key="NSTextColor" id="804867667"> @@ -2165,7 +2165,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{450, 539}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSFrameAutosaveName">SPExportWindow</string> </object> <object class="NSCustomView" id="673454061"> <nil key="NSNextResponder"/> @@ -2309,7 +2310,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSWindowContentMinSize">{213, 50}</string> <object class="NSView" key="NSWindowView" id="217849587"> <nil key="NSNextResponder"/> @@ -2433,7 +2434,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{213, 72}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> </object> <object class="NSWindowTemplate" id="172544148"> <int key="NSWindowStyleMask">9</int> @@ -2445,7 +2446,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="487307915"> <nil key="NSNextResponder"/> @@ -2632,7 +2633,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> @@ -5082,21 +5083,21 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> - <string key="minorKey">Source/CMImageView.h</string> + <string key="minorKey">Source/SPConnectionController.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/SPConnectionController.h</string> + <string key="minorKey">Source/SPContentFilterManager.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/SPContentFilterManager.h</string> + <string key="minorKey">Source/SPImageView.h</string> </object> </object> <object class="IBPartialClassDescription"> @@ -5128,7 +5129,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> - <string key="minorKey">Source/TablesList.h</string> + <string key="minorKey">Source/SPTablesList.h</string> </object> </object> <object class="IBPartialClassDescription"> diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 3b42104c..cb972551 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -448,12 +448,27 @@ * Selects or de-selects all tables. */ - (IBAction)selectDeselectAllTables:(id)sender -{ +{ + BOOL toggleStructure = NO; + BOOL toggleDropTable = NO; + [self refreshTableList:self]; - + + // Determine whether the structure and drop items should also be toggled + for (NSToolbarItem *item in [exportToolbar items]) + { + if ([[item itemIdentifier] isEqualToString:[exportToolbar selectedItemIdentifier]] && [item tag] == SPSQLExport) { + if ([exportSQLIncludeStructureCheck state] == NSOnState) toggleStructure = YES; + if ([exportSQLIncludeDropSyntaxCheck state] == NSOnState) toggleDropTable = YES; + break; + } + } + for (NSMutableArray *table in tables) { + if (toggleStructure) [table replaceObjectAtIndex:1 withObject:[NSNumber numberWithBool:[sender tag]]]; [table replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:[sender tag]]]; + if (toggleDropTable) [table replaceObjectAtIndex:3 withObject:[NSNumber numberWithBool:[sender tag]]]; } [exportTableList reloadData]; diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 1d128e91..ce894628 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -88,6 +88,15 @@ { if (exportType == SPSQLExport) { if ([[table objectAtIndex:1] boolValue] || [[table objectAtIndex:2] boolValue] || [[table objectAtIndex:3] boolValue]) { + + // Check the overall export settings + if ([[table objectAtIndex:1] boolValue] && [exportSQLIncludeStructureCheck state] == NSOffState) + [table replaceObjectAtIndex:1 withObject:[NSNumber numberWithBool:NO]]; + if ([[table objectAtIndex:2] boolValue] && [exportSQLIncludeContentCheck state] == NSOffState) + [table replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:NO]]; + if ([[table objectAtIndex:3] boolValue] && [exportSQLIncludeDropSyntaxCheck state] == NSOffState) + [table replaceObjectAtIndex:3 withObject:[NSNumber numberWithBool:NO]]; + [exportTables addObject:table]; } } |