aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContentDataSource.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-08-15 10:47:43 +0000
committerstuconnolly <stuart02@gmail.com>2012-08-15 10:47:43 +0000
commit097676f7aaf6a95229fe5c57715e19716af57221 (patch)
tree707b647e339b84b62c9f264f0b2b0caa8c0b548c /Source/SPTableContentDataSource.m
parenta3ccba044ae0f73c4d79ce4ad8c8dd9374a1ad62 (diff)
downloadsequelpro-097676f7aaf6a95229fe5c57715e19716af57221.tar.gz
sequelpro-097676f7aaf6a95229fe5c57715e19716af57221.tar.bz2
sequelpro-097676f7aaf6a95229fe5c57715e19716af57221.zip
Move table content filter logic to it's own file.
Diffstat (limited to 'Source/SPTableContentDataSource.m')
-rw-r--r--Source/SPTableContentDataSource.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/SPTableContentDataSource.m b/Source/SPTableContentDataSource.m
index 484df453..21743464 100644
--- a/Source/SPTableContentDataSource.m
+++ b/Source/SPTableContentDataSource.m
@@ -31,6 +31,7 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPTableContentDataSource.h"
+#import "SPTableContentFilter.h"
#import "SPDataStorage.h"
#import "SPCopyTable.h"
#import "SPTablesList.h"
@@ -47,7 +48,7 @@
{
#ifndef SP_REFACTOR
if (tableView == filterTableView) {
- return filterTableIsSwapped ? [filterTableData count] : [[[filterTableData objectForKey:@"0"] objectForKey:@"filter"] count];
+ return filterTableIsSwapped ? [filterTableData count] : [[[filterTableData objectForKey:@"0"] objectForKey:SPTableContentFilterKey] count];
}
else
#endif
@@ -69,10 +70,10 @@
return [[[NSTableHeaderCell alloc] initTextCell:[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"name"]] autorelease];
}
else {
- return NSArrayObjectAtIndex([[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"], [[tableColumn identifier] integerValue] - 1);
+ return NSArrayObjectAtIndex([[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:SPTableContentFilterKey], [[tableColumn identifier] integerValue] - 1);
}
else {
- return NSArrayObjectAtIndex([[filterTableData objectForKey:[tableColumn identifier]] objectForKey:@"filter"], rowIndex);
+ return NSArrayObjectAtIndex([[filterTableData objectForKey:[tableColumn identifier]] objectForKey:SPTableContentFilterKey], rowIndex);
}
}
else
@@ -124,10 +125,10 @@
#ifndef SP_REFACTOR
if(tableView == filterTableView) {
if (filterTableIsSwapped) {
- [[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"] replaceObjectAtIndex:([[tableColumn identifier] integerValue] - 1) withObject:(NSString *)object];
+ [[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:SPTableContentFilterKey] replaceObjectAtIndex:([[tableColumn identifier] integerValue] - 1) withObject:(NSString *)object];
}
else {
- [[[filterTableData objectForKey:[tableColumn identifier]] objectForKey:@"filter"] replaceObjectAtIndex:rowIndex withObject:(NSString *)object];
+ [[[filterTableData objectForKey:[tableColumn identifier]] objectForKey:SPTableContentFilterKey] replaceObjectAtIndex:rowIndex withObject:(NSString *)object];
}
[self updateFilterTableClause:nil];