remember bookmark manager vertical splitter width between windows (bug 232046)

git-svn-id: svn://10.0.0.236/trunk@152694 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%aol.net 2004-02-12 03:52:24 +00:00
parent 0940750e95
commit b914c4fbf5
2 changed files with 66 additions and 1 deletions

View File

@ -619,6 +619,48 @@
refType = 4;
sourceTree = "<group>";
};
3F27D94A05DB2600007B543D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = "NSSplitView+Utils.h";
path = "src/extensions/NSSplitView+Utils.h";
refType = 2;
sourceTree = SOURCE_ROOT;
};
3F27D94B05DB2600007B543D = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.objcpp;
name = "NSSplitView+Utils.mm";
path = "src/extensions/NSSplitView+Utils.mm";
refType = 2;
sourceTree = SOURCE_ROOT;
};
3F27D94C05DB2600007B543D = {
fileRef = 3F27D94A05DB2600007B543D;
isa = PBXBuildFile;
settings = {
};
};
3F27D94D05DB2600007B543D = {
fileRef = 3F27D94B05DB2600007B543D;
isa = PBXBuildFile;
settings = {
};
};
3F27D94E05DB2600007B543D = {
fileRef = 3F27D94A05DB2600007B543D;
isa = PBXBuildFile;
settings = {
};
};
3F27D94F05DB2600007B543D = {
fileRef = 3F27D94B05DB2600007B543D;
isa = PBXBuildFile;
settings = {
};
};
3F2CF8CB042A88B7005FD42F = {
fileEncoding = 30;
isa = PBXFileReference;
@ -785,6 +827,7 @@
3F44AC2505BDFB9E00CB4B08,
3F44AC2605BDFB9E00CB4B08,
3F44AC2705BDFB9E00CB4B08,
3F27D94C05DB2600007B543D,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -1976,6 +2019,7 @@
3F44ACCC05BDFB9E00CB4B08,
3F44ACCD05BDFB9E00CB4B08,
3F44ACCE05BDFB9E00CB4B08,
3F27D94D05DB2600007B543D,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -4793,6 +4837,7 @@
3F44AE5E05BDFBA000CB4B08,
3F44AE5F05BDFBA000CB4B08,
3F44AE6005BDFBA000CB4B08,
3F27D94E05DB2600007B543D,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -5985,6 +6030,7 @@
3F44AF0605BDFBA000CB4B08,
3F44AF0705BDFBA000CB4B08,
3F44AF0805BDFBA000CB4B08,
3F27D94F05DB2600007B543D,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -11515,6 +11561,7 @@
};
F5B950BA030C833301A96654 = {
children = (
3F27D94A05DB2600007B543D,
3FB2BA960545EA80002B9691,
3FB2BA920545EA80002B9691,
3F2CF8CB042A88B7005FD42F,
@ -11537,6 +11584,7 @@
};
F5B950BB030C833301A96654 = {
children = (
3F27D94B05DB2600007B543D,
3FB2BA970545EA80002B9691,
3FB2BA930545EA80002B9691,
F5D98EB9031AC37801A96654,

View File

@ -43,6 +43,7 @@
#import "NSString+Utils.h"
#import "NSArray+Utils.h"
#import "NSPasteboard+Utils.h"
#import "NSSplitView+Utils.h"
#import "BookmarkManager.h"
#import "BookmarkInfoController.h"
#import "BookmarkFolder.h"
@ -56,6 +57,7 @@
#import "HistoryDataSource.h"
#import "BookmarksClient.h"
#import "NetworkServices.h"
#import "UserDefaults.h"
#define kNoOpenAction 0
#define kOpenBookmarkAction 1
@ -95,6 +97,10 @@ const long kMinSearchPaneHeight = 80;
- (void)dealloc
{
// save the splitter width of the conatiner view
float width = [mContainersSplit leftWidth];
[[NSUserDefaults standardUserDefaults] setFloat: width forKey:USER_DEFAULTS_CONTAINER_SPLITTER_WIDTH];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[mCachedHref release];
[mExpandedStatus release];
@ -174,7 +180,7 @@ const long kMinSearchPaneHeight = 80;
[mItemPane setAutosaveTableColumns:YES];
[mSearchPane setAutosaveTableColumns:YES];
[mContainerPane setAutosaveTableColumns:YES];
mSetupComplete = YES;
}
@ -627,6 +633,17 @@ const long kMinSearchPaneHeight = 80;
- (void) focus
{
[[mItemPane window] makeFirstResponder:mItemPane];
// restore splitters to their saved positions. We have to do this here
// (rather than in |-completeSetup| because only at this point is the
// manager view resized correctly. If we did it earlier, it would resize again
// to stretch proportionally to the size of the browser window, destroying
// the width we just set.
const float kDefaultSplitWidth = kMinContainerSplitWidth;
float savedWidth = [[NSUserDefaults standardUserDefaults] floatForKey:USER_DEFAULTS_CONTAINER_SPLITTER_WIDTH];
if (savedWidth < kDefaultSplitWidth)
savedWidth = kDefaultSplitWidth;
[mContainersSplit setLeftWidth:savedWidth];
}
- (void) setCanEditSelectedContainerContents:(BOOL)inCanEdit