nsMsgViewCommandType

The nsMsgViewCommandType interface contains constants used for commands in Thunderbird. For example to mark a message read, you would call:

 // assuming gDBView is a global nsIMsgDBView
 gDBView.doCommand(Components.interfaces.nsMsgViewCommandType.markMessagesRead);


Please add a summary to this article.
Last changed in Gecko 1.9 (Firefox 3)

Constants

Name Value Description
markMessagesRead 0 Marks the selected messages as read.
markMessagesUnread 1 Mark the selected messages as unread
toggleMessageRead 2 Toggle the read flag of the selected messages
flagMessages 3 Flag the selected messages.
unflagMessages 4 Unflag the selected messages.
toggleThreadWatched 6 Toggle the watched state of the selected thread.
deleteMsg 7 Move the selected message to the accounts trash.
deleteNoTrash 8 Delete the selected message.
markThreadRead 9 Mark all messages in a thread as read.
markAllRead 10 Mark all messages currently shown as read
expandAll 11 Expand all threads.
collapseAll 12 Collapse all threads.
copyMessages 13 Copy the selected messages. Use with nsIMsgDBView.doCommandWithFolder() to select the destination folder.
moveMessages 14 Move the selected messages. Use with nsIMsgDBView.doCommandWithFolder() to select the destination folder.
selectAll 15 Select all messages.
downloadSelectedForOffline 16 Download the selected messages for offline.
downloadFlaggedForOffline 17 Download all flagged messages for offline.
selectThread 18 Select the entire thread.
selectFlagged 19 Select all flagged messages.
cmdRequiringMsgBody 20 Used with nsIMsgDBView.getCommandStatus() to determine if commands requiring the message body (i.e. reload or print preview) are available.
label0 21 Attach a label to the selected messages.
label1 22 Attach a label to the selected messages.
label2 23 Attach a label to the selected messages.
label3 24 Attach a label to the selected messages.
label4 25 Attach a label to the selected messages.
label5 26 Attach a label to the selected messages.
lastLabel 26 Attach a label to the selected messages.
junk 27 Mark the selected messages as junk.
unjunk 28 Mark the selected messages as not junk.
undeleteMsg 29 Undelete the selected messages.
applyFilters 30 Apply filters to the selected messages
runJunkControls 31 Run junk mail controls on the selected messages.
deleteJunk 32 Delete all junk messages.