From fb4490a4b59be5ea57fb156dad74c1ba97ca2d23 Mon Sep 17 00:00:00 2001 From: abhibeckert Date: Sat, 6 Sep 2008 06:31:40 +0000 Subject: implemneted favourite remove button in connect panel switched from NSArray to NSMutableArray for favourite storage now using KVO to be notified when to save favourites to NSUserDefaults no-longer block the user from having two favourites with identical data --- TableDocument.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'TableDocument.h') diff --git a/TableDocument.h b/TableDocument.h index 830dc36e..1ca4c982 100644 --- a/TableDocument.h +++ b/TableDocument.h @@ -79,7 +79,7 @@ CMMCPConnection *mySQLConnection; - NSArray *favorites; + NSMutableArray *favorites; NSArray *variables; NSString *selectedDatabase; NSString *selectedFavorite; @@ -102,7 +102,6 @@ - (id)selectedFavorite; - (NSString *)selectedFavoritePassword; - (void)connectSheetAddToFavorites:(id)sender; -- (void)connectSheetRemoveFromFavorites:(id)sender; - (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket user:(NSString *)user password:(NSString *)password port:(NSString *)port database:(NSString *)database @@ -111,6 +110,7 @@ sshUser:(NSString *)sshUser // no-longer in use sshPassword:(NSString *)sshPassword // no-longer in use sshPort:(NSString *)sshPort; // no-longer in use +- (NSMutableArray *)favorites; //alert sheets method - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo; @@ -221,3 +221,4 @@ @end extern NSString *TableDocumentFavoritesControllerSelectionIndexDidChange; +extern NSString *TableDocumentFavoritesControllerFavoritesDidChange; -- cgit v1.2.3