aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-08 18:14:57 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-08 18:14:57 +0000
commit4c3fd409773ae47697cf685b6b18a6570ff127d6 (patch)
tree33f22922ec58f242f1330d969ad987bebc55218b /Source
parent5a3c6c0ea57289ed20662c2651c8c7d18d347156 (diff)
downloadsequelpro-4c3fd409773ae47697cf685b6b18a6570ff127d6.tar.gz
sequelpro-4c3fd409773ae47697cf685b6b18a6570ff127d6.tar.bz2
sequelpro-4c3fd409773ae47697cf685b6b18a6570ff127d6.zip
• Favorite Query Editor
- added the possibility to insert defined placeholder via a popup button similar to Content Filter Editor to give an hint to user what's possible
Diffstat (limited to 'Source')
-rw-r--r--Source/SPQueryFavoriteManager.h1
-rw-r--r--Source/SPQueryFavoriteManager.m9
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPQueryFavoriteManager.h b/Source/SPQueryFavoriteManager.h
index 9e207356..05e822dd 100644
--- a/Source/SPQueryFavoriteManager.h
+++ b/Source/SPQueryFavoriteManager.h
@@ -70,5 +70,6 @@
- (IBAction)importFavoritesByAdding:(id)sender;
- (IBAction)importFavoritesByReplacing:(id)sender;
- (IBAction)closeQueryManagerSheet:(id)sender;
+- (IBAction)insertPlaceholder:(id)sender;
@end
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 324a4850..8014c8c5 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -340,6 +340,15 @@
}
/**
+ * Insert placeholder - the placeholder string is stored as tooltip
+ */
+- (IBAction)insertPlaceholder:(id)sender
+{
+ NSString *placeholder = [[[sender selectedItem] toolTip] substringToIndex:[[[sender selectedItem] toolTip] rangeOfString:@" – "].location];
+ [favoriteQueryTextView insertText:placeholder];
+}
+
+/**
* Closes the query favorite manager
*/
- (IBAction)closeQueryManagerSheet:(id)sender