Bug 747765 - Cannot add/remove Print icon in Composer toolbar r=Neil a=Callek
authorIan Neal <iann_cvs@blueyonder.co.uk>
Mon, 23 Apr 2012 18:24:00 +0100
changeset 11247 4f865952d02beb9d993bf77fd9304af9a5c4b490
parent 11246 88ca33153d6aec52c9db181f3ecffb2723692cf9
child 11248 2e0666f06d6b08f302c74e15f2bb9b9a8796b138
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, Callek
bugs747765
Bug 747765 - Cannot add/remove Print icon in Composer toolbar r=Neil a=Callek
editor/ui/composer/content/editor.js
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -121,18 +121,19 @@ function ShowHideToolbarSeparators(toolb
   }
 }
 
 function ShowHideToolbarButtons()
 {
   var array = gPrefs.getChildList(kEditorToolbarPrefs);
   for (var i in array) {
     var prefName = array[i];
-    var id = prefName.substr(kEditorToolbarPrefs.length) + "Button";
-    var button = document.getElementById(id);
+    var id = prefName.substr(kEditorToolbarPrefs.length);
+    var button = document.getElementById(id + "Button") ||
+                 document.getElementById(id + "-button");
     if (button)
       button.hidden = !gPrefs.getBoolPref(prefName);
   }
   ShowHideToolbarSeparators(document.getElementById("EditToolbar"));
   ShowHideToolbarSeparators(document.getElementById("FormatToolbar"));
 }
   
 function nsPrefListener(prefName)