From 51f8215dae6196e2f2f85b31a1d2f3986de68406 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 7 Mar 2003 03:06:47 +0000 Subject: [PATCH] More changes for in-window bookmarks. bookmarks display and can be edited, buttons hooked up. Still off by default. --- .../BrowserWindow.nib/classes.nib | 14 +++ .../English.lproj/BrowserWindow.nib/info.nib | 2 +- .../BrowserWindow.nib/objects.nib | Bin 22211 -> 22864 bytes camino/src/bookmarks/BookmarksDataSource.mm | 12 +- camino/src/browser/BrowserWindowController.h | 31 ++++++ camino/src/browser/BrowserWindowController.mm | 104 +++++++++++++++++- 6 files changed, 156 insertions(+), 7 deletions(-) diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib index 2a7e6c72386..a0d4d6ad3a0 100644 --- a/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib +++ b/camino/resources/localized/English.lproj/BrowserWindow.nib/classes.nib @@ -10,6 +10,19 @@ }, {CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, {CLASS = BookmarkManagerView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, + { + CLASS = BookmarksController; + LANGUAGE = ObjC; + OUTLETS = { + mAddFolderButton = NSButton; + mAddItemButton = NSButton; + mContainersSplit = NSSplitView; + mItemPane = NSOutlineView; + mItemSearchSplit = NSSplitView; + mSearchPane = NSTableView; + }; + SUPERCLASS = NSObject; + }, { ACTIONS = { addBookmark = id; @@ -118,6 +131,7 @@ mAddBookmarkSheetWindow = NSWindow; mAddBookmarkTitleField = NSTextField; mBackItem = NSMenuItem; + mBookmarksController = BookmarksController; mContentView = BrowserContentView; mCopyItem = NSMenuItem; mForwardItem = NSMenuItem; diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib index 52885259ebf..4908f4f2f1b 100644 --- a/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib +++ b/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib @@ -27,7 +27,7 @@ 654 159 629 198 144 0 0 1280 832 731 - 265 306 654 459 0 0 1280 832 + 313 341 654 459 0 0 1280 832 IBFramework Version 291.0 diff --git a/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib b/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib index dd2cad8897f35d9b023763dacd71fee5bc6cc02d..735ebe7a6984d0d948764b65d7663b4ffe8463de 100644 GIT binary patch literal 22864 zcmb_^4V+ZPmG78ON72@2xZEYX2x5rTZ#fMQhA)6)Yj)7@it&kQ5F zV+}o>XZ#VQ16M{^2%zqY7!eGz#t(>SG)CFT293|h)A(FJZcLu$r=U@I|5J58yJrS; zA4A`|_tZI6r%s(Zb?Q{zTU43uY>hOf(#c3DCVcN_SVJb089X~UW6GSyn0~s%gssi6^G8fcCOT4)x&38tLmTCmJT(xL?$Pbp-wH6DV-fuw`+R`=Q8)^He?2Ya>fiIZ>Wzp5c!BXt&zC@ z>S%nKKN|PXj&%4HXIbQF*>0^`)4ID(oH(KNpo;3*LDj@-BB?}MG8`GRRtFyHnGp*u zi4e^Y#b;n?B)lvZN-oQ0douUy4xK9ZE-#1&U7?wns_+;REUXPW21#b)M(TERSZ(et zC4ujkWz@>5y~Ct{VV6oPsv&NwK3VmU$o>Zdd`@fsDz?vIs$^=UC4#{;Fe9f_s@>3G z0T{n@M4E$XiI%2Fa-hDqL|k@NB<-IOZ%&XMU{R0pa1Gl1rj+vx*yi49YSbYq>7ps2 z@Uj7$r0`0oC6XPXWYa02mRu8|QQSY~tFG#4tn`m*vsn>@?89mQ z!)-2%sef{+PoYPg!K7qRElJd1>W9WPh!jnpWup4}tjwjEhc=&T8>;0{lWhpfS)x!j z1&yeYG^!E(5qVnC4>KMd8pq$v)Rw=scnIv=i8Hal2oKbu*v zX*26{M``}g^}wYGhZ{78LhSkjk(L&)jRw%&WVln&Xt&0WLli~Cx9L{Yz{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G7|a`=ym%cS@f>Q=*V0+^C~F@O`LAdR^L&Kboml3$+pN&ZS6)_gDzU4A={sz=Za z_*hTHM*~&4XdFp(c&&XowJD_Q1uGb%7 diff --git a/camino/src/bookmarks/BookmarksDataSource.mm b/camino/src/bookmarks/BookmarksDataSource.mm index 759e08863e6..e0211ec9f14 100644 --- a/camino/src/bookmarks/BookmarksDataSource.mm +++ b/camino/src/bookmarks/BookmarksDataSource.mm @@ -525,6 +525,7 @@ const int kBookmarksRootItemTag = -2; // Called by the outliner to determine whether or not we should allow the // user to edit this item. We're leaving it off for now, becaue there are // some usability issues with inline editing (no undo, Escape doesn't work). +// - (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item { return NO; //([[tableColumn identifier] isEqualToString:@"name"]); @@ -579,7 +580,7 @@ const int kBookmarksRootItemTag = -2; if (!mRegisteredClient) return nil; NSString *columnName = [tableColumn identifier]; - NSMutableAttributedString *cellValue = nil; + id retValue = nil; if ([columnName isEqualToString: @"name"]) { @@ -588,7 +589,7 @@ const int kBookmarksRootItemTag = -2; //Set cell's textual contents //[cellValue replaceCharactersInRange:NSMakeRange(0, [cellValue length]) withString:[NSString stringWith_nsAString: nameAttr]]; - cellValue = [[[NSMutableAttributedString alloc] initWithString:[item name]] autorelease]; + NSMutableAttributedString* cellValue = [[[NSMutableAttributedString alloc] initWithString:[item name]] autorelease]; //Create an attributed string to hold the empty attachment, then release the components. NSMutableAttributedString* attachmentAttrString = [NSMutableAttributedString attributedStringWithAttachment:textAttachment]; @@ -608,8 +609,13 @@ const int kBookmarksRootItemTag = -2; [cellValue addAttribute:NSBaselineOffsetAttributeName value:[NSNumber numberWithFloat:-3.0] range:NSMakeRange(0, 1)]; + retValue = cellValue; } - return cellValue; + else if ([columnName isEqualToString: @"url"]) + { + retValue = [item url]; + } + return retValue; } - (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item diff --git a/camino/src/browser/BrowserWindowController.h b/camino/src/browser/BrowserWindowController.h index 343aeba8fee..5a4d402cedc 100644 --- a/camino/src/browser/BrowserWindowController.h +++ b/camino/src/browser/BrowserWindowController.h @@ -78,6 +78,36 @@ class nsIDOMNode; @end +#pragma mark - + +@interface BookmarksController : NSObject +{ + IBOutlet NSButton* mAddItemButton; + IBOutlet NSButton* mAddFolderButton; + + IBOutlet NSSplitView* mContainersSplit; // vertical split + IBOutlet NSSplitView* mItemSearchSplit; // horizontal split + IBOutlet NSOutlineView* mItemPane; + IBOutlet NSTableView* mSearchPane; // shows search results, can be hidden +} + +// Set focus to something in the bookmark manager view +- (void) focus; + +- (void) windowDidLoad; + +// NSSplitView delegate methods +//- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize; +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedCoord ofSubviewAt:(int)offset; +//- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedCoord ofSubviewAt:(int)offset; +//- (void)splitViewWillResizeSubviews:(NSNotification *)notification; +- (void)splitViewDidResizeSubviews:(NSNotification *)notification; +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview; +//- (float)splitView:(NSSplitView *)splitView constrainSplitPosition:(float)proposedPosition ofSubviewAt:(int)index; + +@end + +#pragma mark - typedef enum { @@ -114,6 +144,7 @@ typedef enum IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource; IBOutlet HistoryDataSource* mHistoryDataSource; + IBOutlet BookmarksController* mBookmarksController; IBOutlet BookmarksToolbar* mPersonalToolbar; diff --git a/camino/src/browser/BrowserWindowController.mm b/camino/src/browser/BrowserWindowController.mm index e5d34d61a0b..02a1f6ccf8d 100644 --- a/camino/src/browser/BrowserWindowController.mm +++ b/camino/src/browser/BrowserWindowController.mm @@ -449,6 +449,9 @@ static NSArray* sToolbarDefaults = nil; [[self window] setFrameTopLeftPoint:topLeft]; } } + + // let the in-window bookmark controller finish up some initialization + [mBookmarksController windowDidLoad]; } - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize @@ -1522,7 +1525,6 @@ static NSArray* sToolbarDefaults = nil; - (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)aTabViewItem { -NSLog(@"Notify: did select %@", [aTabViewItem label]); // we'll get called for the sidebar tabs as well. ignore any calls coming from // there, we're only interested in the browser tabs. if (aTabView != mTabBrowser) @@ -2124,11 +2126,15 @@ NSLog(@"Notify: did select %@", [aTabViewItem label]); // swap out between content and bookmarks. [mContentView toggleBookmarkManager:sender]; - +//XXXXXX needed until we can turn this on full time, since it's a nib change. +mSidebarBookmarksDataSource->mOutlineView = mBookmarksController->mItemPane; + [mSidebarBookmarksDataSource ensureBookmarks]; + // if we're now showing the bm manager, force it to have focus, // otherwise give focus back to gecko. if ( [mContentView isBookmarkManagerVisible] ) { - //XXX set focus to appropriate area of bm manager + // set focus to appropriate area of bm manager + [mBookmarksController focus]; } else { CHBrowserView* browserView = [mBrowserView getBrowserView]; @@ -2255,3 +2261,95 @@ static Boolean movieControllerFilter(MovieController mc, short action, void *par @end +#pragma mark - + +@implementation BookmarksController + +#if 0 +- (id) init +{ + if ( self = [super init] ) + { + mAddItemButton = nil; + } + return self; +} +#endif + +// +// - splitViewDidResizeSubviews: +// +// Called when one of the views got resized. We want to ensure that the "add bookmark +// item" button gets lined up with the left edge of the item panel. If the container/item +// split was the one that changed, move it accordingly +// +- (void)splitViewDidResizeSubviews:(NSNotification *)notification +{ + const int kButtonGutter = 8; + + if ( [notification object] == mContainersSplit ) { + // get the position of the item view relative to the window and set the button + // to that X value. Yes, this will fall down if the bookmark view is inset from the window + // but i think we can safely assume it won't be. + NSRect windowRect = [mItemPane convertRect:[mItemPane bounds] toView:nil]; + NSRect newButtonLocation = [mAddItemButton frame]; + newButtonLocation.origin.x = windowRect.origin.x; + [mAddItemButton setFrame:newButtonLocation]; + [mAddItemButton setNeedsDisplay:YES]; + + // offset by the width of the button and the gutter and we've got the location + // of the add folder button next to it. + newButtonLocation.origin.x += newButtonLocation.size.width + kButtonGutter; + [mAddFolderButton setFrame:newButtonLocation]; + [mAddFolderButton setNeedsDisplay:YES]; + } +} + +// +// - splitView:canCollapseSubview: +// +// Called when appkit wants to ask if it can collapse a subview. The only subview +// of our splits that we allow to be hidden is the search panel. +// +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview +{ + BOOL retVal = NO; + // subview will be a NSScrollView, so we have to get the superview of the + // search pane for comparison. + if ( sender == mItemSearchSplit && subview == [mSearchPane superview] ) + retVal = YES; + return retVal; +} + +- (void)windowDidLoad +{ + // hide the search panel + + // set up the font on the item view to be smaller + NSArray* columns = [mItemPane tableColumns]; + if ( columns ) { + int numColumns = [columns count]; + NSFont* smallerFont = [NSFont systemFontOfSize:11]; + NSLog(@"font is %@", smallerFont); + for ( int i = 0; i < numColumns; ++i ) + [[[columns objectAtIndex:i] dataCell] setFont:smallerFont]; + } +} + + +- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedCoord ofSubviewAt:(int)offset +{ + const int kMinimumContainerSplitWidth = 150; + float retVal = proposedCoord; + if ( sender == mContainersSplit ) + retVal = kMinimumContainerSplitWidth; + return retVal; +} + +- (void) focus +{ + [[mItemPane window] makeFirstResponder:mItemPane]; +} + +@end +