Bug 1505291 - Port bug 1504725 to TB: Explicitly pass event to language change handler. r+a=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 07 Nov 2018 09:34:50 +0100
changeset 33482 82128d3a84df8702c394ce16ad4560ddba8dad3a
parent 33481 4f1a2ba79d6dc7bdaf1ad72928044b6b6f867db1
child 33483 cee50fef026a3425b6f09c46d5ceb17bff298580
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
bugs1505291, 1504725
Bug 1505291 - Port bug 1504725 to TB: Explicitly pass event to language change handler. r+a=jorgk
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 label="&systemIntegration.label;"/>
             <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.