From 46753cb77877f4807ab9b1ba3e6c7a4eed7bc1bd Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 06 Jan 2004 12:57:52 +0000 Subject: status of pop3 accounts slightly reworked when starting opiemail from taskbar applet the status will be reset --- (limited to 'noncore/net') diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index d8a36e7..bf91c63 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -333,3 +333,12 @@ void encodedString::setContent(char*nContent,int nSize) content = nContent; size = nSize; } + +folderStat&folderStat::operator=(const folderStat&old) +{ + message_count = old.message_count; + message_unseen = old.message_unseen; + message_recent = old.message_recent; + return *this; +} + diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index 05c4816..b2047cb 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h @@ -187,6 +187,7 @@ struct folderStat unsigned int message_count; unsigned int message_unseen; unsigned int message_recent; + folderStat&operator=(const folderStat&old); }; #endif diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index 98f6204..1d7d559 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp @@ -40,13 +40,15 @@ void StatusMail::initAccounts(QList&accounts) current = AbstractMail::getWrapper(pop3); connectionList.append(current); current->statusFolder(currentStat); - currentPop3Stat.message_count+=currentStat.message_unseen; - currentPop3Stat.message_count+=currentStat.message_recent; currentPop3Stat.message_count+=currentStat.message_count; } current->logout(); } - lastPop3Stat = currentPop3Stat; + qDebug("Pop3 init count: %i",currentPop3Stat.message_count); + currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; + lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; + lastPop3Stat.message_recent = currentPop3Stat.message_recent; + lastPop3Stat.message_count = currentPop3Stat.message_count; } void StatusMail::reset_status() diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index 991b5fb..6078013 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -70,7 +70,7 @@ void MailApplet::slotClicked() { device->setLedState( led, Led_Off ); } - // m_statusMails->reset_status(); + if (m_statusMail) m_statusMail->reset_status(); } void MailApplet::startup() { -- cgit v0.9.0.2