Bug 1505291 - Port bug 1504725 to TB: Explicitly pass event to language change handler. r=jorgk DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Wed, 07 Nov 2018 09:34:50 +0100
changeset 33669 29dbc84a0a79d8a51ec8d7fa8a47926ca0a0de21
parent 33668 36dcdf4f2d5ca308479b2f7a55707b9f2b353060
child 33670 337f52b538f8a9f0a4302e1c74e0c139287c72f2
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1505291, 1504725
Bug 1505291 - Port bug 1504725 to TB: Explicitly pass event to language change handler. r=jorgk DONTBUILD
mail/components/preferences/advanced.inc.xul
mail/components/preferences/advanced.js
--- a/mail/components/preferences/advanced.inc.xul
+++ b/mail/components/preferences/advanced.inc.xul
@@ -203,17 +203,17 @@
             <hbox id="confirmMessengerLanguage"
                   class="message-bar"
                   align="center"
                   hidden="true">
               <image class="message-bar-icon"/>
               <hbox class="message-bar-content" align="center" flex="1">
                 <description class="message-bar-description" flex="1"/>
                 <button class="message-bar-button"
-                        oncommand="gAdvancedPane.confirmLanguageChange()"/>
+                        oncommand="gAdvancedPane.confirmLanguageChange(event)"/>
               </hbox>
             </hbox>
           </groupbox>
 
 #ifdef HAVE_SHELL_SERVICE
           <groupbox id="systemDefaultsGroup" orient="vertical">
             <caption>&systemIntegration.label;</caption>
             <hbox id="checkDefaultBox" align="center">
--- a/mail/components/preferences/advanced.js
+++ b/mail/components/preferences/advanced.js
@@ -568,17 +568,17 @@ var gAdvancedPane = {
   hideConfirmLanguageChangeMessageBar() {
     let messageBar = document.getElementById("confirmMessengerLanguage");
     messageBar.hidden = true;
     messageBar.querySelector(".message-bar-button").removeAttribute("locales");
     this.requestingLocales = null;
   },
 
   /* Confirm the locale change and restart the Thunderbird in the new locale. */
-  confirmLanguageChange() {
+  confirmLanguageChange(event) {
     let localesString = (event.target.getAttribute("locales") || "").trim();
     if (!localesString || localesString.length == 0) {
       return;
     }
     let locales = localesString.split(",");
     Services.locale.requestedLocales = locales;
 
     // Restart with the new locale.