diff --git a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib index d8ddea7606d..91486112272 100644 --- a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib +++ b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib @@ -3,13 +3,13 @@ IBDocumentLocation - 263 57 653 383 0 0 1280 832 + 50 101 653 383 0 0 1024 746 IBEditorPositions 124 83 451 170 144 0 0 1280 832 160 - 478 172 195 666 0 0 1152 848 + 602 52 195 666 0 0 1024 746 28 542 342 195 457 0 0 1280 832 297 @@ -23,16 +23,16 @@ 463 268 375 213 264 0 0 1280 832 56 - 340 478 343 68 0 0 1024 746 + 355 485 314 64 0 0 1024 746 654 159 629 198 144 0 0 1280 832 731 185 277 654 459 0 0 1024 746 801 - 418 480 188 64 0 0 1024 746 + 418 469 201 79 0 0 1024 746 IBFramework Version - 291.0 + 286.0 IBGroupedObjects 7 @@ -45,7 +45,11 @@ 8 IBLockedObjects + IBOpenObjects + + 56 + IBSystem Version - 6I32 + 6L29 diff --git a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib index 25cf222b66a..99c869ac50e 100644 Binary files a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib and b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib differ diff --git a/mozilla/camino/src/browser/AutoCompleteTextField.mm b/mozilla/camino/src/browser/AutoCompleteTextField.mm index 179d8d43b99..e46b3527a60 100644 --- a/mozilla/camino/src/browser/AutoCompleteTextField.mm +++ b/mozilla/camino/src/browser/AutoCompleteTextField.mm @@ -47,8 +47,34 @@ static const int kFrameMargin = 1; { return YES; } + @end +#pragma mark - + +// +// AutoCompleteTextCell +// +// Text cell subclass used to make room for the proxy icon inside the textview +// +@interface AutoCompleteTextCell : NSTextFieldCell +@end + +@implementation AutoCompleteTextCell + +- (NSRect)drawingRectForBounds:(NSRect)theRect +{ + const float kProxIconOffset = 19.0; + + theRect.origin.x += kProxIconOffset; + theRect.size.width -= kProxIconOffset; + return [super drawingRectForBounds:theRect]; +} + +@end + +#pragma mark - + class AutoCompleteListener : public nsIAutoCompleteListener { public: @@ -75,6 +101,8 @@ private: NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) +#pragma mark - + //////////////////////////////////////////////////////////////////////// @interface AutoCompleteTextField(Private) - (void)cleanup; @@ -83,6 +111,27 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) @implementation AutoCompleteTextField ++ (Class) cellClass +{ + return [AutoCompleteTextCell class]; +} + +// This method shouldn't be necessary according to the docs. The superclass's +// constructors should read in the cellClass and build a properly configured +// instance on their own. Instead they ignore cellClass and build a NSTextFieldCell. +- (id)initWithCoder:(NSCoder *)coder +{ + [super initWithCoder:coder]; + AutoCompleteTextCell* cell = [[[AutoCompleteTextCell alloc] initTextCell:@""] autorelease]; + [cell setEditable:[self isEditable]]; + [cell setDrawsBackground:[self drawsBackground]]; + [cell setBordered:[self isBordered]]; + [cell setBezeled:[self isBezeled]]; + [cell setScrollable:YES]; + [self setCell:cell]; + return self; +} + - (void) awakeFromNib { NSTableColumn *column; @@ -119,8 +168,15 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) [mTableView setTarget:self]; [mTableView setAction:@selector(onRowClicked:)]; - // Create the icon column if we have a proxy icon + // if we have a proxy icon if (mProxyIcon) { + // place the proxy icon on top of this view so we can see it + [mProxyIcon retain]; + [mProxyIcon removeFromSuperviewWithoutNeedingDisplay]; + [self addSubview:mProxyIcon]; + [mProxyIcon release]; + [mProxyIcon setFrameOrigin: NSMakePoint(3, 4)]; + // Create the icon column column = [[[NSTableColumn alloc] initWithIdentifier:@"icon"] autorelease]; [column setWidth:[mProxyIcon frame].origin.x + [mProxyIcon frame].size.width]; dataCell = [[[NSImageCell alloc] initImageCell:nil] autorelease]; diff --git a/mozilla/camino/src/browser/BrowserWindowController.mm b/mozilla/camino/src/browser/BrowserWindowController.mm index 14cde0a9a62..ac4f4f8e10c 100644 --- a/mozilla/camino/src/browser/BrowserWindowController.mm +++ b/mozilla/camino/src/browser/BrowserWindowController.mm @@ -772,8 +772,8 @@ static NSArray* sToolbarDefaults = nil; [toolbarItem setLabel:NSLocalizedString(@"Location", @"Location")]; [toolbarItem setPaletteLabel:NSLocalizedString(@"Location", @"Location")]; [toolbarItem setView:mLocationToolbarView]; - [toolbarItem setMinSize:NSMakeSize(128,20)]; - [toolbarItem setMaxSize:NSMakeSize(2560,32)]; + [toolbarItem setMinSize:NSMakeSize(128, NSHeight([mLocationToolbarView frame]))]; + [toolbarItem setMaxSize:NSMakeSize(2560, NSHeight([mLocationToolbarView frame]))]; [menuFormRep setTarget:self]; [menuFormRep setAction:@selector(performAppropriateLocationAction)];