Add replied and forwarded atoms for the message tree

RESOLVED FIXED

Status

RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: erik, Assigned: Bienvenu)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

15 years ago
Looking at
http://lxr.mozilla.org/seamonkey/source/mailnews/base/src/nsMsgDBView.cpp I
realized that there are no atoms for "replied" and "forwarded":

161   kUnreadMsgAtom = NS_NewAtom("unread");
162   kNewMsgAtom = NS_NewAtom("new");
163   kReadMsgAtom = NS_NewAtom("read");
164   kOfflineMsgAtom = NS_NewAtom("offline");
165   kFlaggedMsgAtom = NS_NewAtom("flagged");
166   kNewsMsgAtom = NS_NewAtom("news");
167   kImapDeletedMsgAtom = NS_NewAtom("imapdeleted");
168   kAttachMsgAtom = NS_NewAtom("attach");
169   kHasUnreadAtom = NS_NewAtom("hasUnread");
170   kWatchThreadAtom = NS_NewAtom("watch");
171   kIgnoreThreadAtom = NS_NewAtom("ignore");
172   kHasImageAtom = NS_NewAtom("hasimage");
173   kJunkMsgAtom = NS_NewAtom("junk");
174   kNotJunkMsgAtom = NS_NewAtom("notjunk");

It would be useful to have "repliead" and "forwarded" as well so that more
elaborate CSS rules may be set up for the message tree.

My goal here is to make the message tree show alternate icons depending on the
replied, forwarded state.
(Assignee)

Comment 1

15 years ago
not a mail database issue. component -> Mail window front end.
Component: Mail Database → Mail Window Front End
(Reporter)

Comment 2

15 years ago
Created attachment 127684 [details] [diff] [review]
Adds support for replied and forwarded atorms

This is my first patch for Mozilla. The code is very straight forward so there
should not be much that could go wrong here.

Since the status is either Replied, Forwarded, New or Read I decided to let the
atoms follow the same logic and therefore the atom added is either replied,
forwarded or new. The read atom is kept independent of the other 3. Maybe all
should have been independent?

Would it be better to use:

  if (flags & MSG_FLAG_REPLIED)
    properties->AppendElement(kRepliedMsgAtom);

  if (flags & MSG_FLAG_FORWARDED)
    properties->AppendElement(kForwardedMsgAtom);
  
  if (flags & MSG_FLAG_NEW)
    properties->AppendElement(kNewMsgAtom);

instead of?

  if (flags & MSG_FLAG_REPLIED)
    properties->AppendElement(kRepliedMsgAtom);
  else if (flags & MSG_FLAG_FORWARDED)
    properties->AppendElement(kForwardedMsgAtom);
  else if (flags & MSG_FLAG_NEW)
    properties->AppendElement(kNewMsgAtom);
(Reporter)

Comment 3

15 years ago
Created attachment 127714 [details] [diff] [review]
Making the properties independent

After some thinking I realized that it is probably better to make the replied,
forwarded and new atoms independent. This will also make old css files
dependent on the new flag to still work.
(Reporter)

Comment 4

15 years ago
Comment on attachment 127684 [details] [diff] [review]
Adds support for replied and forwarded atorms

Ooops, forgot to mark the old patch as obsolete
Attachment #127684 - Attachment is obsolete: true
(Reporter)

Updated

15 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 5

15 years ago
Comment on attachment 127714 [details] [diff] [review]
Making the properties independent

r=bienvenu, that looks fine.
Attachment #127714 - Flags: review+
(Reporter)

Comment 6

15 years ago
Adding Scott MacGregor in hope of him doing the super review (and checkin)

Comment 7

15 years ago
Comment on attachment 127714 [details] [diff] [review]
Making the properties independent

sr=mscott

I'll try to check this in later today. 

Now themers can add special icons to the thread pane to reflect this state.
Very nice.
Attachment #127714 - Flags: superreview+

Comment 8

15 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 9

15 years ago
Is bug 22112 the same as this one?
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.