diff --git a/chat/components/public/prplIMessage.idl b/chat/components/public/prplIMessage.idl index f4d5b19c46..225d322c58 100644 --- a/chat/components/public/prplIMessage.idl +++ b/chat/components/public/prplIMessage.idl @@ -67,6 +67,8 @@ interface prplIMessage: nsISupports { readonly attribute boolean noLinkification; /* Do not collapse the message. */ readonly attribute boolean noCollapse; + /* Message is encrypted */ + readonly attribute boolean isEncrypted; /** * Get an array of actions the user may perform on this message. diff --git a/chat/components/src/imConversations.jsm b/chat/components/src/imConversations.jsm index f53b64ea80..ba4906a884 100644 --- a/chat/components/src/imConversations.jsm +++ b/chat/components/src/imConversations.jsm @@ -117,6 +117,9 @@ imMessage.prototype = { get noCollapse() { return this.prplMessage.noCollapse; }, + get isEncrypted() { + return this.prplMessage.isEncrypted; + }, get originalMessage() { return this.prplMessage.originalMessage; }, diff --git a/chat/components/src/logger.jsm b/chat/components/src/logger.jsm index 9863d83dc7..f529b76d20 100644 --- a/chat/components/src/logger.jsm +++ b/chat/components/src/logger.jsm @@ -330,6 +330,7 @@ LogWriter.prototype = { "containsImages", "notification", "noLinkification", + "isEncrypted", ].filter(f => aMessage[f]), }; let alias = aMessage.alias; diff --git a/chat/locales/en-US/conversations.properties b/chat/locales/en-US/conversations.properties index 1a5564a6ec..3b20573782 100644 --- a/chat/locales/en-US/conversations.properties +++ b/chat/locales/en-US/conversations.properties @@ -78,3 +78,8 @@ messenger.conversations.selections.ellipsis=[…] messenger.conversations.selections.systemMessagesTemplate=%time% - %message% messenger.conversations.selections.contentMessagesTemplate=%time% - %sender%: %message% messenger.conversations.selections.actionMessagesTemplate=%time% * %sender% %message% + +# LOCALIZATION NOTE (message.status): +# This is used as title attribute for the visible lock icon in case a message +# was sent encrypted through the OTR protocol. +message.status=Message encrypted diff --git a/chat/modules/imThemes.jsm b/chat/modules/imThemes.jsm index f063e4ccea..512fe7dc4b 100644 --- a/chat/modules/imThemes.jsm +++ b/chat/modules/imThemes.jsm @@ -51,6 +51,10 @@ XPCOMUtils.defineLazyGetter(this, "gTimeFormatter", () => { }); }); +XPCOMUtils.defineLazyGetter(this, "bundle", () => + Services.strings.createBundle("chrome://chat/locale/conversations.properties") +); + ChromeUtils.defineModuleGetter( this, "ToLocaleFormat", @@ -480,6 +484,12 @@ var statusMessageReplacements = { return msgClass.join(" "); }, + encryptedClass(aMsg) { + return aMsg.encrypted ? "show" : ""; + }, + encryptedMessage(aMsg) { + return bundle.GetStringFromName("message.status"); + }, }; function formatSender(aName) { diff --git a/chat/modules/jsProtoHelper.jsm b/chat/modules/jsProtoHelper.jsm index 32d8f3bb6d..2186274304 100644 --- a/chat/modules/jsProtoHelper.jsm +++ b/chat/modules/jsProtoHelper.jsm @@ -594,6 +594,7 @@ var GenericMessagePrototype = { notification: false, noLinkification: false, noCollapse: false, + isEncrypted: false, getActions() { return []; diff --git a/chat/themes/conv.css b/chat/themes/conv.css index dc8e0cdbc0..f460db7e89 100644 --- a/chat/themes/conv.css +++ b/chat/themes/conv.css @@ -8,7 +8,7 @@ } .ib-img-smile { - vertical-align: text-bottom; + vertical-align: middle; } *:any-link .ib-img-smile { diff --git a/mail/components/im/jar.mn b/mail/components/im/jar.mn index 443f2f06d0..8c402b0b0f 100644 --- a/mail/components/im/jar.mn +++ b/mail/components/im/jar.mn @@ -25,10 +25,6 @@ messenger.jar: content/messenger/chat/chat-conversation-info.js (content/chat-conversation-info.js) content/messenger/chat/toolbarbutton-badge-button.js (content/toolbarbutton-badge-button.js) % skin messenger-messagestyles classic/1.0 %skin/classic/messenger/messages/ - skin/classic/messenger/messages/mail/Bitmaps/minus-hover.png (messages/mail/Bitmaps/minus-hover.png) - skin/classic/messenger/messages/mail/Bitmaps/minus.png (messages/mail/Bitmaps/minus.png) - skin/classic/messenger/messages/mail/Bitmaps/plus-hover.png (messages/mail/Bitmaps/plus-hover.png) - skin/classic/messenger/messages/mail/Bitmaps/plus.png (messages/mail/Bitmaps/plus.png) skin/classic/messenger/messages/mail/Footer.html (messages/mail/Footer.html) skin/classic/messenger/messages/mail/Incoming/buddy_icon.png (messages/mail/Incoming/buddy_icon.png) skin/classic/messenger/messages/mail/Outgoing/buddy_icon.png (messages/mail/Incoming/buddy_icon.png) diff --git a/mail/components/im/messages/mail/Bitmaps/minus-hover.png b/mail/components/im/messages/mail/Bitmaps/minus-hover.png deleted file mode 100644 index 93a69cc789..0000000000 Binary files a/mail/components/im/messages/mail/Bitmaps/minus-hover.png and /dev/null differ diff --git a/mail/components/im/messages/mail/Bitmaps/minus.png b/mail/components/im/messages/mail/Bitmaps/minus.png deleted file mode 100644 index 72107d151f..0000000000 Binary files a/mail/components/im/messages/mail/Bitmaps/minus.png and /dev/null differ diff --git a/mail/components/im/messages/mail/Bitmaps/plus-hover.png b/mail/components/im/messages/mail/Bitmaps/plus-hover.png deleted file mode 100644 index 4509b17c0e..0000000000 Binary files a/mail/components/im/messages/mail/Bitmaps/plus-hover.png and /dev/null differ diff --git a/mail/components/im/messages/mail/Bitmaps/plus.png b/mail/components/im/messages/mail/Bitmaps/plus.png deleted file mode 100644 index eaf364177d..0000000000 Binary files a/mail/components/im/messages/mail/Bitmaps/plus.png and /dev/null differ diff --git a/mail/components/im/messages/mail/Footer.html b/mail/components/im/messages/mail/Footer.html index 97f2c6df16..2533d876f9 100644 --- a/mail/components/im/messages/mail/Footer.html +++ b/mail/components/im/messages/mail/Footer.html @@ -3,33 +3,32 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> diff --git a/mail/components/im/messages/mail/Incoming/Content.html b/mail/components/im/messages/mail/Incoming/Content.html index 06e73261f9..2b0a4f2e9d 100644 --- a/mail/components/im/messages/mail/Incoming/Content.html +++ b/mail/components/im/messages/mail/Incoming/Content.html @@ -1 +1 @@ -
+ diff --git a/mail/components/im/messages/mail/Incoming/Context.html b/mail/components/im/messages/mail/Incoming/Context.html index 5758431050..615de19423 100644 --- a/mail/components/im/messages/mail/Incoming/Context.html +++ b/mail/components/im/messages/mail/Incoming/Context.html @@ -1 +1 @@ - + diff --git a/mail/components/im/messages/mail/Incoming/NextContent.html b/mail/components/im/messages/mail/Incoming/NextContent.html index 7824f2323b..cb99c1c668 100644 --- a/mail/components/im/messages/mail/Incoming/NextContent.html +++ b/mail/components/im/messages/mail/Incoming/NextContent.html @@ -1 +1 @@ - + diff --git a/mail/components/im/messages/mail/NextStatus.html b/mail/components/im/messages/mail/NextStatus.html index 6c231ed59b..26dd6fac41 100644 --- a/mail/components/im/messages/mail/NextStatus.html +++ b/mail/components/im/messages/mail/NextStatus.html @@ -1,2 +1 @@ - - +%message%