aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-12-18 20:19:03 +0000
committerstuconnolly <stuart02@gmail.com>2009-12-18 20:19:03 +0000
commit9ed7bc2eaa45f6c06477d37ccf206575e06f2187 (patch)
tree60cb6dc91a5b6b29f116f29103a3266f7e3f3c7a /Source/SPQueryFavoriteManager.m
parente895f8dcba0784e2fee9ba855ee0de12e8deaefb (diff)
downloadsequelpro-9ed7bc2eaa45f6c06477d37ccf206575e06f2187.tar.gz
sequelpro-9ed7bc2eaa45f6c06477d37ccf206575e06f2187.tar.bz2
sequelpro-9ed7bc2eaa45f6c06477d37ccf206575e06f2187.zip
Random source tidy up changes.
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m9
1 files changed, 4 insertions, 5 deletions
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];
-
}
/**