diff options
author | Bibiko <bibiko@eva.mpg.de> | 2011-01-17 14:31:57 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2011-01-17 14:31:57 +0000 |
commit | 2fdc963cc3941bc5bdfa94847df0a78b362e1280 (patch) | |
tree | 762beb51de918353ef96441420c16d19a1e00904 /Source | |
parent | 6376447ae7597c9556ee2ba279c23308681be851 (diff) | |
download | sequelpro-2fdc963cc3941bc5bdfa94847df0a78b362e1280.tar.gz sequelpro-2fdc963cc3941bc5bdfa94847df0a78b362e1280.tar.bz2 sequelpro-2fdc963cc3941bc5bdfa94847df0a78b362e1280.zip |
• tried to fix in BundleEditor to auto-save the splitview settings in prefs (but up to now no success - help is needed)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPBundleEditorController.h | 3 | ||||
-rw-r--r-- | Source/SPBundleEditorController.m | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/Source/SPBundleEditorController.h b/Source/SPBundleEditorController.h index ac4c9e6b..81390824 100644 --- a/Source/SPBundleEditorController.h +++ b/Source/SPBundleEditorController.h @@ -27,7 +27,7 @@ #import "SPBundleCommandTextView.h" #import "SPOutlineView.h" -@class SRRecorderControl; +@class SRRecorderControl, BWAnchoredButtonBar; @interface SPBundleEditorController : NSWindowController { @@ -64,6 +64,7 @@ IBOutlet NSView *bundleDataView; IBOutlet NSScrollView *commandScrollView; IBOutlet NSScrollView *descriptionScrollView; + IBOutlet BWAnchoredButtonBar *splitViewButtonBar; IBOutlet id undeleteSheet; IBOutlet NSTableView *undeleteTableView; diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m index f7347c76..a4a9a36b 100644 --- a/Source/SPBundleEditorController.m +++ b/Source/SPBundleEditorController.m @@ -363,6 +363,9 @@ [deletedDefaultBundles setArray:[[NSUserDefaults standardUserDefaults] objectForKey:SPBundleDeletedDefaultBundlesKey]]; } + // Set the button bar delegate + [splitViewButtonBar setSplitViewDelegate:self]; + [self _initTree]; } @@ -1188,6 +1191,25 @@ } #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 - 240); +} + +/** + * 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 delegates - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView |