aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-10-01 16:35:44 +0000
committerBibiko <bibiko@eva.mpg.de>2009-10-01 16:35:44 +0000
commitcf243d99127441ce2fd3b4641427cb49ab155402 (patch)
treef06c68cc3abfe7e5fb0695b4203a683147ab83b3 /Source/SPQueryFavoriteManager.m
parent11c7eea329acef790b667a27312a09528364140c (diff)
downloadsequelpro-cf243d99127441ce2fd3b4641427cb49ab155402.tar.gz
sequelpro-cf243d99127441ce2fd3b4641427cb49ab155402.tar.bz2
sequelpro-cf243d99127441ce2fd3b4641427cb49ab155402.zip
• first implementation of a Content Filter Editor
- user-defined content filter can be saved globally (Prefs) or in SPF files - BETA - further tests are needed due to complexity - SPQueryController now handles the local user-defined content filters - tooltips are now generated automatically if not defined explicitly (incl. if $BINARY placeholder was used) • if user added local query favorites or content filters to an Untitled document and s/he wants to close it the standard sheet will be displayed (Don't Save - Cancel - Save) - due to that changed old [TableDocument displayName] to 'displaySPName' to be conform with Cocoa • changed behavior while importing query favorites - now they will append at the list (not inserted after selected row - makes more sense) • introduced to history filter dict the key 'menuLabel' which will be set to [TableContent tableFilterString] for displaying the history menu title and simplified the SPHistoryController logic for that • minor code changes
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m
index 590bf3c9..eb409500 100644
--- a/Source/SPQueryFavoriteManager.m
+++ b/Source/SPQueryFavoriteManager.m
@@ -731,17 +731,17 @@
}
if([spf objectForKey:@"queryFavorites"] && [[spf objectForKey:@"queryFavorites"] count]) {
- if([favoritesTableView numberOfSelectedRows] > 0) {
- // Insert imported queries after the last selected favorite
- NSUInteger insertIndex = [[favoritesTableView selectedRowIndexes] lastIndex] + 1;
- NSUInteger i;
- for(i=0; i<[[spf objectForKey:@"queryFavorites"] count]; i++) {
- [favorites insertObject:[[spf objectForKey:@"queryFavorites"] objectAtIndex:i] atIndex:insertIndex+i];
- }
- } else {
- // If no selection add them
- [favorites addObjectsFromArray:[spf objectForKey:@"queryFavorites"]];
- }
+ // if([favoritesTableView numberOfSelectedRows] > 0) {
+ // // Insert imported queries after the last selected favorite
+ // NSUInteger insertIndex = [[favoritesTableView selectedRowIndexes] lastIndex] + 1;
+ // NSUInteger i;
+ // for(i=0; i<[[spf objectForKey:@"queryFavorites"] count]; i++) {
+ // [favorites insertObject:[[spf objectForKey:@"queryFavorites"] objectAtIndex:i] atIndex:insertIndex+i];
+ // }
+ // } else {
+ // // If no selection add them
+ [favorites addObjectsFromArray:[spf objectForKey:@"queryFavorites"]];
+ // }
[favoritesArrayController rearrangeObjects];
[favoritesTableView reloadData];
} else {