summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp9
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.h1
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp8
-rw-r--r--noncore/net/mail/taskbarapplet/mailapplet.cpp2
4 files changed, 16 insertions, 4 deletions
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
@@ -272,64 +272,73 @@ encodedString::encodedString(const encodedString&old)
272} 272}
273 273
274encodedString& encodedString::operator=(const encodedString&old) 274encodedString& encodedString::operator=(const encodedString&old)
275{ 275{
276 init(); 276 init();
277 copy_old(old); 277 copy_old(old);
278 qDebug("encodedString: assign operator!"); 278 qDebug("encodedString: assign operator!");
279 return *this; 279 return *this;
280} 280}
281 281
282encodedString::~encodedString() 282encodedString::~encodedString()
283{ 283{
284 clean(); 284 clean();
285} 285}
286 286
287void encodedString::init() 287void encodedString::init()
288{ 288{
289 content = 0; 289 content = 0;
290 size = 0; 290 size = 0;
291} 291}
292 292
293void encodedString::clean() 293void encodedString::clean()
294{ 294{
295 if (content) { 295 if (content) {
296 free(content); 296 free(content);
297 } 297 }
298 content = 0; 298 content = 0;
299 size = 0; 299 size = 0;
300} 300}
301 301
302void encodedString::copy_old(const encodedString&old) 302void encodedString::copy_old(const encodedString&old)
303{ 303{
304 clean(); 304 clean();
305 if (old.size>0 && old.content) { 305 if (old.size>0 && old.content) {
306 content = (char*)malloc(old.size*sizeof(char)); 306 content = (char*)malloc(old.size*sizeof(char));
307 memcpy(content,old.content,size); 307 memcpy(content,old.content,size);
308 size = old.size; 308 size = old.size;
309 } 309 }
310} 310}
311 311
312const char*encodedString::Content()const 312const char*encodedString::Content()const
313{ 313{
314 return content; 314 return content;
315} 315}
316 316
317const int encodedString::Length()const 317const int encodedString::Length()const
318{ 318{
319 return size; 319 return size;
320} 320}
321 321
322void encodedString::setContent(const char*nContent,int nSize) 322void encodedString::setContent(const char*nContent,int nSize)
323{ 323{
324 if (nSize>0 && nContent) { 324 if (nSize>0 && nContent) {
325 content = (char*)malloc(nSize*sizeof(char)); 325 content = (char*)malloc(nSize*sizeof(char));
326 memcpy(content,nContent,nSize); 326 memcpy(content,nContent,nSize);
327 size = nSize; 327 size = nSize;
328 } 328 }
329} 329}
330 330
331void encodedString::setContent(char*nContent,int nSize) 331void encodedString::setContent(char*nContent,int nSize)
332{ 332{
333 content = nContent; 333 content = nContent;
334 size = nSize; 334 size = nSize;
335} 335}
336
337folderStat&folderStat::operator=(const folderStat&old)
338{
339 message_count = old.message_count;
340 message_unseen = old.message_unseen;
341 message_recent = old.message_recent;
342 return *this;
343}
344
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
@@ -126,67 +126,68 @@ public:
126 virtual ~RecBody(); 126 virtual ~RecBody();
127 void setBodytext(const QString&); 127 void setBodytext(const QString&);
128 const QString& Bodytext()const; 128 const QString& Bodytext()const;
129 129
130 void setDescription(const RecPart&des); 130 void setDescription(const RecPart&des);
131 const RecPart& Description()const; 131 const RecPart& Description()const;
132 132
133 void setParts(const QValueList<RecPart>&parts); 133 void setParts(const QValueList<RecPart>&parts);
134 const QValueList<RecPart>& Parts()const; 134 const QValueList<RecPart>& Parts()const;
135 void addPart(const RecPart&part); 135 void addPart(const RecPart&part);
136}; 136};
137 137
138class encodedString 138class encodedString
139{ 139{
140public: 140public:
141 encodedString(); 141 encodedString();
142 /* 142 /*
143 creates an new content string. 143 creates an new content string.
144 it makes a deep copy of it! 144 it makes a deep copy of it!
145 */ 145 */
146 encodedString(const char*nContent,unsigned int length); 146 encodedString(const char*nContent,unsigned int length);
147 /* 147 /*
148 Take over the nContent. Means: it will just copy the pointer, not the content. 148 Take over the nContent. Means: it will just copy the pointer, not the content.
149 so make sure: No one else frees the string, the string has allocated with 149 so make sure: No one else frees the string, the string has allocated with
150 malloc for compatibility with c-based libs 150 malloc for compatibility with c-based libs
151 */ 151 */
152 encodedString(char*nContent,unsigned int nSize); 152 encodedString(char*nContent,unsigned int nSize);
153 /* copy construkor - makes ALWAYS a deep copy!!!! */ 153 /* copy construkor - makes ALWAYS a deep copy!!!! */
154 encodedString(const encodedString&old); 154 encodedString(const encodedString&old);
155 /* assign operator - makes ALWAYS a deep copy!!!! */ 155 /* assign operator - makes ALWAYS a deep copy!!!! */
156 encodedString& operator=(const encodedString&old); 156 encodedString& operator=(const encodedString&old);
157 /* destructor - cleans the content */ 157 /* destructor - cleans the content */
158 virtual ~encodedString(); 158 virtual ~encodedString();
159 159
160 /* returns a pointer to the content - do not delete yoursel! */ 160 /* returns a pointer to the content - do not delete yoursel! */
161 const char*Content()const; 161 const char*Content()const;
162 /* returns the lengths of the content 'cause it must not be a null-terminated string! */ 162 /* returns the lengths of the content 'cause it must not be a null-terminated string! */
163 const int Length()const; 163 const int Length()const;
164 164
165 /* 165 /*
166 makes a deep copy of nContent! 166 makes a deep copy of nContent!
167 */ 167 */
168 void setContent(const char*nContent,int nSize); 168 void setContent(const char*nContent,int nSize);
169 /* 169 /*
170 Take over the nContent. Means: it will just copy the pointer, not the content. 170 Take over the nContent. Means: it will just copy the pointer, not the content.
171 so make sure: No one else frees the string, the string has allocated with 171 so make sure: No one else frees the string, the string has allocated with
172 malloc for compatibility with c-based libs 172 malloc for compatibility with c-based libs
173 */ 173 */
174 void setContent(char*nContent,int nSize); 174 void setContent(char*nContent,int nSize);
175 175
176protected: 176protected:
177 char * content; 177 char * content;
178 unsigned int size; 178 unsigned int size;
179 179
180 void init(); 180 void init();
181 void copy_old(const encodedString&old); 181 void copy_old(const encodedString&old);
182 void clean(); 182 void clean();
183}; 183};
184 184
185struct folderStat 185struct folderStat
186{ 186{
187 unsigned int message_count; 187 unsigned int message_count;
188 unsigned int message_unseen; 188 unsigned int message_unseen;
189 unsigned int message_recent; 189 unsigned int message_recent;
190 folderStat&operator=(const folderStat&old);
190}; 191};
191 192
192#endif 193#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
@@ -1,89 +1,91 @@
1#include "statusmail.h" 1#include "statusmail.h"
2#include <qlist.h> 2#include <qlist.h>
3 3
4StatusMail::StatusMail(QList<Account>&list) 4StatusMail::StatusMail(QList<Account>&list)
5{ 5{
6 currentImapStat.message_count=0; 6 currentImapStat.message_count=0;
7 currentImapStat.message_unseen=0; 7 currentImapStat.message_unseen=0;
8 currentImapStat.message_recent=0; 8 currentImapStat.message_recent=0;
9 lastPop3Stat = currentImapStat; 9 lastPop3Stat = currentImapStat;
10 currentPop3Stat = currentImapStat; 10 currentPop3Stat = currentImapStat;
11 connectionList.setAutoDelete(true); 11 connectionList.setAutoDelete(true);
12 connectionList.clear(); 12 connectionList.clear();
13 initAccounts(list); 13 initAccounts(list);
14} 14}
15 15
16StatusMail::~StatusMail() 16StatusMail::~StatusMail()
17{ 17{
18} 18}
19 19
20void StatusMail::initAccounts(QList<Account>&accounts) 20void StatusMail::initAccounts(QList<Account>&accounts)
21{ 21{
22 22
23 Account *it; 23 Account *it;
24 folderStat currentStat; 24 folderStat currentStat;
25 AbstractMail * current = 0; 25 AbstractMail * current = 0;
26 currentPop3Stat.message_count=0; 26 currentPop3Stat.message_count=0;
27 currentPop3Stat.message_recent=0; 27 currentPop3Stat.message_recent=0;
28 currentPop3Stat.message_unseen=0; 28 currentPop3Stat.message_unseen=0;
29 for ( it = accounts.first(); it; it = accounts.next() ) { 29 for ( it = accounts.first(); it; it = accounts.next() ) {
30 if ( it->getType().compare( "IMAP" ) == 0 ) { 30 if ( it->getType().compare( "IMAP" ) == 0 ) {
31 IMAPaccount*ima = static_cast<IMAPaccount *>(it); 31 IMAPaccount*ima = static_cast<IMAPaccount *>(it);
32 current = AbstractMail::getWrapper(ima); 32 current = AbstractMail::getWrapper(ima);
33 connectionList.append(current); 33 connectionList.append(current);
34 current->statusFolder(currentStat); 34 current->statusFolder(currentStat);
35 currentImapStat.message_count+=currentStat.message_unseen; 35 currentImapStat.message_count+=currentStat.message_unseen;
36 currentImapStat.message_count+=currentStat.message_recent; 36 currentImapStat.message_count+=currentStat.message_recent;
37 currentImapStat.message_count+=currentStat.message_count; 37 currentImapStat.message_count+=currentStat.message_count;
38 } else if ( it->getType().compare( "POP3" ) == 0 ) { 38 } else if ( it->getType().compare( "POP3" ) == 0 ) {
39 POP3account *pop3 = static_cast<POP3account *>(it); 39 POP3account *pop3 = static_cast<POP3account *>(it);
40 current = AbstractMail::getWrapper(pop3); 40 current = AbstractMail::getWrapper(pop3);
41 connectionList.append(current); 41 connectionList.append(current);
42 current->statusFolder(currentStat); 42 current->statusFolder(currentStat);
43 currentPop3Stat.message_count+=currentStat.message_unseen;
44 currentPop3Stat.message_count+=currentStat.message_recent;
45 currentPop3Stat.message_count+=currentStat.message_count; 43 currentPop3Stat.message_count+=currentStat.message_count;
46 } 44 }
47 current->logout(); 45 current->logout();
48 } 46 }
49 lastPop3Stat = currentPop3Stat; 47 qDebug("Pop3 init count: %i",currentPop3Stat.message_count);
48 currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
49 lastPop3Stat.message_unseen = currentPop3Stat.message_unseen;
50 lastPop3Stat.message_recent = currentPop3Stat.message_recent;
51 lastPop3Stat.message_count = currentPop3Stat.message_count;
50} 52}
51 53
52void StatusMail::reset_status() 54void StatusMail::reset_status()
53{ 55{
54 lastPop3Stat = currentPop3Stat; 56 lastPop3Stat = currentPop3Stat;
55} 57}
56 58
57void StatusMail::check_current_stat(folderStat&targetStat) 59void StatusMail::check_current_stat(folderStat&targetStat)
58{ 60{
59 AbstractMail*it = 0; 61 AbstractMail*it = 0;
60 folderStat currentStat; 62 folderStat currentStat;
61 currentPop3Stat.message_recent = 0; 63 currentPop3Stat.message_recent = 0;
62 currentPop3Stat.message_count = 0; 64 currentPop3Stat.message_count = 0;
63 currentPop3Stat.message_unseen = 0; 65 currentPop3Stat.message_unseen = 0;
64 currentImapStat = currentPop3Stat; 66 currentImapStat = currentPop3Stat;
65 for ( it = connectionList.first(); it; it = connectionList.next() ) { 67 for ( it = connectionList.first(); it; it = connectionList.next() ) {
66 it->statusFolder(currentStat); 68 it->statusFolder(currentStat);
67 it->logout(); 69 it->logout();
68 if (it->getType().lower()=="imap") { 70 if (it->getType().lower()=="imap") {
69 currentImapStat.message_unseen+=currentStat.message_unseen; 71 currentImapStat.message_unseen+=currentStat.message_unseen;
70 currentImapStat.message_recent+=currentStat.message_recent; 72 currentImapStat.message_recent+=currentStat.message_recent;
71 currentImapStat.message_count+=currentStat.message_count; 73 currentImapStat.message_count+=currentStat.message_count;
72 } else if (it->getType().lower()=="pop3") { 74 } else if (it->getType().lower()=="pop3") {
73 currentPop3Stat.message_count+=currentStat.message_count; 75 currentPop3Stat.message_count+=currentStat.message_count;
74 qDebug("Pop3 count: %i",currentPop3Stat.message_count); 76 qDebug("Pop3 count: %i",currentPop3Stat.message_count);
75 } 77 }
76 } 78 }
77 qDebug("Pop3 last: %i",lastPop3Stat.message_count); 79 qDebug("Pop3 last: %i",lastPop3Stat.message_count);
78 if (currentPop3Stat.message_count > lastPop3Stat.message_count) { 80 if (currentPop3Stat.message_count > lastPop3Stat.message_count) {
79 currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; 81 currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count;
80 currentPop3Stat.message_unseen = currentPop3Stat.message_recent; 82 currentPop3Stat.message_unseen = currentPop3Stat.message_recent;
81 } else { 83 } else {
82 lastPop3Stat.message_count = currentPop3Stat.message_count; 84 lastPop3Stat.message_count = currentPop3Stat.message_count;
83 currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; 85 currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0;
84 } 86 }
85 targetStat = currentImapStat; 87 targetStat = currentImapStat;
86 targetStat.message_unseen+=currentPop3Stat.message_unseen; 88 targetStat.message_unseen+=currentPop3Stat.message_unseen;
87 targetStat.message_recent+=currentPop3Stat.message_recent; 89 targetStat.message_recent+=currentPop3Stat.message_recent;
88 targetStat.message_count+=currentPop3Stat.message_count; 90 targetStat.message_count+=currentPop3Stat.message_count;
89} 91}
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
@@ -9,129 +9,129 @@
9#include <opie/odevice.h> 9#include <opie/odevice.h>
10 10
11#include <libmailwrapper/settings.h> 11#include <libmailwrapper/settings.h>
12 12
13#include "mailapplet.h" 13#include "mailapplet.h"
14 14
15using namespace Opie; 15using namespace Opie;
16 16
17MailApplet::MailApplet( QWidget *parent ) 17MailApplet::MailApplet( QWidget *parent )
18: QWidget( parent ) { 18: QWidget( parent ) {
19 19
20 m_config = new Config( "mail" ); 20 m_config = new Config( "mail" );
21 m_config->setGroup( "Applet" ); 21 m_config->setGroup( "Applet" );
22 22
23 setFixedWidth( AppLnk::smallIconSize() ); 23 setFixedWidth( AppLnk::smallIconSize() );
24 setFixedHeight( AppLnk::smallIconSize() ); 24 setFixedHeight( AppLnk::smallIconSize() );
25 25
26 hide(); 26 hide();
27 27
28 m_newMails = 0; 28 m_newMails = 0;
29 m_statusMail = 0l; 29 m_statusMail = 0l;
30 30
31 if ( !m_config->readBoolEntry( "Disabled", false ) ) { 31 if ( !m_config->readBoolEntry( "Disabled", false ) ) {
32 // delay 5 sec until the whole mail backend gets started .-) 32 // delay 5 sec until the whole mail backend gets started .-)
33 QTimer::singleShot( 5000, this, SLOT( startup() ) ); 33 QTimer::singleShot( 5000, this, SLOT( startup() ) );
34 } 34 }
35 repaint( true ); 35 repaint( true );
36} 36}
37 37
38 38
39MailApplet::~MailApplet() { 39MailApplet::~MailApplet() {
40 if ( m_statusMail ) 40 if ( m_statusMail )
41 delete m_statusMail; 41 delete m_statusMail;
42 if ( m_config ) 42 if ( m_config )
43 delete m_config; 43 delete m_config;
44} 44}
45 45
46void MailApplet::paintEvent( QPaintEvent* ) { 46void MailApplet::paintEvent( QPaintEvent* ) {
47 QPainter p( this ); 47 QPainter p( this );
48 p.drawPixmap( 0, 0, Resource::loadPixmap( "mail/inbox" ) ); 48 p.drawPixmap( 0, 0, Resource::loadPixmap( "mail/inbox" ) );
49 QFont f( "vera", AppLnk::smallIconSize() ); 49 QFont f( "vera", AppLnk::smallIconSize() );
50 QFontMetrics fm( f ); 50 QFontMetrics fm( f );
51 p.setFont( f ); 51 p.setFont( f );
52 p.setPen( Qt::blue ); 52 p.setPen( Qt::blue );
53 p.drawText( AppLnk::smallIconSize()/3, AppLnk::smallIconSize() - 2, QString::number( m_newMails ) ); 53 p.drawText( AppLnk::smallIconSize()/3, AppLnk::smallIconSize() - 2, QString::number( m_newMails ) );
54 return; 54 return;
55 55
56} 56}
57 57
58void MailApplet::mouseReleaseEvent( QMouseEvent* e ) { 58void MailApplet::mouseReleaseEvent( QMouseEvent* e ) {
59 slotClicked(); 59 slotClicked();
60} 60}
61 61
62void MailApplet::slotClicked() { 62void MailApplet::slotClicked() {
63 QCopEnvelope e( "QPE/System", "execute(QString)" ); 63 QCopEnvelope e( "QPE/System", "execute(QString)" );
64 e << QString( "opiemail" ); 64 e << QString( "opiemail" );
65 65
66 ODevice *device = ODevice::inst(); 66 ODevice *device = ODevice::inst();
67 if ( !device-> ledList().isEmpty() ) { 67 if ( !device-> ledList().isEmpty() ) {
68 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0]; 68 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0];
69 69
70 device->setLedState( led, Led_Off ); 70 device->setLedState( led, Led_Off );
71 } 71 }
72 72
73 // m_statusMails->reset_status(); 73 if (m_statusMail) m_statusMail->reset_status();
74} 74}
75 75
76void MailApplet::startup() { 76void MailApplet::startup() {
77 Settings *settings = new Settings(); 77 Settings *settings = new Settings();
78 QList<Account> ma = settings->getAccounts(); 78 QList<Account> ma = settings->getAccounts();
79 m_statusMail = new StatusMail( ma ); 79 m_statusMail = new StatusMail( ma );
80 delete settings; 80 delete settings;
81 81
82 m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; 82 m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000;
83 m_intervalTimer = new QTimer(); 83 m_intervalTimer = new QTimer();
84 m_intervalTimer->start( m_intervalMs ); 84 m_intervalTimer->start( m_intervalMs );
85 connect( m_intervalTimer, SIGNAL( timeout() ), this, SLOT( slotCheck() ) ); 85 connect( m_intervalTimer, SIGNAL( timeout() ), this, SLOT( slotCheck() ) );
86} 86}
87 87
88void MailApplet::slotCheck() { 88void MailApplet::slotCheck() {
89 // Check wether the check interval has been changed. 89 // Check wether the check interval has been changed.
90 int newIntervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; 90 int newIntervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000;
91 if ( newIntervalMs != m_intervalMs ) { 91 if ( newIntervalMs != m_intervalMs ) {
92 m_intervalTimer->changeInterval( newIntervalMs ); 92 m_intervalTimer->changeInterval( newIntervalMs );
93 m_intervalMs = newIntervalMs; 93 m_intervalMs = newIntervalMs;
94 } 94 }
95 95
96 if (m_statusMail == 0) { 96 if (m_statusMail == 0) {
97 return; 97 return;
98 } 98 }
99 99
100 folderStat stat; 100 folderStat stat;
101 m_statusMail->check_current_stat( stat ); 101 m_statusMail->check_current_stat( stat );
102 m_newMails = stat.message_unseen; 102 m_newMails = stat.message_unseen;
103 qDebug( QString( "test %1" ).arg( m_newMails ) ); 103 qDebug( QString( "test %1" ).arg( m_newMails ) );
104 if ( m_newMails > 0 ) { 104 if ( m_newMails > 0 ) {
105 ODevice *device = ODevice::inst(); 105 ODevice *device = ODevice::inst();
106 if ( isHidden() ) 106 if ( isHidden() )
107 show(); 107 show();
108 if ( m_config->readBoolEntry( "BlinkLed", true ) ) { 108 if ( m_config->readBoolEntry( "BlinkLed", true ) ) {
109 if ( !device->ledList().isEmpty() ) { 109 if ( !device->ledList().isEmpty() ) {
110 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0]; 110 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0];
111 device->setLedState( led, device->ledStateList( led ).contains( Led_BlinkSlow ) ? Led_BlinkSlow : Led_On ); 111 device->setLedState( led, device->ledStateList( led ).contains( Led_BlinkSlow ) ? Led_BlinkSlow : Led_On );
112 } 112 }
113 } 113 }
114 if ( m_config->readBoolEntry( "PlaySound", false ) ) 114 if ( m_config->readBoolEntry( "PlaySound", false ) )
115 device->alarmSound(); 115 device->alarmSound();
116 116
117 Config cfg( "mail" ); 117 Config cfg( "mail" );
118 cfg.setGroup( "Status" ); 118 cfg.setGroup( "Status" );
119 cfg.writeEntry( "newMails", m_newMails ); 119 cfg.writeEntry( "newMails", m_newMails );
120 QCopEnvelope env( "QPE/Pim", "newMails(int)" ); 120 QCopEnvelope env( "QPE/Pim", "newMails(int)" );
121 env << m_newMails; 121 env << m_newMails;
122 repaint( true ); 122 repaint( true );
123 123
124 } else { 124 } else {
125 ODevice *device = ODevice::inst(); 125 ODevice *device = ODevice::inst();
126 if ( !isHidden() ) 126 if ( !isHidden() )
127 hide(); 127 hide();
128 if ( !device->ledList().isEmpty() ) { 128 if ( !device->ledList().isEmpty() ) {
129 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0]; 129 OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0];
130 device->setLedState( led, Led_Off ); 130 device->setLedState( led, Led_Off );
131 } 131 }
132 132
133 Config cfg( "mail" ); 133 Config cfg( "mail" );
134 cfg.setGroup( "Status" ); 134 cfg.setGroup( "Status" );
135 cfg.writeEntry( "newMails", m_newMails ); 135 cfg.writeEntry( "newMails", m_newMails );
136 QCopEnvelope env( "QPE/Pim", "newMails(int)" ); 136 QCopEnvelope env( "QPE/Pim", "newMails(int)" );
137 env << m_newMails; 137 env << m_newMails;