diff options
author | stuconnolly <stuart02@gmail.com> | 2009-11-18 00:44:03 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-11-18 00:44:03 +0000 |
commit | 1c7cf0aa49e68714dbfc4d7ca01fccd519e22aee (patch) | |
tree | 151136a6f76aa3cf431dc19a2971894462edec90 /Source/SPQueryFavoriteManager.m | |
parent | d916e1e1514cd60bd9228ceab4c3cf27398a8b05 (diff) | |
download | sequelpro-1c7cf0aa49e68714dbfc4d7ca01fccd519e22aee.tar.gz sequelpro-1c7cf0aa49e68714dbfc4d7ca01fccd519e22aee.tar.bz2 sequelpro-1c7cf0aa49e68714dbfc4d7ca01fccd519e22aee.zip |
Manually set the delegate of the anchored button bars in the content filter editor and query favorites editor as you can't do it in IB.
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r-- | Source/SPQueryFavoriteManager.m | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index 8acf2f0a..dc1cfdcf 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -28,6 +28,7 @@ #import "SPEncodingPopupAccessory.h" #import "SPQueryController.h" #import "SPConstants.h" +#import "SPConnectionController.h" #define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]") #define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]") @@ -73,7 +74,6 @@ */ - (void)awakeFromNib { - [favoriteQueryTextView setAllowsDocumentBackgroundColorChange:YES]; NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; @@ -110,12 +110,11 @@ [favorites addObject:[[fav mutableCopy] autorelease]]; } - - // Select the first query if any - NSUInteger i = 0; - for(i=0; i < [favorites count]; i++ ) - if(![[favorites objectAtIndex:i] objectForKey:@"headerOfFileURL"]) - break; + // Select the first query if any + for (NSDictionary *favorite in favorites) + { + if (![favorite objectForKey:@"headerOfFileURL"]) break; + } [[self window] makeFirstResponder:favoritesTableView]; [self _initWithNoSelection]; @@ -128,7 +127,9 @@ // Set Remove button state [removeButton setEnabled:([favoritesTableView numberOfSelectedRows] > 0)]; - + + // Set the button delegate + [splitViewButtonBar setSplitViewDelegate:self]; } #pragma mark - @@ -388,7 +389,7 @@ */ - (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset { - return (proposedMax - 220); + return (proposedMax - 240); } /** |