fix for #46619. show the attachment icon in the thread pane if the message
has an attachment. until we get a "news message with attachment" icon, use the "mail message with attachment" icon. r/sr=mscott,bienvenu git-svn-id: svn://10.0.0.236/trunk@91548 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -55,6 +55,7 @@ interface nsIMsgHdr : nsISupports
|
||||
// Mark message routines
|
||||
void markRead(in boolean read);
|
||||
void markFlagged(in boolean flagged);
|
||||
void markHasAttachments(in boolean hasAttachments);
|
||||
|
||||
attribute nsMsgPriorityValue priority;
|
||||
void setPriorityString(in string priority);
|
||||
|
||||
@@ -268,8 +268,22 @@ var messageHeaderSink = {
|
||||
|
||||
handleAttachment: function(contentType, url, displayName, uri, notDownloaded)
|
||||
{
|
||||
var numAttachments = currentAttachments.length;
|
||||
currentAttachments.push (new createNewAttachmentInfo(contentType, url, displayName, uri, notDownloaded));
|
||||
// if we have an attachment, set the MSG_FLAG_ATTACH flag on the hdr
|
||||
// this will cause the "message with attachment" icon to show up
|
||||
// in the thread pane
|
||||
// we only need to do this on the first attachment
|
||||
var numAttachments = currentAttachments.length;
|
||||
if (numAttachments == 1) {
|
||||
try {
|
||||
// convert the uri into a hdr
|
||||
var hdr = messenger.messageServiceFromURI(uri).messageURIToMsgHdr(uri);
|
||||
hdr.markHasAttachments(true);
|
||||
}
|
||||
catch (ex) {
|
||||
dump("ex = " + ex + "\n");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onEndAllAttachments: function()
|
||||
|
||||
@@ -53,7 +53,7 @@ enum eFieldType {
|
||||
};
|
||||
|
||||
// reserve the top 8 bits in the msg flags for the view-only flags.
|
||||
#define MSG_VIEW_FLAGS 0xFE000000
|
||||
#define MSG_VIEW_FLAGS 0xEE000000
|
||||
#define MSG_VIEW_FLAG_HASCHILDREN 0x40000000
|
||||
#define MSG_VIEW_FLAG_ISTHREAD 0x8000000
|
||||
|
||||
|
||||
@@ -220,6 +220,20 @@ NS_IMETHODIMP nsMsgHdr::AndFlags(PRUint32 flags, PRUint32 *result)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgHdr::MarkHasAttachments(PRBool bHasAttachments)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if(m_mdb)
|
||||
{
|
||||
nsMsgKey key;
|
||||
rv = GetMessageKey(&key);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = m_mdb->MarkHasAttachments(key, bHasAttachments, nsnull);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgHdr::MarkRead(PRBool bRead)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
@@ -231,8 +245,6 @@ NS_IMETHODIMP nsMsgHdr::MarkRead(PRBool bRead)
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = m_mdb->MarkRead(key, bRead, nsnull);
|
||||
}
|
||||
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -247,8 +259,6 @@ NS_IMETHODIMP nsMsgHdr::MarkFlagged(PRBool bFlagged)
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = m_mdb->MarkMarked(key, bFlagged, nsnull);
|
||||
}
|
||||
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -397,6 +397,7 @@ classic.jar:
|
||||
skin/classic/messenger/message-mail.gif (messenger/message-mail.gif)
|
||||
skin/classic/messenger/message-news-new.gif (messenger/message-news-new.gif)
|
||||
skin/classic/messenger/message-news.gif (messenger/message-news.gif)
|
||||
skin/classic/messenger/message-news-attach.gif (messenger/message-news-attach.gif)
|
||||
skin/classic/messenger/more.gif (messenger/more.gif)
|
||||
skin/classic/messenger/newmsg-disabled.gif (messenger/newmsg-disabled.gif)
|
||||
skin/classic/messenger/newmsg-hover-active.gif (messenger/newmsg-hover-active.gif)
|
||||
|
||||
@@ -168,3 +168,7 @@ outlinerbody:-moz-outliner-image(subjectCol, news, new) {
|
||||
list-style-image: url("chrome://messenger/skin/message-news-new.gif");
|
||||
}
|
||||
|
||||
outlinerbody:-moz-outliner-image(subjectCol, news, attach) {
|
||||
list-style-image: url("chrome://messenger/skin/message-news-attach.gif");
|
||||
}
|
||||
|
||||
|
||||
BIN
mozilla/themes/classic/messenger/message-news-attach.gif
Normal file
BIN
mozilla/themes/classic/messenger/message-news-attach.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 891 B |
@@ -168,3 +168,7 @@ outlinerbody:-moz-outliner-image(subjectCol, news, new) {
|
||||
list-style-image: url("chrome://messenger/skin/message-news-new.gif");
|
||||
}
|
||||
|
||||
outlinerbody:-moz-outliner-image(subjectCol, news, attach) {
|
||||
list-style-image: url("chrome://messenger/skin/message-news-attach.gif");
|
||||
}
|
||||
|
||||
|
||||
@@ -609,6 +609,7 @@ modern.jar:
|
||||
skin/modern/messenger/icons/message-mail.gif (messenger/icons/message-mail.gif)
|
||||
skin/modern/messenger/icons/message-news-new.gif (messenger/icons/message-news-new.gif)
|
||||
skin/modern/messenger/icons/message-news.gif (messenger/icons/message-news.gif)
|
||||
skin/modern/messenger/icons/message-news-attach.gif (messenger/icons/message-news-attach.gif)
|
||||
skin/modern/messenger/icons/readcol-read.gif (messenger/icons/readcol-read.gif)
|
||||
skin/modern/messenger/icons/readcol-unread.gif (messenger/icons/readcol-unread.gif)
|
||||
skin/modern/messenger/icons/server-local-new.gif (messenger/icons/server-local-new.gif)
|
||||
|
||||
BIN
mozilla/themes/modern/messenger/icons/message-news-attach.gif
Normal file
BIN
mozilla/themes/modern/messenger/icons/message-news-attach.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 B |
@@ -168,3 +168,7 @@ outlinerbody:-moz-outliner-image(subjectCol, news, new) {
|
||||
list-style-image: url("chrome://messenger/skin/icons/message-news-new.gif");
|
||||
}
|
||||
|
||||
outlinerbody:-moz-outliner-image(subjectCol, news, attach) {
|
||||
list-style-image: url("chrome://messenger/skin/icons/message-news-attach.gif");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user