Bug 901749 - Fix what preference "Activate all plugins by default" in SeaMonkey preferences window sets, activate click-to-play UI by default in about:addons, r=Neil
authorFrank Wein <mcsmurf@mcsmurf.de>
Tue, 20 Aug 2013 17:41:48 +0200
changeset 16415 f50955f8a0c39faa72eb99a916f1990e9573360c
parent 16414 b849afd13de156ded41fb876c194c730a5fd9d1d
child 16416 3d4ecfb6eeb2b781394c24543094a15245f0e3b5
push id1019
push userbugzilla@standard8.plus.com
push dateMon, 28 Oct 2013 22:08:40 +0000
treeherdercomm-beta@c81d5f517a5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs901749
Bug 901749 - Fix what preference "Activate all plugins by default" in SeaMonkey preferences window sets, activate click-to-play UI by default in about:addons, r=Neil CLOSED TREE
suite/browser/browser-prefs.js
suite/common/pref/pref-scripts.xul
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -735,17 +735,17 @@ pref("dom.ipc.plugins.enabled", true);
 
 // plugin finder service url
 pref("pfs.datasource.url", "https://pfs.mozilla.org/plugins/PluginFinderService.php?mimetype=%PLUGIN_MIMETYPE%&appID=%APP_ID%&appVersion=%APP_VERSION%&clientOS=%CLIENT_OS%&chromeLocale=%CHROME_LOCALE%");
 pref("plugins.update.url", "https://www.mozilla.org/%LOCALE%/plugincheck/");
 pref("plugins.update.notifyUser", false);
 pref("plugins.hide_infobar_for_outdated_plugin", false);
 pref("plugins.hide_infobar_for_carbon_failure_plugin", false);
 pref("plugins.hide_infobar_for_missing_plugin", false);
-pref("plugins.click_to_play", false);
+pref("plugins.click_to_play", true);
 pref("plugin.disable", false);
 
 #ifndef XP_MACOSX
 // Restore the spinner that was removed in bug 481359
 pref("ui.use_activity_cursor", true);
 #endif
 
 #ifdef XP_MACOSX
--- a/suite/common/pref/pref-scripts.xul
+++ b/suite/common/pref/pref-scripts.xul
@@ -31,22 +31,22 @@
                   name="dom.disable_image_src_set"
                   type="bool" inverted="true"/>
       <preference id="dom.event.contextmenu.enabled"
                   name="dom.event.contextmenu.enabled"
                   type="bool"/>
       <preference id="plugin.disable"
                   name="plugin.disable"
                   type="bool" inverted="true"/>
-      <preference id="plugins.click_to_play"
-                  name="plugins.click_to_play"
-                  type="bool" inverted="true"/>
       <preference id="plugins.hide_infobar_for_missing_plugin"
                   name="plugins.hide_infobar_for_missing_plugin"
                   type="bool" inverted="true"/>
+      <preference id="plugin.default.state"
+                  name="plugin.default.state"
+                  type="int"/>
     </preferences>
 
     <groupbox id="javascriptPreferences" flex="1">
       <caption label="&enableJavaScript.label;"/>
 
       <checkbox id="javascriptAllowNavigator"
                 label="&navigator.label;"
                 accesskey="&navigator.accesskey;"
@@ -90,17 +90,19 @@
       -->
     </groupbox>
 
     <groupbox id="pageRequiresPlugins">
       <caption label="&whenPageRequiresPlugins.label;"/>
       <checkbox id="activateAllPlugins"
                 label="&activateAllPlugins.label;"
                 accesskey="&activateAllPlugins.accesskey;"
-                preference="plugins.click_to_play"/>
+                preference="plugin.default.state"
+                onsyncfrompreference="return document.getElementById(this.getAttribute('preference')).value == 2;"
+                onsynctopreference="return this.checked ? 2 : 1;"/>
       <checkbox id="warnPluginsRequired"
                 label="&warnPluginsRequired.label;"
                 accesskey="&warnPluginsRequired.accesskey;"
                 preference="plugins.hide_infobar_for_missing_plugin"/>
     </groupbox>
     
   </prefpane>
 </overlay>