diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPContentFilterManager.h | 4 | ||||
-rw-r--r-- | Source/SPContentFilterManager.m | 6 | ||||
-rw-r--r-- | Source/SPQueryFavoriteManager.h | 5 | ||||
-rw-r--r-- | Source/SPQueryFavoriteManager.m | 19 |
4 files changed, 22 insertions, 12 deletions
diff --git a/Source/SPContentFilterManager.h b/Source/SPContentFilterManager.h index 441e8b43..f8ffe16e 100644 --- a/Source/SPContentFilterManager.h +++ b/Source/SPContentFilterManager.h @@ -25,6 +25,8 @@ #import <Cocoa/Cocoa.h> +@class BWAnchoredButtonBar; + @interface NSObject (SPContentFilterManagerDelegate) - (void)contentFiltersHaveBeenUpdated:(id)manager; @@ -47,6 +49,8 @@ IBOutlet id resultingClauseLabel; IBOutlet id resultingClauseContentLabel; IBOutlet id insertPlaceholderButton; + + IBOutlet BWAnchoredButtonBar *splitViewButtonBar; IBOutlet id contentFilterArrayController; diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 2fd22dfd..33be5048 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -29,6 +29,7 @@ #import "SPQueryController.h" #import "TableContent.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]") @@ -75,7 +76,6 @@ */ - (void)awakeFromNib { - [contentFilterTextView setAllowsDocumentBackgroundColorChange:YES]; NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; @@ -141,6 +141,8 @@ // Set column header [[[contentFilterTableView tableColumnWithIdentifier:@"MenuLabel"] headerCell] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ Fields Content Filters", @"content filter for field type ‘%@’"), filterType]]; + // Set the button delegate + [splitViewButtonBar setSplitViewDelegate:self]; } #pragma mark - @@ -384,7 +386,7 @@ */ - (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset { - return (proposedMax - 220); + return (proposedMax - 245); } /** diff --git a/Source/SPQueryFavoriteManager.h b/Source/SPQueryFavoriteManager.h index 1546186e..9318ed22 100644 --- a/Source/SPQueryFavoriteManager.h +++ b/Source/SPQueryFavoriteManager.h @@ -25,6 +25,8 @@ #import <Cocoa/Cocoa.h> +@class BWAnchoredButtonBar; + @interface NSObject (SPQueryFavoriteManagerDelegate) - (void)queryFavoritesHaveBeenUpdated:(id)manager; @@ -40,7 +42,8 @@ IBOutlet NSTableView *favoritesTableView; IBOutlet NSTextField *favoriteNameTextField; IBOutlet NSTextView *favoriteQueryTextView; - IBOutlet id removeButton; + IBOutlet NSButton *removeButton; + IBOutlet BWAnchoredButtonBar *splitViewButtonBar; IBOutlet NSArrayController *favoritesArrayController; 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); } /** |