This commit is contained in:
putterman%netscape.com 1999-08-24 21:47:22 +00:00
Родитель 66524af390
Коммит c5bc4f5797
5 изменённых файлов: 41 добавлений и 8 удалений

Просмотреть файл

@ -320,6 +320,14 @@ NS_IMETHODIMP nsMessage::MarkRead(PRBool bRead)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsMessage::MarkFlagged(PRBool bFlagged)
{
if(mMsgHdr)
return mMsgHdr->MarkFlagged(bFlagged);
else
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsMessage::GetMessageKey(nsMsgKey *result)
{
if(mMsgHdr)

Просмотреть файл

@ -81,6 +81,7 @@ public:
// Mark message routines
NS_IMETHOD MarkRead(PRBool bRead);
NS_IMETHOD MarkFlagged(PRBool bFlagged);
NS_IMETHOD GetMessageKey(nsMsgKey *result);
NS_IMETHOD GetThreadId(nsMsgKey *result);

Просмотреть файл

@ -255,10 +255,13 @@ nsresult nsMsgDBFolder::SendFlagNotifications(nsISupports *item, PRUint32 oldFla
PRUint32 changedFlags = oldFlags ^ newFlags;
if((changedFlags & MSG_FLAG_READ) || (changedFlags & MSG_FLAG_REPLIED)
|| (changedFlags & MSG_FLAG_MARKED) || (changedFlags & MSG_FLAG_FORWARDED)
|| (changedFlags & MSG_FLAG_NEW))
|| (changedFlags & MSG_FLAG_FORWARDED)|| (changedFlags & MSG_FLAG_NEW))
{
rv = NotifyPropertyFlagChanged(item, "Status", oldFlags, newFlags);
}
else if((changedFlags & MSG_FLAG_MARKED))
{
rv = NotifyPropertyFlagChanged(item, "Flagged", oldFlags, newFlags);
}
return rv;
}

Просмотреть файл

@ -113,7 +113,6 @@ NS_IMETHODIMP nsMsgFolder::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_IMETHODIMP
nsMsgFolder::Init(const char* aURI)
{
nsresult rv;
// this parsing is totally hacky. we really should generalize this,
// but I'm not going to do this until we can eliminate the
@ -903,10 +902,6 @@ NS_IMETHODIMP nsMsgFolder::GetTotalMessages(PRBool deep, PRInt32 *totalMessages)
NS_IMETHOD GetTotalMessagesInDB(PRUint32 *totalMessages) const; // How many messages in database.
#endif
#ifdef HAVE_PANE
virtual void MarkAllRead(MSG_Pane *pane, PRBool deep);
#endif
#ifdef HAVE_DB
// These functions are used for tricking the front end into thinking that we have more
// messages than are really in the DB. This is usually after and IMAP message copy where
@ -1511,6 +1506,31 @@ nsMsgFolder::MarkMessagesRead(nsISupportsArray *messages, PRBool markRead)
return NS_OK;
}
NS_IMETHODIMP
nsMsgFolder::MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFlagged)
{
PRUint32 count;
nsresult rv;
rv = messages->Count(&count);
if(NS_FAILED(rv))
return rv;
for(PRUint32 i = 0; i < count; i++)
{
nsCOMPtr<nsISupports> msgSupports = getter_AddRefs(messages->ElementAt(i));
nsCOMPtr<nsIMessage> message = do_QueryInterface(msgSupports);
if(message)
rv = message->MarkFlagged(markFlagged);
if(NS_FAILED(rv))
return rv;
}
return NS_OK;
}
NS_IMETHODIMP
nsMsgFolder::MarkAllMessagesRead(void)
{

Просмотреть файл

@ -299,6 +299,7 @@ public:
NS_IMETHOD MatchName(nsString *name, PRBool *matches);
NS_IMETHOD MarkMessagesRead(nsISupportsArray *messages, PRBool markRead);
NS_IMETHOD MarkAllMessagesRead(void);
NS_IMETHOD MarkMessagesFlagged(nsISupportsArray *messages, PRBool markRead);
NS_IMETHOD GetChildWithURI(const char *uri, PRBool deep, nsIMsgFolder ** folder);