[tbb-commits] [torbutton/master] Bug 13378: Prevent addon icon reordering in toolbar.

mikeperry at torproject.org mikeperry at torproject.org
Fri Oct 10 22:09:21 UTC 2014


commit ab075006b57a0867f09004615067a2355aaab208
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Fri Oct 10 15:06:01 2014 -0700

    Bug 13378: Prevent addon icon reordering in toolbar.
---
 src/chrome/content/torbutton.js |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index ffea83b..44020ec 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -543,8 +543,14 @@ function torbutton_init() {
       torbutton_log(3, 'Adding button');
       try {
         if (CustomizableUI) {
-          // ESR31-style toolbar
-          CustomizableUI.addWidgetToArea("torbutton-button", CustomizableUI.AREA_NAVBAR, 0);
+          // ESR31-style toolbar is handled by the existing compiled-in pref.
+          // We also need to prevent first-run toolbar reorg (#13378), so we
+          // reset this toolbar state on first-run.
+          try {
+            m_tb_prefs.clearUserPref("browser.uiCustomization.state");
+          } catch(e) {}
+          CustomizableUI.reset();
+          CustomizableUI.undoReset();
         } else {
           // ESR24-style toolbar
           // TODO: Remove this branch once TBB-ESR24 has been retired.





More information about the tbb-commits mailing list