Add new icons to mail news 3 pane UI. r=mscott

This commit is contained in:
putterman%netscape.com 2000-04-03 02:58:21 +00:00
parent a3e669ff3d
commit 6d0c68ee48
41 changed files with 216 additions and 76 deletions

View File

@ -29,6 +29,13 @@ interface nsIMessage : nsIMsgHdr {
readonly attribute nsMsgKey msgKey;
nsIMsgFolder GetMsgFolder();
void SetMsgFolder(in nsIMsgFolder folder);
//I hate to do this, but I really don't want to use a string due to all of the
//copying around so I'm using these constants and making them part of the base interface.
const unsigned long MailMessage = 0;
const unsigned long NewsMessage = 1;
readonly attribute unsigned long messageType;
};
[scriptable, uuid(82702556-01A2-11d3-8A69-0060B0FC04D2)]

View File

@ -55,7 +55,9 @@ Rights Reserved.
Flagged="rdf:http://home.netscape.com/NC-rdf#Flagged"
Priority="rdf:http://home.netscape.com/NC-rdf#Priority"
IsUnread="rdf:http://home.netscape.com/NC-rdf#IsUnread"
IsImapDeleted="rdf:http://home.netscape.com/NC-rdf#IsImapDeleted">
HasAttachment="rdf:http://home.netscape.com/NC-rdf#HasAttachment"
IsImapDeleted="rdf:http://home.netscape.com/NC-rdf#IsImapDeleted"
MessageType="rdf:http://home.netscape.com/NC-rdf#MessageType">
<treerow>
<treecell value="rdf:http://home.netscape.com/NC-rdf#Thread"/>

View File

@ -27,7 +27,12 @@ msgHdrViewOverlay.css
subscribe.css
mailfolder.gif
open-mailfolder.gif
mail-message.gif
message-mail.gif
message-mail-new.gif
message-mail-attach.gif
message-mail-imapdelete.gif
message-news.gif
message-news-new.gif
inbox.gif
trash.gif
outbox.gif
@ -49,7 +54,7 @@ threadcol.gif
unthreadcol.gif
flagcol.gif
flaggedmail.gif
Folder.gif
folder-closed.gif
folder-draft.gif
folder-draft-open.gif
folder-draft-share.gif
@ -64,6 +69,7 @@ folder-inbox-share-open.gif
folder-mailserver.gif
folder-new.gif
folder-new-open.gif
folder-new-closed.gif
folder-newsgroup.gif
folder-newsgroup-new.gif
folder-open.gif
@ -85,8 +91,12 @@ folder-trash.gif
folder-trash-open.gif
folder-trash-share.gif
folder-trash-share-open.gif
server.gif
server-mail.gif
server-mail-new.gif
server-local.gif
server-local-new.gif
server-news.gif
server-news-new.gif
server-news-lock.gif
server-remote.gif
server-remote-lock.gif

View File

@ -35,7 +35,12 @@ EXPORT_RESOURCE_SAMPLES = \
msgHdrViewOverlay.css \
mailfolder.gif \
open-mailfolder.gif \
mail-message.gif \
message-mail.gif \
message-mail-new.gif \
message-mail-attach.gif \
message-imapdelete.gif \
message-news.gif \
message-news-new.gif \
inbox.gif \
trash.gif \
outbox.gif \
@ -58,7 +63,7 @@ EXPORT_RESOURCE_SAMPLES = \
unthreadcol.gif \
flagcol.gif \
flaggedmail.gif \
Folder.gif \
folder-closed.gif \
folder-draft.gif \
folder-draft-open.gif \
folder-draft-share.gif \
@ -73,6 +78,7 @@ EXPORT_RESOURCE_SAMPLES = \
folder-mailserver.gif \
folder-new.gif \
folder-new-open.gif \
folder-new-closed.gif \
folder-newsgroup.gif \
folder-newsgroup-new.gif \
folder-open.gif \
@ -94,8 +100,12 @@ EXPORT_RESOURCE_SAMPLES = \
folder-trash-open.gif \
folder-trash-share.gif \
folder-trash-share-open.gif \
server.gif \
server-mail.gif \
server-mail-new.gif \
server-local.gif \
server-local-new.gif \
server-news.gif \
server-news-new.gif \
server-remote.gif \
server-news-lock.gif \
server-remote-lock.gif \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 93 B

View File

@ -21,7 +21,7 @@
/* basic mail folders */
treeitem.folderTreeItem > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/Folder.gif");
list-style-image: url("chrome://messenger/skin/folder-closed.gif");
}
treeitem.folderTreeItem[open="true"] > treerow > treecell > .tree-icon
@ -29,11 +29,6 @@ treeitem.folderTreeItem[open="true"] > treerow > treecell > .tree-icon
list-style-image: url("chrome://messenger/skin/folder-open.gif");
}
treeitem[IsServer="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/server.gif");
}
/* special folder */
treeitem[SpecialFolder="Inbox"] > treerow > treecell > .tree-icon
{
@ -42,7 +37,7 @@ treeitem[SpecialFolder="Inbox"] > treerow > treecell > .tree-icon
treeitem[SpecialFolder="Inbox"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-inbox-open.gif");
list-style-image: url("chrome://messenger/skin/folder-inbox.gif");
}
treeitem[SpecialFolder="Trash"] > treerow > treecell > .tree-icon
@ -52,47 +47,17 @@ treeitem[SpecialFolder="Trash"] > treerow > treecell > .tree-icon
treeitem[SpecialFolder="Trash"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-trash-open.gif");
}
treeitem[SpecialFolder="Sent"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-sent.gif");
}
treeitem[SpecialFolder="Sent"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-sent-open.gif");
}
treeitem[SpecialFolder="Templates"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-template.gif");
}
treeitem[SpecialFolder="Templates"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-template-open.gif");
}
treeitem[SpecialFolder="Drafts"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-draft.gif");
}
treeitem[SpecialFolder="Drafts"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-draft-open.gif");
}
treeitem[SpecialFolder="Unsent Messages"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-outbox.gif");
list-style-image: url("chrome://messenger/skin/folder-trash.gif");
}
treeitem[BiffState="NewMail"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-new.gif");
list-style-image: url("chrome://messenger/skin/folder-new-closed.gif");
}
treeitem[BiffState="NewMail"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-new-open.gif");
}
treeitem[SpecialFolder="Inbox"][BiffState="NewMail"] > treerow > treecell > .tree-icon
@ -100,25 +65,27 @@ treeitem[SpecialFolder="Inbox"][BiffState="NewMail"] > treerow > treecell > .tre
list-style-image: url("chrome://messenger/skin/folder-inbox-new.gif");
}
/* IMAP folders */
treeitem[ServerType="imap"] > treerow > treecell > .tree-icon
treeitem[IsServer="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-server.gif");
list-style-image: url("chrome://messenger/skin/server-mail.gif");
}
treeitem[ServerType="imap"][open="true"] > treerow > treecell > .tree-icon
treeitem[IsServer="true"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/folder-server-open.gif");
list-style-image: url("chrome://messenger/skin/server-mail.gif");
}
/* IMAP folders */
treeitem[IsServer="true"][ServerType="imap"][IsSecure="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/server-remote-lock.gif");
}
treeitem[IsServer="true"][ServerType="imap"] > treerow > treecell > .tree-icon
/* Local servers */
treeitem[IsServer="true"][ServerType="none"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/server-remote.gif");
list-style-image: url("chrome://messenger/skin/server-local.gif");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 B

After

Width:  |  Height:  |  Size: 73 B

View File

@ -30,7 +30,12 @@ install::
$(MAKE_INSTALL) msgHdrViewOverlay.css $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) mailfolder.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) open-mailfolder.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) mail-message.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-mail.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-mail-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-mail-attach.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-mail-imapdelete.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-news.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) message-news-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) inbox.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) trash.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) outbox.gif $(DIST)\bin\chrome\messenger\skin\default
@ -53,7 +58,7 @@ install::
$(MAKE_INSTALL) unthreadcol.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) flagcol.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) flaggedmail.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) Folder.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-closed.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-draft.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-draft-open.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-draft-share.gif $(DIST)\bin\chrome\messenger\skin\default
@ -68,6 +73,7 @@ install::
$(MAKE_INSTALL) folder-mailserver.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-new-open.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-new-closed.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-newsgroup.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-newsgroup-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-open.gif $(DIST)\bin\chrome\messenger\skin\default
@ -89,8 +95,12 @@ install::
$(MAKE_INSTALL) folder-trash-open.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-trash-share.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) folder-trash-share-open.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-mail.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-mail-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-local.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-local-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-news.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-news-new.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-news-lock.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-remote.gif $(DIST)\bin\chrome\messenger\skin\default
$(MAKE_INSTALL) server-remote-lock.gif $(DIST)\bin\chrome\messenger\skin\default
@ -103,7 +113,12 @@ clobber::
rm -f $(DIST)\chrome\messenger\skin\default\threadPane.css
rm -f $(DIST)\chrome\messenger\skin\default\mailfolder.gif
rm -f $(DIST)\chrome\messenger\skin\default\open-mailfolder.gif
rm -f $(DIST)\chrome\messenger\skin\default\mail-message.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-mail.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-mail-new.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-mail-attach.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-mail-imapdelete.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-news.gif
rm -f $(DIST)\chrome\messenger\skin\default\message-news-new.gif
rm -f $(DIST)\chrome\messenger\skin\default\inbox.gif
rm -f $(DIST)\chrome\messenger\skin\default\trash.gif
rm -f $(DIST)\chrome\messenger\skin\default\outbox.gif
@ -126,13 +141,21 @@ clobber::
rm -f $(DIST)\chrome\messenger\skin\default\unthreadcol.gif
rm -f $(DIST)\chrome\messenger\skin\default\flagcol.gif
rm -f $(DIST)\chrome\messenger\skin\default\flaggedmail.gif
rm -f $(DIST)\chrome\messenger\skin\default\server.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-mail.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-mail-new.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-local.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-local-new.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-news.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-news-new.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-remote.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-remote-lock.gif
rm -f $(DIST)\chrome\messenger\skin\default\server-news-lock.gif
rm -f $(DIST)\chrome\messenger\skin\default\attach.gif
rm -f $(DIST)\chrome\messenger\skin\default\addtoab.gif
rm -f $(DIST)\chrome\messenger\skin\default\folder-closed.gif
rm -f $(DIST)\chrome\messenger\skin\default\folder-open.gif
rm -f $(DIST)\chrome\messenger\skin\default\folder-new-closed.gif
rm -f $(DIST)\chrome\messenger\skin\default\folder-new-open.gif
rm -f $(DIST)\chrome\messenger\skin\default\attach.gif
rm -f $(DIST)\chrome\messenger\skin\default\addtoab.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 75 B

View File

@ -22,11 +22,6 @@ treeitem[IsUnread="true"] > treerow {
font-weight: bold;
}
treeitem[IsImapDeleted="true"] > treerow {
font-weight: lighter;
font-style: italic;
}
treeitem[Priority="Highest"] > treerow > treecell.prioritycol > .tree-button
{
color:red;
@ -48,13 +43,44 @@ treeitem[Priority="Low"] > treerow > treecell.prioritycol > .tree-button
}
treeitem > treerow > treecell > .tree-icon {
list-style-image: url("chrome://messenger/skin/mail-message.gif");
list-style-image: url("chrome://messenger/skin/message-mail.gif");
min-height: 14px;
}
treeitem[open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/mail-message.gif");
list-style-image: url("chrome://messenger/skin/message-mail.gif");
min-height: 14px;
}
treeitem[Status="new"] > treerow > treecell > .tree-icon {
list-style-image: url("chrome://messenger/skin/message-mail-new.gif");
min-height: 14px;
}
treeitem[MessageType="news"] > treerow > treecell > .tree-icon {
list-style-image: url("chrome://messenger/skin/message-news.gif");
min-height: 14px;
}
treeitem[MessageType="news"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("chrome://messenger/skin/message-news.gif");
min-height: 14px;
}
treeitem[MessageType="news"][Status="new"] > treerow > treecell > .tree-icon {
list-style-image: url("chrome://messenger/skin/message-news-new.gif");
min-height: 14px;
}
treeitem[MessageType="mail"][HasAttachment="true"] > treerow > treecell > .tree-icon {
list-style-image: url("chrome://messenger/skin/message-mail-attach.gif");
min-height: 14px;
}
treeitem[IsImapDeleted="true"] > treerow > treecell > .tree-icon{
list-style-image: url("chrome://messenger/skin/message-mail-imapdelete.gif");
min-height: 14px;
}
@ -87,9 +113,9 @@ treecell.threadColumnHeader[currentView="unthreaded"] > .tree-button{
}
treecell.readColumnHeader > .tree-button {
list-style-image: url("chrome://messenger/skin/readcol.gif");
list-style-image: url("chrome://messenger/skin/unreadmail.gif");
}
treecell.flagColumnHeader > .tree-button {
list-style-image: url("chrome://messenger/skin/flagcol.gif");
list-style-image: url("chrome://messenger/skin/flaggedmail.gif");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 B

After

Width:  |  Height:  |  Size: 72 B

View File

@ -61,7 +61,9 @@ nsIRDFResource* nsMsgMessageDataSource::kNC_Total = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_Unread = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_MessageChild = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_IsUnread = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_HasAttachment = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_IsImapDeleted = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_MessageType = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_OrderReceived = nsnull;
nsIRDFResource* nsMsgMessageDataSource::kNC_OrderReceivedSort = nsnull;
@ -115,7 +117,9 @@ nsMsgMessageDataSource::~nsMsgMessageDataSource (void)
NS_RELEASE2(kNC_Unread, refcnt);
NS_RELEASE2(kNC_MessageChild, refcnt);
NS_RELEASE2(kNC_IsUnread, refcnt);
NS_RELEASE2(kNC_HasAttachment, refcnt);
NS_RELEASE2(kNC_IsImapDeleted, refcnt);
NS_RELEASE2(kNC_MessageType, refcnt);
NS_RELEASE2(kNC_OrderReceived, refcnt);
NS_RELEASE2(kNC_OrderReceivedSort, refcnt);
@ -170,7 +174,9 @@ nsresult nsMsgMessageDataSource::Init()
rdf->GetResource(NC_RDF_TOTALUNREADMESSAGES, &kNC_Unread);
rdf->GetResource(NC_RDF_MESSAGECHILD, &kNC_MessageChild);
rdf->GetResource(NC_RDF_ISUNREAD, &kNC_IsUnread);
rdf->GetResource(NC_RDF_HASATTACHMENT, &kNC_HasAttachment);
rdf->GetResource(NC_RDF_ISIMAPDELETED, &kNC_IsImapDeleted);
rdf->GetResource(NC_RDF_MESSAGETYPE, &kNC_MessageType);
rdf->GetResource(NC_RDF_ORDERRECEIVED, &kNC_OrderReceived);
rdf->GetResource(NC_RDF_ORDERRECEIVED_SORT, &kNC_OrderReceivedSort);
@ -222,6 +228,10 @@ nsresult nsMsgMessageDataSource::CreateLiterals(nsIRDFService *rdf)
createNode(str, getter_AddRefs(kTrueLiteral), rdf);
str = "false";
createNode(str, getter_AddRefs(kFalseLiteral), rdf);
str = "news";
createNode(str, getter_AddRefs(kNewsLiteral), rdf);
str = "mail";
createNode(str, getter_AddRefs(kMailLiteral), rdf);
return NS_OK;
}
@ -395,7 +405,9 @@ NS_IMETHODIMP nsMsgMessageDataSource::GetTargets(nsIRDFResource* source,
else if((kNC_Subject == property) || (kNC_Date == property) ||
(kNC_Status == property) || (kNC_Flagged == property) ||
(kNC_Priority == property) || (kNC_Size == property) ||
(kNC_IsUnread == property) || (kNC_IsImapDeleted == property) || (kNC_OrderReceived == property))
(kNC_IsUnread == property) || (kNC_IsImapDeleted == property) ||
(kNC_OrderReceived == property) || (kNC_HasAttachment == property) ||
(kNC_MessageType == property))
{
nsSingletonEnumerator* cursor =
new nsSingletonEnumerator(source);
@ -520,7 +532,9 @@ nsMsgMessageDataSource::getMessageArcLabelsOut(PRBool showThreads,
(*arcs)->AppendElement(kNC_Priority);
(*arcs)->AppendElement(kNC_Size);
(*arcs)->AppendElement(kNC_IsUnread);
(*arcs)->AppendElement(kNC_HasAttachment);
(*arcs)->AppendElement(kNC_IsImapDeleted);
(*arcs)->AppendElement(kNC_MessageType);
(*arcs)->AppendElement(kNC_OrderReceived);
return NS_OK;
@ -917,8 +931,12 @@ nsMsgMessageDataSource::createMessageNode(nsIMessage *message,
rv = createMessageUnreadNode(message, target);
else if((kNC_IsUnread == property))
rv = createMessageIsUnreadNode(message, target);
else if((kNC_HasAttachment == property))
rv = createMessageHasAttachmentNode(message, target);
else if((kNC_IsImapDeleted == property))
rv = createMessageIsImapDeletedNode(message, target);
else if((kNC_MessageType == property))
rv = createMessageMessageTypeNode(message, target);
else if ((kNC_MessageChild == property))
rv = createMessageMessageChildNode(message, target);
else if ((kNC_OrderReceived == property))
@ -1051,6 +1069,23 @@ nsMsgMessageDataSource::createMessageIsUnreadNode(nsIMessage *message, nsIRDFNod
return NS_OK;
}
nsresult
nsMsgMessageDataSource::createMessageHasAttachmentNode(nsIMessage *message, nsIRDFNode **target)
{
nsresult rv;
PRUint32 flags;
rv = message->GetFlags(&flags);
if(NS_FAILED(rv))
return rv;
if(flags & MSG_FLAG_ATTACHMENT)
*target = kTrueLiteral;
else
*target = kFalseLiteral;
NS_IF_ADDREF(*target);
return NS_OK;
}
nsresult
nsMsgMessageDataSource::createMessageIsImapDeletedNode(nsIMessage *message, nsIRDFNode **target)
{
@ -1068,6 +1103,22 @@ nsMsgMessageDataSource::createMessageIsImapDeletedNode(nsIMessage *message, nsIR
return NS_OK;
}
nsresult
nsMsgMessageDataSource::createMessageMessageTypeNode(nsIMessage *message, nsIRDFNode **target)
{
nsresult rv;
PRUint32 type;
rv = message->GetMessageType(&type);
if(NS_FAILED(rv))
return rv;
if(type == nsIMessage::NewsMessage)
*target = kNewsLiteral;
else
*target = kMailLiteral;
NS_IF_ADDREF(*target);
return NS_OK;
}
nsresult
nsMsgMessageDataSource::createMessageOrderReceivedNode(nsIMessage *message, nsIRDFNode **target)

View File

@ -142,7 +142,9 @@ protected:
nsIRDFNode **target);
nsresult createMessageIsUnreadNode(nsIMessage *message, nsIRDFNode **target);
nsresult createMessageHasAttachmentNode(nsIMessage *message, nsIRDFNode **target);
nsresult createMessageIsImapDeletedNode(nsIMessage *message, nsIRDFNode **target);
nsresult createMessageMessageTypeNode(nsIMessage *message, nsIRDFNode **target);
nsresult createMessageOrderReceivedNode(nsIMessage *message, nsIRDFNode **target);
nsresult createMessageOrderReceivedSortNode(nsIMessage *message, nsIRDFNode **target);
@ -195,7 +197,9 @@ protected:
static nsIRDFResource* kNC_Unread;
static nsIRDFResource* kNC_MessageChild;
static nsIRDFResource* kNC_IsUnread;
static nsIRDFResource* kNC_HasAttachment;
static nsIRDFResource* kNC_IsImapDeleted;
static nsIRDFResource* kNC_MessageType;
static nsIRDFResource* kNC_OrderReceived;
static nsIRDFResource* kNC_OrderReceivedSort;
@ -221,6 +225,8 @@ protected:
nsCOMPtr<nsIRDFNode> kReadLiteral;
nsCOMPtr<nsIRDFNode> kTrueLiteral;
nsCOMPtr<nsIRDFNode> kFalseLiteral;
nsCOMPtr<nsIRDFNode> kNewsLiteral;
nsCOMPtr<nsIRDFNode> kMailLiteral;
// message properties
static nsIAtom *kStatusAtom;

View File

@ -48,6 +48,8 @@ typedef struct _nsMsgRDFNotification {
#define NC_RDF_ISUNREAD NC_NAMESPACE_URI "IsUnread"
#define NC_RDF_ISIMAPDELETED NC_NAMESPACE_URI "IsImapDeleted"
#define NC_RDF_ORDERRECEIVED NC_NAMESPACE_URI "OrderReceived"
#define NC_RDF_HASATTACHMENT NC_NAMESPACE_URI "HasAttachment"
#define NC_RDF_MESSAGETYPE NC_NAMESPACE_URI "MessageType"
#define NC_RDF_CHILD NC_NAMESPACE_URI "child"
#define NC_RDF_MESSAGECHILD NC_NAMESPACE_URI "MessageChild"

View File

@ -594,3 +594,10 @@ NS_IMETHODIMP nsMessage::GetMsgKey(nsMsgKey *aMsgKey)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsMessage::GetMessageType(PRUint32 *aMessageType)
{
// base classes need to define this
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@ -54,6 +54,15 @@ NS_IMETHODIMP nsImapMessage::GetMsgFolder(nsIMsgFolder **folder)
return rv;
}
NS_IMETHODIMP nsImapMessage::GetMessageType(PRUint32 *aMessageType)
{
if(!aMessageType)
return NS_ERROR_NULL_POINTER;
*aMessageType = nsIMessage::MailMessage;
return NS_OK;
}
nsresult nsImapMessage::GetFolderFromURI(nsIMsgFolder **folder)
{
nsresult rv;

View File

@ -39,7 +39,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetMsgFolder(nsIMsgFolder **folder);
NS_IMETHOD GetMessageType(PRUint32 *aMessageType);
protected:
nsresult GetFolderFromURI(nsIMsgFolder **folder);

View File

@ -56,6 +56,15 @@ NS_IMETHODIMP nsLocalMessage::GetMsgFolder(nsIMsgFolder **folder)
return rv;
}
NS_IMETHODIMP nsLocalMessage::GetMessageType(PRUint32 *aMessageType)
{
if(!aMessageType)
return NS_ERROR_NULL_POINTER;
*aMessageType = nsIMessage::MailMessage;
return NS_OK;
}
nsresult nsLocalMessage::GetFolderFromURI(nsIMsgFolder **folder)
{
nsresult rv;

View File

@ -39,6 +39,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetMsgFolder(nsIMsgFolder **folder);
NS_IMETHOD GetMessageType(PRUint32 *aMessageType);
protected:
nsresult GetFolderFromURI(nsIMsgFolder **folder);

View File

@ -55,6 +55,15 @@ NS_IMETHODIMP nsNewsMessage::GetMsgFolder(nsIMsgFolder **folder)
return rv;
}
NS_IMETHODIMP nsNewsMessage::GetMessageType(PRUint32 *aMessageType)
{
if(!aMessageType)
return NS_ERROR_NULL_POINTER;
*aMessageType = nsIMessage::NewsMessage;
return NS_OK;
}
//Note this is the same as the function in LocalMessage except for news uri specific stuff.
//I'm not convinced that parsing the url is going to be different so I'm setting this up as a
//separate function. If it turns out this isn't the case we could write a utility function that

View File

@ -39,6 +39,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetMsgFolder(nsIMsgFolder **folder);
NS_IMETHOD GetMessageType(PRUint32 *aMessageType);
protected:
nsresult GetFolderFromURI(nsIMsgFolder **folder);