aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/Info.plist4
-rw-r--r--Source/CustomQuery.m12
-rw-r--r--Source/SPQueryFavoriteManager.m9
-rw-r--r--Source/SPTableRelations.h2
4 files changed, 8 insertions, 19 deletions
diff --git a/Resources/Info.plist b/Resources/Info.plist
index 9d9f8416..7fb4c728 100644
--- a/Resources/Info.plist
+++ b/Resources/Info.plist
@@ -14,7 +14,7 @@
<key>CFBundleTypeIconFile</key>
<string>spficon.icns</string>
<key>CFBundleTypeName</key>
- <string>Sequel Pro connection</string>
+ <string>Sequel Pro Connection</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>connection</string>
@@ -32,7 +32,7 @@
<key>CFBundleTypeIconFile</key>
<string>sqlicon.icns</string>
<key>CFBundleTypeName</key>
- <string>SQL file</string>
+ <string>SQL File</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>sql text</string>
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 0982e16f..4805ea45 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1219,7 +1219,6 @@
// Populate query favorites
[self queryFavoritesHaveBeenUpdated:nil];
-
// Disable runSelectionMenuItem in the gear menu
[runSelectionMenuItem setEnabled:NO];
@@ -2613,15 +2612,14 @@
* Called by the query favorites manager whenever the query favorites have been updated.
*/
- (void)queryFavoritesHaveBeenUpdated:(id)manager
-{
-
+{
NSMenuItem *headerMenuItem;
NSMenu *menu = [queryFavoritesButton menu];
// Remove all favorites beginning from the end
while([queryFavoritesButton numberOfItems] > 7)
[queryFavoritesButton removeItemAtIndex:[queryFavoritesButton numberOfItems]-1];
-
+
// Build document-based list
headerMenuItem = [[NSMenuItem alloc] initWithTitle:
[[[[tableDocumentInstance fileURL] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] lastPathComponent]
@@ -2655,9 +2653,6 @@
[menu addItem:item];
[item release];
}
-
- // [queryFavoritesSearchField setStringValue:@""];
-
}
#pragma mark -
@@ -2789,7 +2784,6 @@
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
-
// Control "Save ... to Favorites"
if ( [menuItem tag] == SP_SAVE_SELECTION_FAVORTITE_MENUITEM_TAG ) {
if ([[textView string] length] < 1) return NO;
@@ -2812,10 +2806,8 @@
}
return YES;
-
}
-
#pragma mark -
- (id)init
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 17818e87..db70e8f5 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -190,7 +190,6 @@
*/
- (IBAction)addQueryFavorite:(id)sender
{
-
NSMutableDictionary *favorite;
NSUInteger insertIndex;
@@ -198,16 +197,17 @@
[[self window] makeFirstResponder:favoriteNameTextField];
// Duplicate a selected favorite if sender == self
- if(sender == self)
+ if (sender == self)
favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[[favoriteNameTextField stringValue] stringByAppendingFormat:@" Copy"], [favoriteQueryTextView string], nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]];
// Add a new favorite
else
favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"New Favorite", @"", nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]];
- if([favoritesTableView numberOfSelectedRows] > 0) {
+ if ([favoritesTableView numberOfSelectedRows] > 0) {
insertIndex = [[favoritesTableView selectedRowIndexes] lastIndex]+1;
[favorites insertObject:favorite atIndex:insertIndex];
- } else {
+ }
+ else {
[favorites addObject:favorite];
insertIndex = [favorites count] - 1;
}
@@ -221,7 +221,6 @@
[removeButton setEnabled:([favoritesTableView numberOfSelectedRows] > 0)];
[[self window] makeFirstResponder:favoriteNameTextField];
-
}
/**
diff --git a/Source/SPTableRelations.h b/Source/SPTableRelations.h
index 66424d20..fb32fd12 100644
--- a/Source/SPTableRelations.h
+++ b/Source/SPTableRelations.h
@@ -26,8 +26,6 @@
#import <Cocoa/Cocoa.h>
#import <MCPKit/MCPKit.h>
-@class CMCopyTable;
-
@interface SPTableRelations : NSObject
{
IBOutlet id tableDocumentInstance;