diff options
author | stuconnolly <stuart02@gmail.com> | 2009-08-26 02:21:53 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-08-26 02:21:53 +0000 |
commit | 86085ceb7de7772dd3f85fb61f397e240b4a0e66 (patch) | |
tree | 5351e3d467288fd056a191db11c645606f2052a1 /Source/CustomQuery.h | |
parent | 7de1a9a8517c2004e6a97543fbb1462d9c32f4d1 (diff) | |
download | sequelpro-86085ceb7de7772dd3f85fb61f397e240b4a0e66.tar.gz sequelpro-86085ceb7de7772dd3f85fb61f397e240b4a0e66.tar.bz2 sequelpro-86085ceb7de7772dd3f85fb61f397e240b4a0e66.zip |
Completely redesigned query favorite manager, including:
- The ability to name query favorites
- The ability to edit query favorites using the same editor in the cutom query view
- The ability to save your query favorites to a file
Note that any already saved query favorites will be upgraded to accommodate the new format, that is including a name associated with the query. The default name is the first 32 chars of the query with '...' appended.
Also, added menu item validation to the 'Save Query to Favorites' menu item.
Diffstat (limited to 'Source/CustomQuery.h')
-rw-r--r-- | Source/CustomQuery.h | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h index 2987efed..eae2de5c 100644 --- a/Source/CustomQuery.h +++ b/Source/CustomQuery.h @@ -33,8 +33,10 @@ #define SP_HELP_TOC_SEARCH_STRING @"contents" +@class SPQueryFavoriteManager; + @interface CustomQuery : NSObject -{ +{ IBOutlet id tableDocumentInstance; IBOutlet id tableWindow; IBOutlet id queryFavoritesButton; @@ -45,10 +47,6 @@ IBOutlet id affectedRowsText; IBOutlet id valueSheet; IBOutlet id valueTextField; - IBOutlet id queryFavoritesSheet; - IBOutlet id queryFavoritesView; - IBOutlet id removeQueryFavoriteButton; - IBOutlet id copyQueryFavoriteButton; IBOutlet id runSelectionButton; IBOutlet id runAllButton; IBOutlet id multipleLineEditingButton; @@ -66,17 +64,20 @@ IBOutlet NSMenuItem *commentCurrentQueryMenuItem; IBOutlet NSMenuItem *commentLineOrSelectionMenuItem; + IBOutlet NSWindow *queryFavoritesSheet; + IBOutlet NSButton *saveQueryFavoriteButton; + IBOutlet NSTextField *queryFavoriteNameTextField; + IBOutlet NSWindow *helpWebViewWindow; IBOutlet WebView *helpWebView; IBOutlet NSSearchField *helpSearchField; IBOutlet NSSearchFieldCell *helpSearchFieldCell; IBOutlet NSSegmentedControl *helpNavigator; IBOutlet NSSegmentedControl *helpTargetSelector; - + + SPQueryFavoriteManager *favoritesManager; NSUserDefaults *prefs; - NSMutableArray *queryFavorites; - MCPConnection *mySQLConnection; NSString *usedQuery; @@ -103,7 +104,6 @@ NSString *fieldIDQueryString; unsigned int numberOfQueries; - } // IBAction methods @@ -123,12 +123,6 @@ - (IBAction)helpSelectHelpTargetPage:(id)sender; - (IBAction)helpSelectHelpTargetWeb:(id)sender; -// queryFavoritesSheet methods -- (IBAction)addQueryFavorite:(id)sender; -- (IBAction)removeQueryFavorite:(id)sender; -- (IBAction)copyQueryFavorite:(id)sender; -- (IBAction)closeQueryFavoritesSheet:(id)sender; - // Query actions - (void)performQueries:(NSArray *)queries; - (NSString *)queryAtPosition:(long)position lookBehind:(BOOL *)doLookBehind; @@ -149,7 +143,6 @@ // Other - (void)setConnection:(MCPConnection *)theConnection; -- (void)setFavorites; - (void)doPerformQueryService:(NSString *)query; - (void)doPerformLoadQueryService:(NSString *)query; - (void)selectCurrentQuery; |