aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPBundleEditorController.h4
-rw-r--r--Source/SPBundleEditorController.m33
2 files changed, 13 insertions, 24 deletions
diff --git a/Source/SPBundleEditorController.h b/Source/SPBundleEditorController.h
index d8c2d5df..1c3c0dab 100644
--- a/Source/SPBundleEditorController.h
+++ b/Source/SPBundleEditorController.h
@@ -27,7 +27,7 @@
#import "SPBundleCommandTextView.h"
#import "SPOutlineView.h"
-@class SRRecorderControl, BWAnchoredButtonBar;
+@class SRRecorderControl, BWSplitView;
@interface SPBundleEditorController : NSWindowController {
@@ -63,7 +63,7 @@
IBOutlet NSButton *disabledCheckbox;
IBOutlet NSScrollView *commandScrollView;
IBOutlet NSScrollView *descriptionScrollView;
- IBOutlet BWAnchoredButtonBar *splitViewButtonBar;
+ IBOutlet BWSplitView *splitView;
IBOutlet id undeleteSheet;
IBOutlet NSTableView *undeleteTableView;
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index a4a9a36b..279002f4 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -38,6 +38,8 @@
#define SP_BUNDLEEDITOR_SCOPE_GENERAL_STRING NSLocalizedString(@"General", @"Bundle Editor : Scope dropdown : 'general' item")
#define SP_BUNDLEEDITOR_OUTLINE_BUNDLE_TOOLTIP_STRING NSLocalizedString(@"“%@” Bundle",@"Bundle Editor : Outline View : Bundle item : tooltip")
+#define SP_BUNDLEEDITOR_SPLITVIEW_AUTOSAVE_STRING @"SPBundleEditorSplitView"
+
@interface SPBundleEditorController (PrivateAPI)
- (void)_updateBundleDataView;
@@ -116,6 +118,15 @@
- (void)awakeFromNib
{
+ // Set up the splitview width manually; autosave appears to save but not restore this value
+ // here, so restore in code if present.
+ NSString *splitViewKeyName = [NSString stringWithFormat:@"NSSplitView Subview Frames %@", SP_BUNDLEEDITOR_SPLITVIEW_AUTOSAVE_STRING];
+ if ([[NSUserDefaults standardUserDefaults] arrayForKey:splitViewKeyName]) {
+ NSString *detailString = [[[NSUserDefaults standardUserDefaults] arrayForKey:splitViewKeyName] objectAtIndex:0];
+ float dividerPosition = [[[detailString componentsSeparatedByString:@", "] objectAtIndex:2] floatValue];
+ [splitView setPosition:dividerPosition ofDividerAtIndex:0];
+ }
+
// Init all needed variables; popup menus (with the chance for localization); and set
// defaults
@@ -363,9 +374,6 @@
[deletedDefaultBundles setArray:[[NSUserDefaults standardUserDefaults] objectForKey:SPBundleDeletedDefaultBundlesKey]];
}
- // Set the button bar delegate
- [splitViewButtonBar setSplitViewDelegate:self];
-
[self _initTree];
}
@@ -1191,25 +1199,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 - 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