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, a=IanN
authorFrank Wein <mcsmurf@mcsmurf.de>
Tue, 20 Aug 2013 17:41:48 +0200
changeset 14503 839a532b06b81af7a5cc9327bff24b962140d123
parent 14502 7febcfcd0ccd8e9e8236dc4fc329bbbdeb9866b8
child 14504 8d73909e4a3e42f8b3e974edc74546fe2cc92019
push id1032
push usermcsmurf@mcsmurf.de
push dateFri, 23 Aug 2013 11:45:43 +0000
treeherdercomm-aurora@839a532b06b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, IanN
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, a=IanN 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>