aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-17 15:54:12 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-17 15:54:12 +0000
commit299e8821edf9a1705a556c482a2a0ea4d6f9a0a8 (patch)
treec5f262a1b0920c796283dd008c2679396ab4cd66
parent9e3ee6a65342adb3c30ee744c95467e469d17f96 (diff)
downloadsequelpro-299e8821edf9a1705a556c482a2a0ea4d6f9a0a8.tar.gz
sequelpro-299e8821edf9a1705a556c482a2a0ea4d6f9a0a8.tar.bz2
sequelpro-299e8821edf9a1705a556c482a2a0ea4d6f9a0a8.zip
• TableDump
- introduced new method: - (void)showErrorSheetWithMessage:(NSString*)message to unify it and made all error sheets doc-modal (not app-modal) - Close button of the errorSheet now also listens at ESC
-rw-r--r--Interfaces/English.lproj/DBView.xib89
-rw-r--r--Source/TableDump.h1
-rw-r--r--Source/TableDump.m42
3 files changed, 92 insertions, 40 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index 70e6c534..bb40fa8e 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -24,7 +24,7 @@
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="6766"/>
- <integer value="6698"/>
+ <integer value="960"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -63,7 +63,7 @@
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{780, 480}</string>
<object class="NSView" key="NSWindowView" id="579726586">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2892,7 +2892,7 @@
<object class="NSTabViewItem" id="105987292">
<string key="NSIdentifier">customQuery</string>
<object class="NSView" key="NSView" id="746504912">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="714795046"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3799,6 +3799,7 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {706, 544}}</string>
+ <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Custom Query</string>
<reference key="NSColor" ref="62854682"/>
@@ -4845,7 +4846,7 @@
<object class="NSTabViewItem" id="75945221">
<string key="NSIdentifier">triggers</string>
<object class="NSView" key="NSView" id="776303855">
- <reference key="NSNextResponder" ref="714795046"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -5278,21 +5279,20 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {706, 544}}</string>
- <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Triggers</string>
<reference key="NSColor" ref="62854682"/>
<reference key="NSTabView" ref="714795046"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="75945221"/>
+ <reference key="NSSelectedTabViewItem" ref="105987292"/>
<reference key="NSFont" ref="26"/>
<int key="NSTvFlags">134217731</int>
<bool key="NSAllowTruncatedLabels">YES</bool>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="776303855"/>
+ <reference ref="746504912"/>
</object>
</object>
</object>
@@ -5309,7 +5309,6 @@
</object>
</object>
<string key="NSFrameSize">{944, 550}</string>
- <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{780, 502}</string>
@@ -8373,7 +8372,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="860968037">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -8501,7 +8500,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="693776804">
<int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">138018816</int>
+ <int key="NSCellFlags2">138051584</int>
<string key="NSContents">Close</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="92950801"/>
@@ -8514,8 +8513,30 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
+ <object class="NSButton" id="582401750">
+ <reference key="NSNextResponder" ref="860968037"/>
+ <int key="NSvFlags">257</int>
+ <string key="NSFrame">{{350, -130}, {80, 28}}</string>
+ <reference key="NSSuperview" ref="860968037"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="725784088">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">138051584</int>
+ <string key="NSContents">Close</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="582401750"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">1</int>
+ <reference key="NSAlternateImage" ref="932958253"/>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{405, 267}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{213, 129}</string>
@@ -15264,6 +15285,22 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">6812</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">initialFirstResponder</string>
+ <reference key="source" ref="466147946"/>
+ <reference key="destination" ref="92950801"/>
+ </object>
+ <int key="connectionID">6813</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">closeSheet:</string>
+ <reference key="source" ref="225526897"/>
+ <reference key="destination" ref="582401750"/>
+ </object>
+ <int key="connectionID">6816</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -15909,6 +15946,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="413713602"/>
<reference ref="92950801"/>
<reference ref="972781700"/>
+ <reference ref="582401750"/>
</object>
<reference key="parent" ref="466147946"/>
</object>
@@ -21540,6 +21578,21 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="442324996"/>
<reference key="parent" ref="497835077"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6814</int>
+ <reference key="object" ref="582401750"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="725784088"/>
+ </object>
+ <reference key="parent" ref="860968037"/>
+ <string key="objectName">Push Button (Close Dummy for ESC)</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6815</int>
+ <reference key="object" ref="725784088"/>
+ <reference key="parent" ref="582401750"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -22859,6 +22912,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>6793.IBPluginDependency</string>
<string>6794.IBPluginDependency</string>
<string>68.ImportedFromIB2</string>
+ <string>6814.IBPluginDependency</string>
+ <string>6814.ImportedFromIB2</string>
+ <string>6815.IBPluginDependency</string>
<string>69.ImportedFromIB2</string>
<string>711.IBPluginDependency</string>
<string>711.ImportedFromIB2</string>
@@ -24726,9 +24782,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{492, 178}, {329, 348}}</string>
+ <string>{{423, 178}, {329, 348}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{492, 178}, {329, 348}}</string>
+ <string>{{423, 178}, {329, 348}}</string>
<integer value="0"/>
<boolean value="YES"/>
<string>{329, 348}</string>
@@ -24781,6 +24837,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@@ -24889,9 +24948,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{189, 360}, {405, 267}}</string>
+ <string>{{265, 611}, {405, 267}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{189, 360}, {405, 267}}</string>
+ <string>{{265, 611}, {405, 267}}</string>
<integer value="1"/>
<integer value="0"/>
<integer value="1"/>
@@ -24925,7 +24984,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6812</int>
+ <int key="maxID">6816</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/Source/TableDump.h b/Source/TableDump.h
index 3db8c908..8054bf06 100644
--- a/Source/TableDump.h
+++ b/Source/TableDump.h
@@ -162,6 +162,7 @@ typedef enum _SPExportModes {
// Additional methods
- (void)setConnection:(MCPConnection *)theConnection;
+- (void)showErrorSheetWithMessage:(NSString*)message;
// Import/export delegate notifications
- (void)panelSelectionDidChange:(id)sender;
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 4854aad3..2a39aca5 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -113,7 +113,8 @@
*/
- (IBAction)closeSheet:(id)sender
{
- [NSApp stopModalWithCode:[sender tag]];
+ [NSApp endSheet:[sender window] returnCode:[sender tag]];
+ [[sender window] orderOut:self];
}
/**
@@ -734,11 +735,7 @@
// Display any errors
if ([errors length]) {
- [errorsView setString:errors];
- [NSApp beginSheet:errorsSheet modalForWindow:tableWindow modalDelegate:self didEndSelector:nil contextInfo:nil];
- [NSApp runModalForWindow:errorsSheet];
- [NSApp endSheet:errorsSheet];
- [errorsSheet orderOut:nil];
+ [self showErrorSheetWithMessage:errors];
}
// Update available databases
@@ -1051,11 +1048,7 @@
// Display any errors
if ([errors length]) {
- [errorsView setString:errors];
- [NSApp beginSheet:errorsSheet modalForWindow:tableWindow modalDelegate:self didEndSelector:nil contextInfo:nil];
- [NSApp runModalForWindow:errorsSheet];
- [NSApp endSheet:errorsSheet];
- [errorsSheet orderOut:nil];
+ [self showErrorSheetWithMessage:errors];
}
// Import finished Growl notification
@@ -1741,13 +1734,7 @@
// Show errors sheet if there have been errors
if ( [errors length] ) {
- [errorsView setString:errors];
- [NSApp beginSheet:errorsSheet
- modalForWindow:tableWindow modalDelegate:self
- didEndSelector:nil contextInfo:nil];
- [NSApp runModalForWindow:errorsSheet];
- [NSApp endSheet:errorsSheet];
- [errorsSheet orderOut:nil];
+ [self showErrorSheetWithMessage:errors];
}
[tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
@@ -2556,13 +2543,7 @@
// Show the errors sheet if there have been errors
if ( [errors length] ) {
- [errorsView setString:errors];
- [NSApp beginSheet:errorsSheet
- modalForWindow:tableWindow modalDelegate:self
- didEndSelector:nil contextInfo:nil];
- [NSApp runModalForWindow:errorsSheet];
- [NSApp endSheet:errorsSheet];
- [errorsSheet orderOut:nil];
+ [self showErrorSheetWithMessage:errors];
}
[tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
@@ -2838,6 +2819,17 @@
return items;
}
+- (void)showErrorSheetWithMessage:(NSString*)message
+{
+ [errorsView setString:message];
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:tableWindow
+ modalDelegate:self
+ didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
+ contextInfo:nil];
+ [errorsSheet makeKeyWindow];
+}
+
#pragma mark -
#pragma mark New Export methods