diff options
author | rowanbeentje <rowan@beent.je> | 2009-04-17 00:43:30 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-04-17 00:43:30 +0000 |
commit | 33a71315ca49e9b4ae9837c5e466fd30f32969cf (patch) | |
tree | 12c9384440c9466d07cd867c5299ca82c5aa26b4 /Source/CustomQuery.m | |
parent | 93bf3137c544b66a84a5a780264abef960f8a1b9 (diff) | |
download | sequelpro-33a71315ca49e9b4ae9837c5e466fd30f32969cf.tar.gz sequelpro-33a71315ca49e9b4ae9837c5e466fd30f32969cf.tar.bz2 sequelpro-33a71315ca49e9b4ae9837c5e466fd30f32969cf.zip |
- Add defaults for the SelectLastFavoriteUsed and LastFavoriteIndex keys
- Add the ability to configure the maximum number of items in the query history
- Added appropriate minumums (0) and maximums in prefs for max history items, LIMIT count, connection timeout value
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 9dbd5a20..3d8b5383 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -421,7 +421,7 @@ sets the tableView columns corresponding to the mysql-result //add query to history [queryHistoryButton insertItemWithTitle:[queries componentsJoinedByString:@"; "] atIndex:1]; - while ( [queryHistoryButton numberOfItems] > 21 ) { + while ( [queryHistoryButton numberOfItems] > [[prefs objectForKey:@"CustomQueryMaxHistoryItems"] intValue] + 1 ) { [queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1]; } for ( i = 1 ; i < [queryHistoryButton numberOfItems] ; i++ ) |