cmd-click of history items open in new window (bug 181007)

This commit is contained in:
pinkerton%aol.net 2004-10-06 20:57:17 +00:00
parent cc840365dd
commit b0489b0dd5

View File

@ -316,8 +316,21 @@ HistoryRDFObserver::OnChange(nsIRDFDataSource*, nsIRDFResource*,
[mOutlineView collapseItem: item];
else
[mOutlineView expandItem: item];
} else {
[[mBrowserWindowController getBrowserWrapper] loadURI:[item url] referrer:nil flags:NSLoadFlagsNone activate:YES];
}
else {
// The history view obeys the app preference for cmd-click -> open in new window or tab
if (![item isKindOfClass: [HistoryItem class]])
return;
NSString* url = [item url];
BOOL loadInBackground = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
if (GetCurrentKeyModifiers() & cmdKey) {
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL])
[mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground];
else
[mBrowserWindowController openNewWindowWithURL:url referrer: nil loadInBackground:loadInBackground];
}
else
[[mBrowserWindowController getBrowserWrapper] loadURI:url referrer:nil flags:NSLoadFlagsNone activate:YES];
}
}