summaryrefslogtreecommitdiff
path: root/noncore/net/mail/taskbarapplet/mailapplet.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/taskbarapplet/mailapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/taskbarapplet/mailapplet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp
index a0805ba..de32007 100644
--- a/noncore/net/mail/taskbarapplet/mailapplet.cpp
+++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp
@@ -1,33 +1,33 @@
#include <qpainter.h>
#include <qtimer.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/applnk.h>
-#include <opie/odevice.h>
+#include <opie2/odevice.h>
#include <libmailwrapper/settings.h>
#include "mailapplet.h"
using namespace Opie;
MailApplet::MailApplet( QWidget *parent )
: QWidget( parent ) {
m_config = new Config( "mail" );
m_config->setGroup( "Applet" );
setFixedWidth( AppLnk::smallIconSize() );
setFixedHeight( AppLnk::smallIconSize() );
hide();
m_newMails = 0;
m_statusMail = 0l;
if ( !m_config->readBoolEntry( "Disabled", false ) ) {
// delay 5 sec until the whole mail backend gets started .-)
QTimer::singleShot( 5000, this, SLOT( startup() ) );
@@ -95,49 +95,49 @@ void MailApplet::slotCheck() {
m_intervalTimer->changeInterval( newIntervalMs );
m_intervalMs = newIntervalMs;
}
if (m_statusMail == 0) {
return;
}
folderStat stat;
m_statusMail->check_current_stat( stat );
int newMailsOld = m_newMails;
m_newMails = stat.message_unseen;
qDebug( QString( "test %1" ).arg( m_newMails ) );
if ( m_newMails > 0 && newMailsOld != m_newMails ) {
ODevice *device = ODevice::inst();
if ( isHidden() )
show();
if ( m_config->readBoolEntry( "BlinkLed", true ) ) {
if ( !device->ledList().isEmpty() ) {
OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0];
device->setLedState( led, device->ledStateList( led ).contains( Led_BlinkSlow ) ? Led_BlinkSlow : Led_On );
}
}
if ( m_config->readBoolEntry( "PlaySound", false ) )
- device->alarmSound();
+ device->playAlarmSound();
Config cfg( "mail" );
cfg.setGroup( "Status" );
cfg.writeEntry( "newMails", m_newMails );
QCopEnvelope env( "QPE/Pim", "newMails(int)" );
env << m_newMails;
repaint( true );
} else {
ODevice *device = ODevice::inst();
if ( !isHidden() )
hide();
if ( !device->ledList().isEmpty() ) {
OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0];
device->setLedState( led, Led_Off );
}
if ( newMailsOld != m_newMails ) {
Config cfg( "mail" );
cfg.setGroup( "Status" );
cfg.writeEntry( "newMails", m_newMails );
QCopEnvelope env( "QPE/Pim", "newMails(int)" );
env << m_newMails;
}