[Pkg-mozext-commits] [tabmixplus] 16/61: Open tab from History doesn't follow Tabmix options

David Prévot taffit at moszumanska.debian.org
Fri Aug 28 19:09:18 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 8e17766d723261ef02ef121ea15478c476a03b98
Author: onemen <tabmix.onemen at gmail.com>
Date:   Wed Jul 15 13:12:53 2015 +0300

    Open tab from History doesn't follow Tabmix options
---
 chrome/content/places/places.js |  6 +++++-
 modules/Places.jsm              | 11 ++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index 8127ead..da22def 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -223,7 +223,11 @@ var TMP_Places = {
    getPrefByDocumentURI: function (aWindow) {
      switch (aWindow.document.documentURI) {
        case "chrome://browser/content/places/places.xul":
-         if (PlacesOrganizer._places.selectedNode.itemId != PlacesUIUtils.leftPaneQueries["History"])
+         let historyId = PlacesUIUtils.leftPaneQueries["History"];
+         let node = PlacesOrganizer._places.selectedNode;
+         let historySelected = node.itemId == historyId ||
+             node.parent && node.parent.itemId == historyId;
+         if (!historySelected)
            return this.prefBookmark;
          /* falls through */
        case "chrome://browser/content/history/history-panel.xul":
diff --git a/modules/Places.jsm b/modules/Places.jsm
index 522c3bd..60f27b3 100644
--- a/modules/Places.jsm
+++ b/modules/Places.jsm
@@ -160,13 +160,14 @@ var PlacesUtilsInternal = {
     )._replace(
       'aWindow.openUILinkIn',
       'let browserWindow = this._getTopBrowserWin();\n' +
-      '      if (browserWindow && typeof browserWindow.TMP_Places == "object") {\n' +
-      '        if (TMP_Event) aWhere = browserWindow.TMP_Places.isBookmarklet(aNode.uri) ? "current" :\n' +
-      '                       browserWindow.TMP_Places.fixWhereToOpen(TMP_Event, aWhere);\n' +
-      '        else if (aWhere == "current" && !browserWindow.TMP_Places.isBookmarklet(aNode.uri)) {\n' +
+      '      if (browserWindow && typeof aWindow.TMP_Places == "object") {\n' +
+      '        let TMP_Places = aWindow.TMP_Places;\n' +
+      '        if (TMP_Event) aWhere = TMP_Places.isBookmarklet(aNode.uri) ? "current" :\n' +
+      '                       TMP_Places.fixWhereToOpen(TMP_Event, aWhere);\n' +
+      '        else if (aWhere == "current" && !TMP_Places.isBookmarklet(aNode.uri)) {\n' +
       '          let caller = browserWindow.Tabmix.getCallerNameByIndex(2);\n' +
       '          if (caller != "PC_doCommand")\n' +
-      '            aWhere = browserWindow.TMP_Places.fixWhereToOpen(null, aWhere);\n' +
+      '            aWhere = TMP_Places.fixWhereToOpen(null, aWhere);\n' +
       '        }\n' +
       '      }\n' +
       '      if (browserWindow && aWhere == "current")\n' +

-- 
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