Bug 747765 - Cannot add/remove Print icon in Composer toolbar r=Neil
authorIan Neal <iann_cvs@blueyonder.co.uk>
Mon, 23 Apr 2012 18:22:31 +0100
changeset 11702 32d4b5f03e29c59e8d4e9657a8a91e135e2968a3
parent 11701 ff9100b843685e429399b2301858984f7be5a5c6
child 11703 16341689f26dfd5d1802d6d853ed71be291b18b1
push idunknown
push userunknown
push dateunknown
reviewersNeil
bugs747765
Bug 747765 - Cannot add/remove Print icon in Composer toolbar r=Neil
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)