aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.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/SPQueryFavoriteManager.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/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index dc1cfdcf..a1b1a080 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -120,7 +120,7 @@
[self _initWithNoSelection];
// Register drag types
- [favoritesTableView registerForDraggedTypes:[NSArray arrayWithObject:QUERY_FAVORITES_PB_DRAG_TYPE]];
+ [favoritesTableView registerForDraggedTypes:[NSArray arrayWithObject:SPFavoritesPasteboardDragType]];
[favoritesArrayController setContent:favorites];
[favoritesTableView reloadData];
@@ -288,7 +288,7 @@
{
NSSavePanel *panel = [NSSavePanel savePanel];
- [panel setRequiredFileType:DEFAULT_QUERY_FAVORITE_FILE_EXTENSION];
+ [panel setRequiredFileType:SPFileExtensionSQL];
[panel setExtensionHidden:NO];
[panel setAllowsOtherFileTypes:YES];
@@ -306,7 +306,7 @@
{
NSSavePanel *panel = [NSSavePanel savePanel];
- [panel setRequiredFileType:DEFAULT_SEQUEL_PRO_FILE_EXTENSION];
+ [panel setRequiredFileType:SPFileExtensionDefault];
[panel setExtensionHidden:NO];
[panel setAllowsOtherFileTypes:NO];
@@ -571,7 +571,7 @@
// Up to now only one row can be dragged
// if ([rows count] == 1) {
- NSArray *pboardTypes = [NSArray arrayWithObject:QUERY_FAVORITES_PB_DRAG_TYPE];
+ NSArray *pboardTypes = [NSArray arrayWithObject:SPFavoritesPasteboardDragType];
NSInteger originalRow = [[rows objectAtIndex:0] intValue];
if(originalRow < 1) return NO;
@@ -585,7 +585,7 @@
NSKeyedArchiver *archiver = [[[NSKeyedArchiver alloc] initForWritingWithMutableData:indexdata] autorelease];
[archiver encodeObject:rows forKey:@"indexdata"];
[archiver finishEncoding];
- [pboard setData:indexdata forType:QUERY_FAVORITES_PB_DRAG_TYPE];
+ [pboard setData:indexdata forType:SPFavoritesPasteboardDragType];
return YES;
@@ -602,7 +602,7 @@
NSArray *pboardTypes = [[info draggingPasteboard] types];
if (([pboardTypes count] > 1) && (row != -1)) {
- if (([pboardTypes containsObject:QUERY_FAVORITES_PB_DRAG_TYPE]) && (operation == NSTableViewDropAbove)) {
+ if (([pboardTypes containsObject:SPFavoritesPasteboardDragType]) && (operation == NSTableViewDropAbove)) {
if (row > 0) {
return NSDragOperationMove;
}
@@ -621,7 +621,7 @@
if(row < 1) return NO;
- NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:QUERY_FAVORITES_PB_DRAG_TYPE]] autorelease];
+ NSKeyedUnarchiver *unarchiver = [[[NSKeyedUnarchiver alloc] initForReadingWithData:[[info draggingPasteboard] dataForType:SPFavoritesPasteboardDragType]] autorelease];
NSArray *draggedRows = [NSArray arrayWithArray:(NSArray *)[unarchiver decodeObjectForKey:@"indexdata"]];
[unarchiver finishDecoding];