aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldMapperController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFieldMapperController.m')
-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