aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPContentFilterManager.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-12-11 00:51:47 +0000
committerstuconnolly <stuart02@gmail.com>2009-12-11 00:51:47 +0000
commit2f490fa3f4030c71aab8a1cafd9514a3fff2c6c4 (patch)
tree122f38e3f27563dddfed944c2e100109979d68b0 /Source/SPContentFilterManager.m
parent1421e9877071c7b50ea10cdee8ba97e75a1c2604 (diff)
downloadsequelpro-2f490fa3f4030c71aab8a1cafd9514a3fff2c6c4.tar.gz
sequelpro-2f490fa3f4030c71aab8a1cafd9514a3fff2c6c4.tar.bz2
sequelpro-2f490fa3f4030c71aab8a1cafd9514a3fff2c6c4.zip
Convert a bunch of #define'd constants to extern's, including preference toolbar identifiers, pasteboard drag types and file extensions.
Diffstat (limited to 'Source/SPContentFilterManager.m')
-rw-r--r--Source/SPContentFilterManager.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index 33be5048..7af9f6bc 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -130,7 +130,7 @@
[self _initWithNoSelection];
// Register drag types
- [contentFilterTableView registerForDraggedTypes:[NSArray arrayWithObject:CONTENT_FILTER_PB_DRAG_TYPE]];
+ [contentFilterTableView registerForDraggedTypes:[NSArray arrayWithObject:SPContentFilterPasteboardDragType]];
[contentFilterArrayController setContent:contentFilters];
[contentFilterTableView reloadData];
@@ -301,7 +301,7 @@
{
NSSavePanel *panel = [NSSavePanel savePanel];
- [panel setRequiredFileType:DEFAULT_SEQUEL_PRO_FILE_EXTENSION];
+ [panel setRequiredFileType:SPFileExtensionDefault];
[panel setExtensionHidden:NO];
[panel setAllowsOtherFileTypes:NO];
@@ -322,7 +322,7 @@
[panel beginSheetForDirectory:nil
file:@""
- types:[NSArray arrayWithObjects:@"spf", nil]
+ types:[NSArray arrayWithObjects:SPFileExtensionDefault, nil]
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(importPanelDidEnd:returnCode:contextInfo:)
@@ -608,7 +608,7 @@
- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard
{
- NSArray *pboardTypes = [NSArray arrayWithObject:CONTENT_FILTER_PB_DRAG_TYPE];
+ NSArray *pboardTypes = [NSArray arrayWithObject:SPContentFilterPasteboardDragType];
NSInteger originalRow = [[rows objectAtIndex:0] intValue];
if(originalRow < 1) return NO;
@@ -622,7 +622,7 @@
NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:indexdata] autorelease];
[archiver encodeObject:rows forKey:@"indexdata"];
[archiver finishEncoding];
- [pboard setData:indexdata forType:CONTENT_FILTER_PB_DRAG_TYPE];
+ [pboard setData:indexdata forType:SPContentFilterPasteboardDragType];
return YES;
@@ -636,7 +636,7 @@
NSArray *pboardTypes = [[info draggingPasteboard] types];
if (([pboardTypes count] > 1) && (row != -1)) {
- if (([pboardTypes containsObject:CONTENT_FILTER_PB_DRAG_TYPE]) && (operation == NSTableViewDropAbove)) {
+ if (([pboardTypes containsObject:SPContentFilterPasteboardDragType]) && (operation == NSTableViewDropAbove)) {
if (row > 0) {
return NSDragOperationMove;
}
@@ -655,7 +655,7 @@
if(row < 1) return NO;
- NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:CONTENT_FILTER_PB_DRAG_TYPE]] autorelease];
+ NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:SPContentFilterPasteboardDragType]] autorelease];
NSArray *draggedRows = [NSArray arrayWithArray:(NSArray *)[unarchiver decodeObjectForKey:@"indexdata"]];
[unarchiver finishDecoding];