aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-14 16:19:03 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-14 16:19:03 +0000
commit0f686109377b858a3a22987727f71d9f92ac3410 (patch)
tree04676f9e62c4756138a907c0c81bf4e8abaa93aa /Source
parentbd4ef6874d0037ee85f25e6aeb9c4c5e4c361baa (diff)
downloadsequelpro-0f686109377b858a3a22987727f71d9f92ac3410.tar.gz
sequelpro-0f686109377b858a3a22987727f71d9f92ac3410.tar.bz2
sequelpro-0f686109377b858a3a22987727f71d9f92ac3410.zip
• CSV Import Field Mapper
- added to table target popup menu "Refresh List" menu item, since the user can add/change a table in an other connection window
Diffstat (limited to 'Source')
-rw-r--r--Source/SPFieldMapperController.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index a33d6300..9483161b 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -90,6 +90,8 @@
[tableTargetPopup removeAllItems];
if([[theDelegate valueForKeyPath:@"tablesListInstance"] allTableNames]) {
[tableTargetPopup addItemsWithTitles:[[theDelegate valueForKeyPath:@"tablesListInstance"] allTableNames]];
+ [[tableTargetPopup menu] addItem:[NSMenuItem separatorItem]];
+ [tableTargetPopup addItemWithTitle:NSLocalizedString(@"Refresh List", @"refresh list menu item")];
// Select either the currently selected table, or the first item in the list
if ([[theDelegate valueForKeyPath:@"tableDocumentInstance"] table] != nil && ![[[theDelegate valueForKeyPath:@"tablesListInstance"] tableName] isEqualToString:@""]) {
@@ -275,6 +277,19 @@
- (IBAction)changeTableTarget:(id)sender
{
+ // Is Refresh List chosen?
+ if([tableTargetPopup selectedItem] == [tableTargetPopup lastItem]) {
+ [tableTargetPopup removeAllItems];
+ // Update tables list
+ [[theDelegate valueForKeyPath:@"tablesListInstance"] updateTables:nil];
+ if([[theDelegate valueForKeyPath:@"tablesListInstance"] allTableNames]) {
+ [tableTargetPopup addItemsWithTitles:[[theDelegate valueForKeyPath:@"tablesListInstance"] allTableNames]];
+ [[tableTargetPopup menu] addItem:[NSMenuItem separatorItem]];
+ [tableTargetPopup addItemWithTitle:NSLocalizedString(@"Refresh List", @"refresh list menu item")];
+ }
+ return;
+ }
+
NSInteger i;
// Remove all the current columns