summaryrefslogtreecommitdiff
path: root/noncore/net/mail/taskbarapplet/mailapplet.cpp
authorharlekin <harlekin>2004-01-04 15:47:32 (UTC)
committer harlekin <harlekin>2004-01-04 15:47:32 (UTC)
commit59fee003137f5fd7782e3a42159e53424d100e67 (patch) (unidiff)
treedae5f375349ff02ac96f9bd309aeea52837003cd /noncore/net/mail/taskbarapplet/mailapplet.cpp
parent5c4c2a789c19e727bb9ca323ea1fec1b7d1bd057 (diff)
downloadopie-59fee003137f5fd7782e3a42159e53424d100e67.zip
opie-59fee003137f5fd7782e3a42159e53424d100e67.tar.gz
opie-59fee003137f5fd7782e3a42159e53424d100e67.tar.bz2
config taskbar applet
Diffstat (limited to 'noncore/net/mail/taskbarapplet/mailapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/taskbarapplet/mailapplet.cpp32
1 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}