From 91353b0b04f55c467af3b221e72816cabdf22d70 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 26 Aug 2009 02:24:30 +0000 Subject: Remove unused methods. --- Source/SPQueryFavoriteManager.h | 11 -------- Source/SPQueryFavoriteManager.m | 57 ----------------------------------------- 2 files changed, 68 deletions(-) (limited to 'Source') 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 -// 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 @@ -200,48 +200,6 @@ [[self window] orderOut:self]; } -#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 @@ -280,21 +238,6 @@ return [[[queryFavoritesController arrangedObjects] objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]]; } -#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 -- cgit v1.2.3