Bug 665678 - Open Add-ons Manager, Data Manager etc. according to Link Behavior preferences (i.e. in a window if the user chose so). f=Ratty r=Neil
authorJens Hatlak <jh@junetz.de>
Fri, 07 Oct 2011 00:20:21 +0200
changeset 8612 5d28210323c40e20235b35c1c19fb323d1416856
parent 8611 7767f7386c9da43460ef2c209548011268a1ca08
child 8613 e2ec39613c79e01018d6f2e23c076d800b94e709
push id6622
push userjh@junetz.de
push dateThu, 06 Oct 2011 22:22:06 +0000
treeherdercomm-central@5d28210323c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs665678
Bug 665678 - Open Add-ons Manager, Data Manager etc. according to Link Behavior preferences (i.e. in a window if the user chose so). f=Ratty r=Neil
suite/common/utilityOverlay.js
--- a/suite/common/utilityOverlay.js
+++ b/suite/common/utilityOverlay.js
@@ -1518,17 +1518,19 @@ function switchToTabHavingURI(aURI, aOpe
     if (browserWin.closed || browserWin == window)
       continue;
     if (switchIfURIInWindow(browserWin))
       return true;
   }
 
   // No opened tab has that url.
   if (aOpenNew) {
-    let browserWin = openUILinkIn(aURI.spec, "tabfocused");
+    let newWindowPref = Services.prefs.getIntPref("browser.link.open_external");
+    let where = newWindowPref == kNewTab ? "tabfocused" : "window";
+    let browserWin = openUILinkIn(aURI.spec, where);
     if (aCallback) {
       browserWin.addEventListener("pageshow", function(event) {
         if (event.target.location.href != aURI.spec)
           return;
         browserWin.removeEventListener("pageshow", arguments.callee, true);
         aCallback(browserWin.getBrowser().selectedBrowser);
       }, true);
     }