Bug 1523076 - Port bug 1512302: Indicate on Windows that the App Update setting is installation-specific. r+a=jorgk
authorRichard Marti <richard.marti@gmail.com>
Sat, 26 Jan 2019 12:37:06 +0100
changeset 34318 99bc32d53976fa2e087dbc40d7121cea3fbfc5fd
parent 34317 fac9afbc5ce3b5cf6738361f3591429e06b2c5cd
child 34319 175d46dcc1ce8acc6fc3060235a936061e861403
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
bugs1523076, 1512302
Bug 1523076 - Port bug 1512302: Indicate on Windows that the App Update setting is installation-specific. r+a=jorgk
mail/components/preferences/advanced.inc.xul
mail/components/preferences/advanced.js
mail/locales/en-US/chrome/messenger/preferences/advanced.dtd
mail/themes/shared/mail/incontentprefs/aboutPreferences.css
--- a/mail/components/preferences/advanced.inc.xul
+++ b/mail/components/preferences/advanced.inc.xul
@@ -422,23 +422,26 @@
                 <hbox id="checkingForUpdates" align="center">
                   <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
                   <spacer flex="1"/>
                   <button label="&update.checkForUpdatesButton.label;"
                           accesskey="&update.checkForUpdatesButton.accesskey;"
                           disabled="true"/>
                 </hbox>
                 <hbox id="downloading" align="center">
-                  <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
+                  <image class="update-throbber"/><label>&update.downloading.start;</label>
+                  <label id="downloadStatus"/><label>&update.downloading.end;</label>
                 </hbox>
                 <hbox id="applying" align="center">
                   <image class="update-throbber"/><label>&update.applying;</label>
                 </hbox>
                <hbox id="downloadFailed" align="center">
-                  <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
+                  <label>&update.failed.start;</label>
+                  <label id="failedLink" class="text-link">&update.failed.linkText;</label>
+                  <label>&update.failed.end;</label>
                   <spacer flex="1"/>
                   <button label="&update.checkForUpdatesButton.label;"
                           accesskey="&update.checkForUpdatesButton.accesskey;"
                           oncommand="gAppUpdater.checkForUpdates();"/>
                 </hbox>
                 <hbox id="policyDisabled" align="center">
                   <label>&update.adminDisabled;</label>
                 </hbox>
@@ -448,42 +451,54 @@
                   <button label="&update.checkForUpdatesButton.label;"
                           accesskey="&update.checkForUpdatesButton.accesskey;"
                           oncommand="gAppUpdater.checkForUpdates();"/>
                 </hbox>
                 <hbox id="otherInstanceHandlingUpdates" align="center">
                   <label>&update.otherInstanceHandlingUpdates;</label>
                 </hbox>
                 <hbox id="manualUpdate" align="center">
-                  <label>&update.manual.start;</label><label id="manualLink" class="text-link">&update.manual.linkText;</label><label>&update.manual.end;</label>
+                  <label>&update.manual.start;</label><label id="manualLink" class="text-link">
+                    &update.manual.linkText;
+                  </label>
+                  <label>&update.manual.end;</label>
                   <spacer flex="1"/>
                   <button label="&update.checkForUpdatesButton.label;"
                           accesskey="&update.checkForUpdatesButton.accesskey;"
                           disabled="true"/>
                 </hbox>
                 <hbox id="unsupportedSystem" align="center">
-                  <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
+                  <label>&update.unsupported.start;</label>
+                  <label id="unsupportedLink"
+                         class="text-link">&update.unsupported.linkText;</label>
+                  <label>&update.unsupported.end;</label>
                 </hbox>
                 <hbox id="restarting" align="center">
                   <image class="update-throbber"/><label>&update.restarting;</label>
                 </hbox>
               </deck>
             </vbox>
             <separator/>
-            <radiogroup id="updateRadioGroup"
-                        align="start">
-              <radio id="autoDesktop"
-                     value="true"
-                     label="&updateAuto.label;"
-                     accesskey="&updateAuto.accesskey;"/>
-              <radio id="manualDesktop"
-                     value="false"
-                     label="&updateCheck.label;"
-                     accesskey="&updateCheck.accesskey;"/>
-            </radiogroup>
+            <description id="updateAllowDescription">&updateAppAllow.description;</description>
+            <vbox id="updateSettingsContainer">
+              <radiogroup id="updateRadioGroup"
+                          align="start">
+                <radio id="autoDesktop"
+                       value="true"
+                       label="&updateAuto.label;"
+                       accesskey="&updateAuto.accesskey;"/>
+                <radio id="manualDesktop"
+                       value="false"
+                       label="&updateCheck.label;"
+                       accesskey="&updateCheck.accesskey;"/>
+              </radiogroup>
+              <description id="updateSettingCrossUserWarning" hidden="true">
+                &updateCrossUserSettingWarning.description;
+              </description>
+            </vbox>
           </groupbox>
 
 #ifdef MOZ_MAINTENANCE_SERVICE
           <separator/>
           <checkbox id="useService"
                     label="&useService.label;"
                     accesskey="&useService.accesskey;"
                     preference="app.update.service.enabled"/>
--- a/mail/components/preferences/advanced.js
+++ b/mail/components/preferences/advanced.js
@@ -128,16 +128,25 @@ var gAdvancedPane = {
         let distroAbout = Services.prefs.getStringPref("distribution.about", "");
         if (distroAbout) {
           let distroField = document.getElementById("distribution");
           distroField.value = distroAbout;
           distroField.style.display = "block";
         }
       }
 
+      if (AppConstants.platform == "win") {
+        // On Windows, the Application Update setting is an installation-
+        // specific preference, not a profile-specific one. Show a warning to
+        // inform users of this.
+        let updateContainer = document.getElementById("updateSettingsContainer");
+        updateContainer.classList.add("updateSettingCrossUserWarningContainer");
+        document.getElementById("updateSettingCrossUserWarning").hidden = false;
+      }
+
       if (AppConstants.MOZ_MAINTENANCE_SERVICE) {
         // Check to see if the maintenance service is installed.
         // If it isn't installed, don't show the preference at all.
         let installed;
         try {
           let wrk = Cc["@mozilla.org/windows-registry-key;1"]
                     .createInstance(Ci.nsIWindowsRegKey);
           wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
--- a/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd
+++ b/mail/locales/en-US/chrome/messenger/preferences/advanced.dtd
@@ -62,26 +62,29 @@
 <!-- LOCALIZATION NOTE (updateApp.version.*): updateApp.version.pre is
   followed by a version number, keep the trailing space or replace it with
   a different character as needed. updateApp.version.post is displayed after
   the version number, and is empty on purpose for English. You can use it
   if required by your language.
  -->
 <!ENTITY updateApp.version.pre           "Version ">
 <!ENTITY updateApp.version.post          "">
+<!ENTITY updateAppAllow.description      "Allow &brandShortName; to">
 <!ENTITY updateAuto.label                "Automatically install updates (recommended: improved security)">
 <!ENTITY updateAuto.accesskey            "A">
 <!ENTITY updateCheck.label               "Check for updates, but let me choose whether to install them">
 <!ENTITY updateCheck.accesskey           "C">
 <!ENTITY updateHistory.label             "Show Update History">
 <!ENTITY updateHistory.accesskey         "p">
 
 <!ENTITY useService.label                "Use a background service to install updates">
 <!ENTITY useService.accesskey            "b">
 
+<!ENTITY updateCrossUserSettingWarning.description "This setting will apply to all Windows accounts and &brandShortName; profiles using this installation of &brandShortName;.">
+
 <!-- Networking and Disk Space -->
 <!ENTITY showSettings.label            "Settings…">
 <!ENTITY showSettings.accesskey        "S">
 <!ENTITY proxiesConfigure.label        "Configure how &brandShortName; connects to the Internet">
 <!ENTITY connectionsInfo.caption       "Connection">
 <!ENTITY offlineInfo.caption           "Offline">
 <!ENTITY offlineInfo.label             "Configure offline settings">
 <!ENTITY showOffline.label             "Offline…">
--- a/mail/themes/shared/mail/incontentprefs/aboutPreferences.css
+++ b/mail/themes/shared/mail/incontentprefs/aboutPreferences.css
@@ -349,16 +349,40 @@ tabs {
   margin-inline-start: 33px;
 }
 
 .update-throbber {
   margin-inline-start: 0;
   margin-inline-end: 4px;
 }
 
+.updateSettingCrossUserWarningContainer {
+  background: var(--grey-20);
+  border-radius: 5px;
+  padding-inline: 8px;
+  padding-block-start: 2px;
+  padding-block-end: 8px;
+  margin-block-end: 17px;
+}
+
+#updateSettingCrossUserWarning {
+  padding-inline-start: 30px;
+  margin-block-start: 20px;
+  line-height: 20px;
+  background-image: url("chrome://global/skin/icons/info.svg");
+  background-position-x: left 2px;
+  background-position-y: top 2px;
+  background-size: 16px 16px;
+  background-repeat: no-repeat;
+}
+
+#updateSettingCrossUserWarning:-moz-locale-dir(rtl) {
+  background-position-x: right 2px;
+}
+
 #releasenotes {
   margin-inline-start: 6px !important;
 }
 
 #telemetryLearnMore,
 #crashReporterLearnMore {
   margin-inline-end: 4px !important;
 }