Diffstat (limited to 'noncore/net/mail/taskbarapplet') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/taskbarapplet/mailapplet.cpp | 32 | ||||
-rw-r--r-- | noncore/net/mail/taskbarapplet/mailapplet.h | 0 |
2 files changed, 30 insertions, 2 deletions
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index f3550c7..8bf4b89 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp | |||
@@ -68,8 +68,36 @@ void MailApplet::slotCheck() { | |||
68 | m_intervalMs = newIntervalMs; | 68 | m_intervalMs = newIntervalMs; |
69 | } | 69 | } |
70 | 70 | ||
71 | int newMails = 0; | ||
72 | |||
73 | if ( true ) { | ||
74 | ODevice *device = ODevice::inst(); | ||
75 | if ( isHidden() ) show(); | ||
76 | if ( m_config->readBoolEntry( "BlinkLed", true ) ) { | ||
77 | if ( !device-> ledList ( ).isEmpty( ) ) { | ||
78 | OLed led = ( device->ledList( ).contains( Led_Mail ) ) ? Led_Mail : device->ledList( ) [0]; | ||
79 | device->setLedState( led, device->ledStateList( led ).contains( Led_BlinkSlow ) ? Led_BlinkSlow : Led_On ); | ||
80 | } | ||
81 | } | ||
82 | if ( m_config->readBoolEntry( "PlaySound", false ) ) | ||
83 | device->alarmSound(); | ||
84 | |||
85 | Config cfg( "mail" ); | ||
86 | cfg.setGroup( "Status" ); | ||
87 | cfg.writeEntry( "NewMails", newMails ); // todo | ||
88 | |||
89 | QCopEnvelope env( "QPE/Pim", "newMails(int)" ); | ||
90 | env << newMails; | ||
91 | |||
92 | } else { | ||
93 | ODevice *device = ODevice::inst(); | ||
94 | if ( !isHidden() ) hide(); | ||
95 | if ( !device-> ledList( ).isEmpty( ) ) { | ||
96 | OLed led = ( device->ledList( ).contains( Led_Mail ) ) ? Led_Mail : device->ledList( ) [0]; | ||
97 | device->setLedState( led, Led_Off ); | ||
98 | } | ||
99 | } | ||
100 | |||
71 | // go trough accounts and check here | 101 | // go trough accounts and check here |
72 | // depending on result show or hide | ||
73 | // also trigger qcop call and save status to config | 102 | // also trigger qcop call and save status to config |
74 | // get led to blink | ||
75 | } | 103 | } |
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.h b/noncore/net/mail/taskbarapplet/mailapplet.h index 1c48b29..34bdc22 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.h +++ b/noncore/net/mail/taskbarapplet/mailapplet.h | |||