aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DataMigrationDialog.xib30
-rw-r--r--Source/SPTableData.m3
-rw-r--r--Source/TablesList.m5
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj12
4 files changed, 32 insertions, 18 deletions
diff --git a/Interfaces/English.lproj/DataMigrationDialog.xib b/Interfaces/English.lproj/DataMigrationDialog.xib
index cbf5312e..6cd0376a 100644
--- a/Interfaces/English.lproj/DataMigrationDialog.xib
+++ b/Interfaces/English.lproj/DataMigrationDialog.xib
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="42"/>
+ <integer value="11"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -44,7 +44,7 @@
<string key="NSWindowRect">{{262, 452}, {465, 311}}</string>
<int key="NSWTFlags">1886912512</int>
<string key="NSWindowTitle">CSV Field Mapping</string>
- <string key="NSWindowClass">NSWindow</string>
+ <string key="NSWindowClass">NSPanel</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
@@ -813,14 +813,6 @@
<int key="connectionID">72</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">fieldMapperView</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="420604405"/>
- </object>
- <int key="connectionID">73</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">closeSheet:</string>
<reference key="source" ref="1003"/>
@@ -836,6 +828,14 @@
</object>
<int key="connectionID">75</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="420604405"/>
+ </object>
+ <int key="connectionID">76</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1281,9 +1281,9 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{210, 424}, {465, 311}}</string>
+ <string>{{173, 307}, {465, 311}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{210, 424}, {465, 311}}</string>
+ <string>{{173, 307}, {465, 311}}</string>
<integer value="1"/>
<string>{{387, 725}, {432, 282}}</string>
<integer value="0"/>
@@ -1366,7 +1366,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">75</int>
+ <int key="maxID">76</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1566,7 +1566,6 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>changeImportMethod:</string>
<string>changeTableTarget:</string>
- <string>closeSheet:</string>
<string>stepRow:</string>
</object>
<object class="NSMutableArray" key="dict.values">
@@ -1574,7 +1573,6 @@
<string>id</string>
<string>id</string>
<string>id</string>
- <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -1582,13 +1580,13 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>fieldMapperTableView</string>
- <string>fieldMapperView</string>
<string>fileSourcePath</string>
<string>importMethodPopup</string>
<string>recordCountLabel</string>
<string>rowDownButton</string>
<string>rowUpButton</string>
<string>tableTargetPopup</string>
+ <string>theDelegate</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 965ec042..520e0b25 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -338,7 +338,8 @@
tableName, [mySQLConnection getLastErrorMessage]]);
// If the current table doesn't exist anymore reload table list
if([mySQLConnection getLastErrorID] == 1146) {
- [tableListInstance updateTables:nil];
+ [[tableListInstance valueForKeyPath:@"tablesListView"] deselectAll:nil];
+ [tableListInstance updateTables:self];
}
}
diff --git a/Source/TablesList.m b/Source/TablesList.m
index a81c6d75..2a9a7657 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -221,7 +221,10 @@
[tablesListView reloadData];
// if the previous selected table still exists, select it
- if( previousSelectedTable != nil && [tables indexOfObject:previousSelectedTable] < [tables count]) {
+ // but not if the update was called from SPTableData since it calls that method
+ // if a selected table doesn't exist - this happens if a table was deleted/renamed by an other user
+ // or if the table name contains characters which are not supported by the current set encoding
+ if( ![sender isKindOfClass:[SPTableData class]] && previousSelectedTable != nil && [tables indexOfObject:previousSelectedTable] < [tables count]) {
NSInteger itemToReselect = [tables indexOfObject:previousSelectedTable];
tableListIsSelectable = YES;
[tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:itemToReselect] byExtendingSelection:NO];
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index f0ec9f46..53772a50 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -228,6 +228,7 @@
BC29C37F10501EFD00DD6C6E /* SPQueryController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC29C37E10501EFD00DD6C6E /* SPQueryController.m */; };
BC2C16D40FEBEDF10003993B /* SPDataAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2C16D30FEBEDF10003993B /* SPDataAdditions.m */; };
BC2C8E220FA8C2DB008468C7 /* sequel-pro-mysql-help-template.html in Resources */ = {isa = PBXBuildFile; fileRef = BC2C8E210FA8C2DB008468C7 /* sequel-pro-mysql-help-template.html */; };
+ BC30C011111C98BD002701C9 /* DataMigrationDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC30C00F111C98BD002701C9 /* DataMigrationDialog.xib */; };
BC5AD7FF10FB262F008769E3 /* field-small-square.tiff in Resources */ = {isa = PBXBuildFile; fileRef = BC5AD7FE10FB262F008769E3 /* field-small-square.tiff */; };
BC65C3B2107CE3EE003F7B02 /* ImportAccessory.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC65C3B0107CE3EE003F7B02 /* ImportAccessory.xib */; };
BC675A141072039C00C5ACD4 /* SPContentFilterManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC675A131072039C00C5ACD4 /* SPContentFilterManager.m */; };
@@ -630,6 +631,7 @@
BC2C16D20FEBEDF10003993B /* SPDataAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDataAdditions.h; sourceTree = "<group>"; };
BC2C16D30FEBEDF10003993B /* SPDataAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDataAdditions.m; sourceTree = "<group>"; };
BC2C8E210FA8C2DB008468C7 /* sequel-pro-mysql-help-template.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "sequel-pro-mysql-help-template.html"; sourceTree = "<group>"; };
+ BC30C010111C98BD002701C9 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/DataMigrationDialog.xib; sourceTree = "<group>"; };
BC5AD7FE10FB262F008769E3 /* field-small-square.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = "field-small-square.tiff"; sourceTree = "<group>"; };
BC65C3B1107CE3EE003F7B02 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/ImportAccessory.xib; sourceTree = "<group>"; };
BC675A121072039C00C5ACD4 /* SPContentFilterManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPContentFilterManager.h; sourceTree = "<group>"; };
@@ -1259,6 +1261,7 @@
17E642050EF020A3001BC333 /* Interfaces */ = {
isa = PBXGroup;
children = (
+ BC30C00F111C98BD002701C9 /* DataMigrationDialog.xib */,
17CC97F510B4AC6C0034CD7A /* AboutPanel.xib */,
BC65C3B0107CE3EE003F7B02 /* ImportAccessory.xib */,
BC675A15107203BA00C5ACD4 /* ContentFilterManager.xib */,
@@ -1657,6 +1660,7 @@
58C4593810D0674D00E6E13E /* spficon.icns in Resources */,
58C4593910D0674E00E6E13E /* sqlicon.icns in Resources */,
BC5AD7FF10FB262F008769E3 /* field-small-square.tiff in Resources */,
+ BC30C011111C98BD002701C9 /* DataMigrationDialog.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1989,6 +1993,14 @@
name = ExportDialog.xib;
sourceTree = "<group>";
};
+ BC30C00F111C98BD002701C9 /* DataMigrationDialog.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ BC30C010111C98BD002701C9 /* English */,
+ );
+ name = DataMigrationDialog.xib;
+ sourceTree = "<group>";
+ };
BC65C3B0107CE3EE003F7B02 /* ImportAccessory.xib */ = {
isa = PBXVariantGroup;
children = (