aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPQueryFavoriteManager.h11
-rw-r--r--Source/SPQueryFavoriteManager.m57
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
/**