aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPContentFilterManager.h5
-rw-r--r--Source/SPContentFilterManager.m34
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
/**