Bug 1508236 - Remove broadcasters from mail/components/compose. r=aceman
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Mon, 26 Nov 2018 23:34:40 +0200
changeset 33785 fbf6d186a18a44e793e414fdd5715d2234e3cfd6
parent 33784 69c428e7b3173330e73549004f72ec00b49fd476
child 33786 8199346174a7d9de8f882c52e3d02f9867eecc00
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersaceman
bugs1508236
Bug 1508236 - Remove broadcasters from mail/components/compose. r=aceman
mail/components/compose/content/MsgComposeCommands.js
mail/components/compose/content/messengercompose.xul
mail/extensions/smime/content/msgCompSMIMEOverlay.js
mail/themes/linux/jar.mn
mail/themes/linux/mail/smime/msgCompSMIMEOverlay.css
mail/themes/linux/mail/smime/smime-compose.css
mail/themes/osx/jar.mn
mail/themes/osx/mail/smime/msgCompSMIMEOverlay.css
mail/themes/osx/mail/smime/smime-compose.css
mail/themes/shared/jar.inc.mn
mail/themes/shared/mail/smime/smime-compose.css
mail/themes/windows/jar.mn
mail/themes/windows/mail/smime/msgCompSMIMEOverlay.css
mail/themes/windows/mail/smime/smime-compose.css
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -6214,23 +6214,27 @@ function toggleAddressPicker() {
   // Caveat: This function erroneously assumes that only abContactsPanel can
   // be shown in the sidebar browser, so it will fail if any other src is shown
   // as we do not reliably enforce abContactsPanel.xul as src of the sidebar
   // <browser>. Currently we don't show anything else in the sidebar, but
   // add-ons might.
   let sidebarBox = document.getElementById("sidebar-box");
   let sidebarSplitter = document.getElementById("sidebar-splitter");
   let sidebar = document.getElementById("sidebar");
-  let viewAddressPicker = document.getElementById("viewAddressPicker");
+  let sidebarAddrMenu = document.getElementById("menu_AddressSidebar");
+  let contactsButton = document.getElementById("button-contacts");
 
   if (sidebarBox.hidden) {
     // Show contacts sidebar.
     sidebarBox.hidden = false;
     sidebarSplitter.hidden = false;
-    viewAddressPicker.setAttribute("checked", "true");
+    sidebarAddrMenu.setAttribute("checked", "true");
+    if (contactsButton) {
+      contactsButton.setAttribute("checked", "true");
+    }
 
     let sidebarUrl = sidebar.getAttribute("src");
     // If we have yet to initialize the src URL on the sidebar, then go ahead
     // and do so now... We do this lazily here, so we don't spend time when
     // bringing up the compose window loading the address book data sources.
     // Only when the user opens the address picker, do we set the src URL
     // for the sidebar.
     if (sidebarUrl == "")
@@ -6248,17 +6252,20 @@ function toggleAddressPicker() {
       if ("blur" in elem)
         elem.blur();
       elem.removeAttribute("focused");
     }
 
     sidebarBox.hidden = true;
     sidebarSplitter.hidden = true;
     sidebarBox.setAttribute("sidebarVisible", "false");
-    viewAddressPicker.removeAttribute("checked");
+    sidebarAddrMenu.removeAttribute("checked");
+    if (contactsButton) {
+      contactsButton.removeAttribute("checked");
+    }
 
     // If nothing is focused in the main compose frame, focus subject if empty
     // otherwise the body. If we didn't do that, focus may stay inside the closed
     // Contacts sidebar and then the main window/frame does not respond to accesskeys.
     // This may be fixed by bug 570835.
     let composerBox = document.getElementById("headers-parent");
     let focusedElement = composerBox.querySelector(":focus") ||
                          composerBox.querySelector('[focused="true"]');
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/folderMenus.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/attachmentList.css" type="text/css"?>
-<?xml-stylesheet href="chrome://messenger/skin/smime/msgCompSMIMEOverlay.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/smime/smime-compose.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/compacttheme.css" type="text/css" alternate="yes" title="Light/Dark"?>
 
 <!DOCTYPE window [
   <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
   %messengercomposeDTD;
   <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
   %brandDTD;
   <!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
@@ -386,25 +386,16 @@
   <command id="cmd_convertAttachment" oncommand="goDoCommand('cmd_convertAttachment')"/>
   <command id="cmd_cancelUpload" oncommand="goDoCommand('cmd_cancelUpload')"/>
   <command id="cmd_customizeFromAddress" oncommand="MakeFromFieldEditable();"
            checked="false" label="&customizeFromAddress.label;"/>
 </commandset>
 
   <command id="cmd_doNotRemindForAttachments" oncommand="disableAttachmentReminder();"/>
 
-<broadcasterset id="composeBroadcasters">
-  <broadcaster id="args" value="editorType=default"/>
-  <broadcaster id="viewAddressPicker" autoCheck="false" type="checkbox" oncommand="toggleAddressPicker();"/>
-  <broadcaster id="securityStatus" crypto="" signing=""/>
-</broadcasterset>
-
-<observes element="securityStatus" attribute="crypto" />
-<observes element="securityStatus" attribute="signing" />
-
 <keyset id="tasksKeys">
   <!-- File Menu -->
 #ifdef XP_MACOSX
   <!-- Mac has Command+M as system shortcut to minimize current window, so we offer Command+Shift+M for New Message,
        in addition to cross-platform Command+N. With goOpenNewMessage(), pass null instead of event because
        we don't allow Shift in *keyboard shortcuts* for toggling HTML vs. plaintext format, see bug 672475.
     -->
   <key id="key_newMessage" key="&newMessage.key;" oncommand="goOpenNewMessage(null);" modifiers="accel,shift"/>
@@ -1008,17 +999,20 @@
               <menuseparator id="fullZoomAfterResetSeparator"/>
               <menuitem id="menu_fullZoomToggle" label="&fullZoomToggleCmd.label;"
                         accesskey="&fullZoomToggleCmd.accesskey;"
                         type="checkbox" command="cmd_fullZoomToggle" checked="false"/>
             </menupopup>
           </menu>
           <menuitem id="menu_AddressSidebar"
                     label="&addressSidebar.label;" accesskey="&addressSidebar.accesskey;"
-                    key="key_addressSidebar" observes="viewAddressPicker"/>
+                    type="checkbox"
+                    autoCheck="false"
+                    key="key_addressSidebar"
+                    oncommand="toggleAddressPicker();"/>
           <menuitem id="menu_toggleAttachmentPane"
                     label="&toggleAttachmentPaneCmd.label;"
                     accesskey="&toggleAttachmentPaneCmd.accesskey;"
                     type="checkbox"
                     key="key_toggleAttachmentPane"
                     command="cmd_toggleAttachmentPane"/>
           <menuseparator id="viewMenuBeforeSecurityStatusSeparator"/>
           <menuitem id="menu_viewSecurityStatus"
@@ -1723,17 +1717,18 @@
                now_tooltiptext="&sendButton.tooltip;"
                later_label="&sendLaterCmd.label;"
                later_tooltiptext="&sendlaterButton.tooltip;">
     </toolbarbutton>
 
     <toolbarbutton class="toolbarbutton-1"
                id="button-contacts" label="&addressButton.label;"
                tooltiptext="&addressButton.tooltip;"
-               observes="viewAddressPicker"/>
+               autoCheck="false" type="checkbox"
+               oncommand="toggleAddressPicker();"/>
 
     <toolbarbutton class="toolbarbutton-1" type="menu-button"
                id="button-attach" label="&attachButton.label;"
                tooltiptext="&attachButton.tooltip2;"
                command="cmd_attachFile"
                ondragover="nsDragAndDrop.dragOver(event, envelopeDragObserver);"
                ondrop="nsDragAndDrop.drop(event, envelopeDragObserver);"
                ondragexit="nsDragAndDrop.dragExit(event, envelopeDragObserver);">
--- a/mail/extensions/smime/content/msgCompSMIMEOverlay.js
+++ b/mail/extensions/smime/content/msgCompSMIMEOverlay.js
@@ -191,36 +191,32 @@ function doSecurityButton()
     case "show":
     default:
       showMessageComposeSecurityStatus();
   }
 }
 
 function setNoSignatureUI()
 {
-  top.document.getElementById("securityStatus").removeAttribute("signing");
-  top.document.getElementById("signing-status").collapsed = true;
+  top.document.getElementById("signing-status").classList.remove("signing-msg");
 }
 
 function setSignatureUI()
 {
-  top.document.getElementById("securityStatus").setAttribute("signing", "ok");
-  top.document.getElementById("signing-status").collapsed = false;
+  top.document.getElementById("signing-status").classList.add("signing-msg");
 }
 
 function setNoEncryptionUI()
 {
-  top.document.getElementById("securityStatus").removeAttribute("crypto");
-  top.document.getElementById("encryption-status").collapsed = true;
+  top.document.getElementById("encryption-status").classList.remove("encrypting-msg");
 }
 
 function setEncryptionUI()
 {
-  top.document.getElementById("securityStatus").setAttribute("crypto", "ok");
-  top.document.getElementById("encryption-status").collapsed = false;
+  top.document.getElementById("encryption-status").classList.add("encrypting-msg");
 }
 
 function showMessageComposeSecurityStatus()
 {
   Recipients2CompFields(gMsgCompose.compFields);
 
   window.openDialog(
     "chrome://messenger-smime/content/msgCompSecurityInfo.xul",
--- a/mail/themes/linux/jar.mn
+++ b/mail/themes/linux/jar.mn
@@ -100,17 +100,17 @@ classic.jar:
   skin/classic/messenger-newsblog/icons/rss-feed.png          (mail/newsblog/rss-feed.png)
   skin/classic/messenger-newsblog/icons/server-rss.png        (mail/newsblog/server-rss.png)
   skin/classic/messenger/preferences/alwaysAsk.png            (mail/preferences/alwaysAsk.png)
   skin/classic/messenger/preferences/preferences.css          (mail/preferences/preferences.css)
   skin/classic/messenger/preferences/applications.css         (mail/preferences/applications.css)
   skin/classic/messenger/preferences/auth-error.png           (mail/preferences/auth-error.png)
   skin/classic/messenger/preferences/dialog.css               (mail/preferences/dialog.css)
   skin/classic/messenger/preferences/aboutPreferences.css     (mail/preferences/aboutPreferences.css)
-  skin/classic/messenger/smime/msgCompSMIMEOverlay.css        (mail/smime/msgCompSMIMEOverlay.css)
+  skin/classic/messenger/smime/smime-compose.css              (mail/smime/smime-compose.css)
   skin/classic/messenger/smime/msgHdrViewSMIMEOverlay.css     (mail/smime/msgHdrViewSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSMIMEOverlay.css        (mail/smime/msgReadSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSecurityInfo.css        (mail/smime/msgReadSecurityInfo.css)
   skin/classic/messenger/smime/msgCompSecurityInfo.css        (mail/smime/msgCompSecurityInfo.css)
   skin/classic/messenger/smime/certFetchingStatus.css         (mail/smime/certFetchingStatus.css)
   skin/classic/messenger/smime/icons/hdrCryptoNotOk.png       (mail/smime/hdrCryptoNotOk.png)
   skin/classic/messenger/smime/icons/hdrCryptoOk.png          (mail/smime/hdrCryptoOk.png)
   skin/classic/messenger/smime/icons/hdrSignNotOk.png         (mail/smime/hdrSignNotOk.png)
rename from mail/themes/linux/mail/smime/msgCompSMIMEOverlay.css
rename to mail/themes/linux/mail/smime/smime-compose.css
--- a/mail/themes/linux/mail/smime/msgCompSMIMEOverlay.css
+++ b/mail/themes/linux/mail/smime/smime-compose.css
@@ -1,45 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* ===== msgCompSMIMEOverlay.css ========================================
+/* ===== smime-compose.css ========================================
   == Styles for the S/Mime in composer window.
   ======================================================================= */
-
+@import url("chrome://messenger/skin/shared/smime/smime-compose.css");
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
-#msgcomposeWindow #signing-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[signing="ok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[signing="notok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignNotOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow #encryption-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[crypto="ok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[crypto="notok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoNotOk.png");
-  visibility: visible;
-}
-
 /* Stock icons for the menu bar items. */
 #menu_viewSecurityStatus,
 #menu_securityStatus2 {
   list-style-image: url("moz-icon://stock/gtk-info?size=menu");
 }
--- a/mail/themes/osx/jar.mn
+++ b/mail/themes/osx/jar.mn
@@ -120,17 +120,17 @@ classic.jar:
   skin/classic/messenger/preferences/alwaysAsk.png               (mail/preferences/alwaysAsk.png)
   skin/classic/messenger/preferences/application.png             (mail/preferences/application.png)
   skin/classic/messenger/preferences/saveFile.png                (mail/preferences/saveFile.png)
   skin/classic/messenger/preferences/preferences.css             (mail/preferences/preferences.css)
   skin/classic/messenger/preferences/applications.css            (mail/preferences/applications.css)
   skin/classic/messenger/preferences/auth-error.png              (mail/preferences/auth-error.png)
   skin/classic/messenger/preferences/dialog.css                  (mail/preferences/dialog.css)
   skin/classic/messenger/preferences/aboutPreferences.css        (mail/preferences/aboutPreferences.css)
-  skin/classic/messenger/smime/msgCompSMIMEOverlay.css           (mail/smime/msgCompSMIMEOverlay.css)
+  skin/classic/messenger/smime/smime-compose.css                 (mail/smime/smime-compose.css)
   skin/classic/messenger/smime/msgHdrViewSMIMEOverlay.css        (mail/smime/msgHdrViewSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSMIMEOverlay.css           (mail/smime/msgReadSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSecurityInfo.css           (mail/smime/msgReadSecurityInfo.css)
   skin/classic/messenger/smime/msgCompSecurityInfo.css           (mail/smime/msgCompSecurityInfo.css)
   skin/classic/messenger/smime/certFetchingStatus.css            (mail/smime/certFetchingStatus.css)
   skin/classic/messenger/smime/icons/sbSignOk.png                (mail/smime/sbSignOk.png)
   skin/classic/messenger/smime/icons/sbSignUnknown.png           (mail/smime/sbSignUnknown.png)
   skin/classic/messenger/smime/icons/sbSignNotOk.png             (mail/smime/sbSignNotOk.png)
rename from mail/themes/osx/mail/smime/msgCompSMIMEOverlay.css
rename to mail/themes/osx/mail/smime/smime-compose.css
--- a/mail/themes/osx/mail/smime/msgCompSMIMEOverlay.css
+++ b/mail/themes/osx/mail/smime/smime-compose.css
@@ -1,41 +1,9 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* ===== msgCompSMIMEOverlay.css ========================================
+/* ===== smime-compose.css ========================================
   == Styles for the S/Mime in composer window.
   ======================================================================= */
-
+@import url("chrome://messenger/skin/shared/smime/smime-compose.css");
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-#msgcomposeWindow #signing-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[signing="ok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[signing="notok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignNotOk.png");
-  visibility: visible;
-}
-
-
-#msgcomposeWindow #encryption-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[crypto="ok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[crypto="notok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoNotOk.png");
-  visibility: visible;
-}
-
--- a/mail/themes/shared/jar.inc.mn
+++ b/mail/themes/shared/jar.inc.mn
@@ -98,16 +98,17 @@
   skin/classic/messenger/shared/in-content/general.svg        (../shared/mail/incontentprefs/general.svg)
   skin/classic/messenger/shared/in-content/privacy.svg        (../shared/mail/incontentprefs/privacy.svg)
   skin/classic/messenger/shared/in-content/security.svg       (../shared/mail/incontentprefs/security.svg)
   skin/classic/messenger/shared/mailWindow1.css               (../shared/mail/mailWindow1.css)
   skin/classic/messenger/shared/messageHeader.css             (../shared/mail/messageHeader.css)
   skin/classic/messenger/shared/messenger.css                 (../shared/mail/messenger.css)
   skin/classic/messenger/shared/messengercompose.css          (../shared/mail/messengercompose.css)
   skin/classic/messenger/shared/tabmail.css                   (../shared/mail/tabmail.css)
+  skin/classic/messenger/shared/smime/smime-compose.css       (../shared/mail/smime/smime-compose.css)
 #ifndef XP_MACOSX
   skin/classic/messenger/icons/anchor.svg                     (../shared/mail/icons/anchor.svg)
   skin/classic/messenger/icons/bold.svg                       (../shared/mail/icons/bold.svg)
   skin/classic/messenger/icons/bullet-list.svg                (../shared/mail/icons/bullet-list.svg)
   skin/classic/messenger/messengercompose/format-dropmarker.svg (../shared/mail/icons/format-dropmarker.svg)
   skin/classic/messenger/icons/center-align.svg               (../shared/mail/icons/center-align.svg)
   skin/classic/messenger/icons/decrease.svg                   (../shared/mail/icons/decrease.svg)
   skin/classic/messenger/icons/hline.svg                      (../shared/mail/icons/hline.svg)
copy from mail/themes/linux/mail/smime/msgCompSMIMEOverlay.css
copy to mail/themes/shared/mail/smime/smime-compose.css
--- a/mail/themes/linux/mail/smime/msgCompSMIMEOverlay.css
+++ b/mail/themes/shared/mail/smime/smime-compose.css
@@ -1,45 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* ===== msgCompSMIMEOverlay.css ========================================
+/* ===== smime-compose.css ========================================
   == Styles for the S/Mime in composer window.
   ======================================================================= */
-
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
-#msgcomposeWindow #signing-status {
+#signing-status,
+#encryption-status {
   list-style-image: none;
   visibility: collapse;
 }
 
-#msgcomposeWindow[signing="ok"] #signing-status {
+#signing-status.signing-msg {
   list-style-image: url("chrome://messenger/skin/smime/icons/sbSignOk.png");
   visibility: visible;
 }
 
-#msgcomposeWindow[signing="notok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignNotOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow #encryption-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[crypto="ok"] #encryption-status {
+#encryption-status.encrypting-msg {
   list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoOk.png");
   visibility: visible;
 }
-
-#msgcomposeWindow[crypto="notok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoNotOk.png");
-  visibility: visible;
-}
-
-/* Stock icons for the menu bar items. */
-#menu_viewSecurityStatus,
-#menu_securityStatus2 {
-  list-style-image: url("moz-icon://stock/gtk-info?size=menu");
-}
--- a/mail/themes/windows/jar.mn
+++ b/mail/themes/windows/jar.mn
@@ -96,17 +96,17 @@ classic.jar:
   skin/classic/messenger/preferences/aboutPreferences.css     (mail/preferences/aboutPreferences.css)
   skin/classic/messenger/preferences/alwaysAsk.png            (mail/preferences/alwaysAsk.png)
   skin/classic/messenger/preferences/application.png          (mail/preferences/application.png)
   skin/classic/messenger/preferences/applications.css         (mail/preferences/applications.css)
   skin/classic/messenger/preferences/auth-error.png           (mail/preferences/auth-error.png)
   skin/classic/messenger/preferences/dialog.css               (mail/preferences/dialog.css)
   skin/classic/messenger/preferences/preferences.css          (mail/preferences/preferences.css)
   skin/classic/messenger/preferences/saveFile.png             (mail/preferences/saveFile.png)
-  skin/classic/messenger/smime/msgCompSMIMEOverlay.css        (mail/smime/msgCompSMIMEOverlay.css)
+  skin/classic/messenger/smime/smime-compose.css              (mail/smime/smime-compose.css)
   skin/classic/messenger/smime/msgHdrViewSMIMEOverlay.css     (mail/smime/msgHdrViewSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSMIMEOverlay.css        (mail/smime/msgReadSMIMEOverlay.css)
   skin/classic/messenger/smime/msgReadSecurityInfo.css        (mail/smime/msgReadSecurityInfo.css)
   skin/classic/messenger/smime/msgCompSecurityInfo.css        (mail/smime/msgCompSecurityInfo.css)
   skin/classic/messenger/smime/certFetchingStatus.css         (mail/smime/certFetchingStatus.css)
   skin/classic/messenger/smime/icons/hdrCryptoNotOk.png       (mail/smime/hdrCryptoNotOk.png)
   skin/classic/messenger/smime/icons/hdrCryptoOk.png          (mail/smime/hdrCryptoOk.png)
   skin/classic/messenger/smime/icons/hdrSignNotOk.png         (mail/smime/hdrSignNotOk.png)
rename from mail/themes/windows/mail/smime/msgCompSMIMEOverlay.css
rename to mail/themes/windows/mail/smime/smime-compose.css
--- a/mail/themes/windows/mail/smime/msgCompSMIMEOverlay.css
+++ b/mail/themes/windows/mail/smime/smime-compose.css
@@ -1,39 +1,9 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* ===== msgCompSMIMEOverlay.css ========================================
+/* ===== smime-compose.css ========================================
   == Styles for the S/Mime in composer window.
   ======================================================================= */
-
+@import url("chrome://messenger/skin/shared/smime/smime-compose.css");
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-#msgcomposeWindow #signing-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow #encryption-status {
-  list-style-image: none;
-  visibility: collapse;
-}
-
-#msgcomposeWindow[signing="ok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[signing="notok"] #signing-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbSignNotOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[crypto="ok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoOk.png");
-  visibility: visible;
-}
-
-#msgcomposeWindow[crypto="notok"] #encryption-status {
-  list-style-image: url("chrome://messenger/skin/smime/icons/sbCryptoNotOk.png");
-  visibility: visible;
-}