aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-08-15 15:03:19 +0000
committerBibiko <bibiko@eva.mpg.de>2010-08-15 15:03:19 +0000
commit561fad23dfb635f76878c580ce4c132c15614276 (patch)
tree2674b171a325a01b4b57e5f7eb2b953cf4f81141 /Source
parent5dc4311e9a135ba86b57972240db8ee25b5e77bd (diff)
downloadsequelpro-561fad23dfb635f76878c580ce4c132c15614276.tar.gz
sequelpro-561fad23dfb635f76878c580ce4c132c15614276.tar.bz2
sequelpro-561fad23dfb635f76878c580ce4c132c15614276.zip
• forgotten to commit missing changes to commit 2534
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTablesList.h1
-rw-r--r--Source/SPTablesList.m14
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h
index d85235ab..5b20c270 100644
--- a/Source/SPTablesList.h
+++ b/Source/SPTablesList.h
@@ -127,6 +127,7 @@
// Getters
- (NSArray *)selectedTableNames;
- (NSArray *)selectedTableItems;
+- (NSArray *)selectedTableTypes;
- (NSString *)tableName;
- (NSInteger)tableType;
- (NSArray *)tables;
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index bd428cbf..bd3d82b6 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -1108,6 +1108,20 @@
return selTables;
}
+- (NSArray *)selectedTableTypes
+{
+ NSIndexSet *indexes = [tablesListView selectedRowIndexes];
+
+ NSUInteger currentIndex = [indexes firstIndex];
+ NSMutableArray *selTables = [NSMutableArray array];
+
+ while (currentIndex != NSNotFound) {
+ [selTables addObject:[filteredTableTypes objectAtIndex:currentIndex]];
+ currentIndex = [indexes indexGreaterThanIndex:currentIndex];
+ }
+ return selTables;
+}
+
/**
* Returns the currently selected table or nil if no table or mulitple tables are selected
*/