fix bug 186591, View Image in New Tab/Window (use Tabbed Browsing preference semantics), r=smorgan, sr=mento. Patch by Chris Lawson <bugzilla@chrislawson.net>. fix bug 336947, Maximum width of location bar/search field is fixed at 2560 pixels. r=cl, sr=pink. Patch by froodiantherapy <stridey@gmail.com>

This commit is contained in:
hwaara%gmail.com 2006-05-12 08:48:45 +00:00
parent b4ba4f607e
commit 20804512be

View File

@ -1235,7 +1235,7 @@ enum BWCOpenDest {
[toolbarItem setPaletteLabel:NSLocalizedString(@"Location", @"Location")];
[toolbarItem setView:mLocationToolbarView];
[toolbarItem setMinSize:NSMakeSize(250, NSHeight([mLocationToolbarView frame]))];
[toolbarItem setMaxSize:NSMakeSize(2560, NSHeight([mLocationToolbarView frame]))];
[toolbarItem setMaxSize:NSMakeSize(FLT_MAX, NSHeight([mLocationToolbarView frame]))];
[mSearchBar setTarget:self];
[mSearchBar setAction:@selector(performSearch:)];
@ -3502,7 +3502,20 @@ enum BWCOpenDest {
NSString* urlStr = [NSString stringWith_nsAString: url];
NSString* referrer = [[mBrowserView getBrowserView] getFocusedURLString];
[self loadURL: urlStr referrer:referrer activate:YES allowPopups:NO];
unsigned int modifiers = [[NSApp currentEvent] modifierFlags];
if (modifiers & NSCommandKeyMask) {
BOOL loadInTab = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL];
BOOL loadInBG = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
if (modifiers & NSShiftKeyMask)
loadInBG = !loadInBG; // shift key should toggle the foreground/background pref as it does elsewhere
if (loadInTab)
[self openNewTabWithURL:urlStr referrer:referrer loadInBackground:loadInBG allowPopups:NO];
else
[self openNewWindowWithURL:urlStr referrer:referrer loadInBackground:loadInBG allowPopups:NO];
}
else
[self loadURL:urlStr referrer:referrer activate:YES allowPopups:NO];
}
}