From 2fdc963cc3941bc5bdfa94847df0a78b362e1280 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 17 Jan 2011 14:31:57 +0000 Subject: =?UTF-8?q?=E2=80=A2=20tried=20to=20fix=20in=20BundleEditor=20to?= =?UTF-8?q?=20auto-save=20the=20splitview=20settings=20in=20prefs=20(but?= =?UTF-8?q?=20up=20to=20now=20no=20success=20-=20help=20is=20needed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/BundleEditor.xib | 327 ++++++++++++++++-------------- Source/SPBundleEditorController.h | 3 +- Source/SPBundleEditorController.m | 22 ++ 3 files changed, 199 insertions(+), 153 deletions(-) diff --git a/Interfaces/English.lproj/BundleEditor.xib b/Interfaces/English.lproj/BundleEditor.xib index 2311bb8e..1ed260c6 100644 --- a/Interfaces/English.lproj/BundleEditor.xib +++ b/Interfaces/English.lproj/BundleEditor.xib @@ -23,7 +23,7 @@ YES - + YES @@ -76,155 +76,6 @@ 272 YES - - - 4370 - - YES - - - 2304 - - YES - - - 4370 - {143, 421} - - YES - - - -2147483392 - {{224, 0}, {16, 17}} - - - YES - - bundleName - 140 - 16 - 1000 - - 75628096 - 2048 - - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772096 - 133120 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2ODY1AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 3 - 0.0 - - 6 - System - _sourceListBackgroundColor - - 1 - MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA - - - - 6 - System - gridColor - - 3 - MC41AA - - - 20 - 1128267776 - - - SPBundleEditorOutlineView - 5 - 15 - 0 - YES - 1 - 1 - 14 - - - {{1, 1}, {143, 421}} - - - - - 4 - - - - -2147483392 - {{-100, -100}, {15, 102}} - - - _doScroller: - 0.99585062265396118 - - - - -2147483392 - {{-100, -100}, {192, 15}} - - 1 - - _doScroller: - 0.98947370052337646 - - - {{-1.5, 22.5}, {145, 423}} - - - 530 - - - - QSAAAEEgAABBoAAAQaAAAA - 290 @@ -407,6 +258,155 @@ NO 0 + + + 4370 + + YES + + + 2304 + + YES + + + 4370 + {143, 421} + + YES + + + -2147483392 + {{224, 0}, {16, 17}} + + + YES + + bundleName + 140 + 16 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 133120 + Text Cell + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2ODY1AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 3 + 0.0 + + 6 + System + _sourceListBackgroundColor + + 1 + MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA + + + + 6 + System + gridColor + + 3 + MC41AA + + + 20 + 1128267776 + + + SPBundleEditorOutlineView + 5 + 15 + 0 + YES + 1 + 1 + 14 + + + {{1, 1}, {143, 421}} + + + + + 4 + + + + -2147483392 + {{-100, -100}, {15, 102}} + + + _doScroller: + 0.99585062265396118 + + + + -2147483392 + {{-100, -100}, {192, 15}} + + 1 + + _doScroller: + 0.98947370052337646 + + + {{-2, 22}, {145, 423}} + + + 530 + + + + QSAAAEEgAABBoAAAQaAAAA + {142, 444} @@ -1377,7 +1377,7 @@ YES 2 - SPQueryFavoriteSplitView + SPBundleEditorSplitView 1 MC42NjY2NjY2ODY1IDAuNjY2NjY2Njg2NSAwLjY2NjY2NjY4NjUAA @@ -2564,6 +2564,22 @@ 1127 + + + delegate + + + + 1128 + + + + splitViewButtonBar + + + + 1129 + @@ -4035,7 +4051,7 @@ - 1127 + 1129 @@ -4353,6 +4369,7 @@ saveButton scopePopupButton showHideMetaButton + splitViewButtonBar tooltipTextField triggerPopupButton undeleteSheet @@ -4392,6 +4409,7 @@ NSButton NSPopUpButton NSButton + BWAnchoredButtonBar NSTextField NSPopUpButton id @@ -4434,6 +4452,7 @@ saveButton scopePopupButton showHideMetaButton + splitViewButtonBar tooltipTextField triggerPopupButton undeleteSheet @@ -4563,6 +4582,10 @@ showHideMetaButton NSButton + + splitViewButtonBar + BWAnchoredButtonBar + tooltipTextField NSTextField 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]; } @@ -1187,6 +1190,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 -- cgit v1.2.3