diff options
author | stuconnolly <stuart02@gmail.com> | 2009-08-26 02:24:30 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-08-26 02:24:30 +0000 |
commit | 91353b0b04f55c467af3b221e72816cabdf22d70 (patch) | |
tree | cc5c3d7e916a4780069c09e234c8a527f18a8e7a | |
parent | 86085ceb7de7772dd3f85fb61f397e240b4a0e66 (diff) | |
download | sequelpro-91353b0b04f55c467af3b221e72816cabdf22d70.tar.gz sequelpro-91353b0b04f55c467af3b221e72816cabdf22d70.tar.bz2 sequelpro-91353b0b04f55c467af3b221e72816cabdf22d70.zip |
Remove unused methods.
-rw-r--r-- | Source/SPQueryFavoriteManager.h | 11 | ||||
-rw-r--r-- | Source/SPQueryFavoriteManager.m | 57 |
2 files changed, 0 insertions, 68 deletions
diff --git a/Source/SPQueryFavoriteManager.h b/Source/SPQueryFavoriteManager.h index bc0d7e2d..c4305d3c 100644 --- a/Source/SPQueryFavoriteManager.h +++ b/Source/SPQueryFavoriteManager.h @@ -25,13 +25,6 @@ #import <Cocoa/Cocoa.h> -// Query favorite addition constants -typedef enum { - SPQueryFavoriteAdded = 0, - SPQueryFavoriteIsBlank = 1, - SPQueryFavoriteExists = 2 -} SPQueryFavoriteAddition; - @interface NSObject (SPQueryFavoriteManagerDelegate) - (void)queryFavoritesHaveBeenUpdated:(id)manager; @@ -67,8 +60,4 @@ typedef enum { - (IBAction)saveFavoriteToFile:(id)sender; - (IBAction)closeQueryManagerSheet:(id)sender; -// Favorite methods -- (NSString *)queryFavoriteAtIndex:(NSInteger)index; -- (SPQueryFavoriteAddition)addQueryToFavorites:(NSString *)query; - @end diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index ee4f8c56..39cae4e1 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -201,48 +201,6 @@ } #pragma mark - -#pragma mark Favorite methods - -/** - * Returns the query favorite at the supplied index. - */ -- (NSString *)queryFavoriteAtIndex:(NSInteger)index -{ - return [[[queryFavoritesController arrangedObjects] objectAtIndex:index] objectForKey:@"query"]; -} - -/** - * Adds the supplied query the user's favorites. - */ -- (SPQueryFavoriteAddition)addQueryToFavorites:(NSString *)query -{ - if ([query isEqualToString:@""]) return SPQueryFavoriteIsBlank; - - // Check that the favorite doesn't already exist - for (NSDictionary *favorite in [queryFavoritesController arrangedObjects]) - { - if ([[favorite objectForKey:@"query"] isEqualToString:query]) { - return SPQueryFavoriteExists; - } - } - - NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"test", query, nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]; - - [queryFavoritesController addObject:favorite]; - [queryFavoritesController setSelectionIndex:([[queryFavoritesController arrangedObjects] count] - 1)]; - - [favoritesTableView reloadData]; - [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]]; - - // Inform the delegate that the query favorites have been updated - if (delegateRespondsToFavoriteUpdates) { - [delegate queryFavoritesHaveBeenUpdated:self]; - } - - return SPQueryFavoriteAdded; -} - -#pragma mark - #pragma mark SplitView delegate methods /** @@ -281,21 +239,6 @@ } #pragma mark - -#pragma mark TableView delegate methods - -/** - * Called whenever the user's changes the currently selected favorite. - */ -/*- (void)tableViewSelectionDidChange:(NSNotification *)notification -{ - [favoriteQueryTextView setString:@""]; - - if ([favoritesTableView numberOfSelectedRows] == 1) { - [favoriteQueryTextView setString:[[[queryFavoritesController arrangedObjects] objectAtIndex:[favoritesTableView selectedRow]] objectForKey:@"query"]]; - } -}*/ - -#pragma mark - #pragma mark Menu validation /** |