diff options
author | rowanbeentje <rowan@beent.je> | 2012-08-01 22:50:16 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-08-01 22:50:16 +0000 |
commit | 2f8cd7600be2e85fe27bda04862aceff86b38e30 (patch) | |
tree | ed42edda43fb932c55723715d5ac3a30b56eac10 /Source | |
parent | b85f0f9f78d157657c5d5b9e7823eaf0266be6fd (diff) | |
download | sequelpro-2f8cd7600be2e85fe27bda04862aceff86b38e30.tar.gz sequelpro-2f8cd7600be2e85fe27bda04862aceff86b38e30.tar.bz2 sequelpro-2f8cd7600be2e85fe27bda04862aceff86b38e30.zip |
- Remove all BWToolKit elements from the Content Filter Manager, replacing with SPSplitView and equivalents
- Update localisable strings
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPContentFilterManager.h | 5 | ||||
-rw-r--r-- | Source/SPContentFilterManager.m | 34 |
2 files changed, 8 insertions, 31 deletions
diff --git a/Source/SPContentFilterManager.h b/Source/SPContentFilterManager.h index 88eda63c..17ed782f 100644 --- a/Source/SPContentFilterManager.h +++ b/Source/SPContentFilterManager.h @@ -30,8 +30,8 @@ // // More info at <http://code.google.com/p/sequel-pro/> -@class BWAnchoredButtonBar; @class SPDatabaseDocument; +@class SPSplitView; @interface NSObject (SPContentFilterManagerDelegate) @@ -57,14 +57,13 @@ IBOutlet id contentFilterConjunctionTextField; IBOutlet id contentFilterConjunctionLabel; IBOutlet id contentFilterTextView; + IBOutlet SPSplitView *contentFilterSplitView; IBOutlet id removeButton; IBOutlet id numberOfArgsLabel; IBOutlet id resultingClauseLabel; IBOutlet id resultingClauseContentLabel; IBOutlet id insertPlaceholderButton; IBOutlet NSButton *suppressLeadingFiledPlaceholderCheckbox; - - IBOutlet BWAnchoredButtonBar *splitViewButtonBar; IBOutlet id contentFilterArrayController; diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 7ac36649..4bfb399e 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -37,10 +37,7 @@ #import "SPQueryDocumentsController.h" #import "SPTableContent.h" #import "SPConnectionController.h" - -#ifndef SP_REFACTOR /* headers */ -#import <BWToolkitFramework/BWToolkitFramework.h> -#endif +#import "SPSplitView.h" #define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]") #define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]") @@ -89,6 +86,11 @@ */ - (void)awakeFromNib { + + // Set up the split view + [contentFilterSplitView setMinSize:120.f ofSubviewAtIndex:0]; + [contentFilterSplitView setMaxSize:245.f ofSubviewAtIndex:0]; + // Add global group row to contentFilters [contentFilters addObject:[NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedString(@"Global",@"Content Filter Manager : Filter Entry List: 'Global' Header"), @"MenuLabel", @@ -151,11 +153,6 @@ // Set column header [[[contentFilterTableView tableColumnWithIdentifier:@"MenuLabel"] headerCell] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"‘%@’ Fields Content Filters", @"table column header. Read: 'Showing all content filters for fields of type %@' (ContentFilterManager)"), filterType]]; - -#ifndef SP_REFACTOR /* split view delegate */ - // Set the button delegate - [splitViewButtonBar setSplitViewDelegate:self]; -#endif } #pragma mark - @@ -409,25 +406,6 @@ } #pragma mark - -#pragma mark SplitView delegate methods - -/** - * Return the maximum possible size of the splitview. - */ -- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset -{ - return (proposedMax - 245); -} - -/** - * Return the minimum possible size of the splitview. - */ -- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset -{ - return (proposedMin + 120); -} - -#pragma mark - #pragma mark TableView delegate methods /** |