[Pkg-mozext-commits] [tabmixplus] 40/51: Allow to open new window if user are not in single window mode or there are no opened windows or there are no other windows with the same privacy type

David Prévot taffit at moszumanska.debian.org
Mon Feb 2 18:36:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit a59c02527cc3c47579b6d2761029d53fd80690ac
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Jan 19 09:09:44 2015 +0200

    Allow to open new window if user are not in single window mode or there are no opened windows or there are no other windows with the same privacy type
---
 chrome/content/places/places.js | 2 +-
 chrome/content/utils.js         | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index eeb60ea..d69eac2 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -666,7 +666,7 @@ TMP_Places.contextMenu = {
       if (!openInPrivateWindow.hidden && !Tabmix.isNewWindowAllow(true))
         openInPrivateWindow.hidden = true;
 
-      if (!openInWindow.hidden && w.Tabmix.singleWindowMode)
+      if (!openInWindow.hidden && !Tabmix.isNewWindowAllow(false))
         openInWindow.hidden = true;
       else if (openInWindow.hasAttribute("default"))
         openInWindow.removeAttribute("default");
diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index 0f1f145..394118d 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -71,10 +71,11 @@ var Tabmix = { // jshint ignore:line
   },
 
   isNewWindowAllow: function(isPrivate) {
-    // allow to open new window if not in single window mode or
-    // allow to open new private window if there is no private window
+    // allow to open new window if:
+    //   user are not in single window mode or
+    //   there is no other window with the same privacy type
     return !this.getSingleWindowMode() ||
-           this.isVersion(200) && isPrivate && !this.RecentWindow.getMostRecentBrowserWindow({ private: true });
+      this.isVersion(200) && !this.RecentWindow.getMostRecentBrowserWindow({private: isPrivate});
   },
 
   lazy_import: function(aObject, aName, aModule, aSymbol, aFlag, aArg) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list