-rw-r--r-- | noncore/net/mail/taskbarapplet/mailapplet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index 8bf4b89..5ba7085 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp | |||
@@ -1,60 +1,60 @@ | |||
1 | #include <qlayout.h> | 1 | #include <qlayout.h> |
2 | #include <qpixmap.h> | 2 | #include <qpixmap.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qsound.h> | 4 | #include <qsound.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | 7 | ||
8 | #include <qpe/qcopenvelope_qws.h> | 8 | #include <qpe/qcopenvelope_qws.h> |
9 | #include <qpe/resource.h> | 9 | #include <qpe/resource.h> |
10 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | 11 | ||
12 | #include <opie/odevice.h> | 12 | #include <opie/odevice.h> |
13 | 13 | ||
14 | #include "mailapplet.h" | 14 | #include "mailapplet.h" |
15 | 15 | ||
16 | using namespace Opie; | 16 | using namespace Opie; |
17 | 17 | ||
18 | MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) | 18 | MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) |
19 | : QButton( parent, name, fl ) { | 19 | : QButton( parent, name, fl ) { |
20 | 20 | ||
21 | m_config = new Config( "mail" ); | 21 | m_config = new Config( "mail" ); |
22 | m_config->setGroup( "Applet" ); | 22 | m_config->setGroup( "Applet" ); |
23 | 23 | ||
24 | QVBoxLayout *layout = new QVBoxLayout( this ); | 24 | QVBoxLayout *layout = new QVBoxLayout( this ); |
25 | layout->addItem( new QSpacerItem( 0,0 ) ); | 25 | layout->addItem( new QSpacerItem( 0,0 ) ); |
26 | 26 | ||
27 | QLabel *pixmap = new QLabel( this ); | 27 | QLabel *pixmap = new QLabel( this ); |
28 | pixmap->setPixmap( Resource::loadPixmap( "opiemail/mailchecker" ) ); | 28 | pixmap->setPixmap( Resource::loadPixmap( "mail/mailchecker" ) ); |
29 | layout->addWidget( pixmap ); | 29 | layout->addWidget( pixmap ); |
30 | 30 | ||
31 | layout->addItem( new QSpacerItem( 0,0 ) ); | 31 | layout->addItem( new QSpacerItem( 0,0 ) ); |
32 | 32 | ||
33 | hide(); | 33 | hide(); |
34 | 34 | ||
35 | connect( this, SIGNAL( clicked() ), SLOT( slotClicked() ) ); | 35 | connect( this, SIGNAL( clicked() ), SLOT( slotClicked() ) ); |
36 | 36 | ||
37 | if ( !m_config->readBoolEntry( "Disabled", false ) ) { | 37 | if ( !m_config->readBoolEntry( "Disabled", false ) ) { |
38 | m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; | 38 | m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; |
39 | m_intervalTimer = new QTimer(); | 39 | m_intervalTimer = new QTimer(); |
40 | m_intervalTimer->start( m_intervalMs ); | 40 | m_intervalTimer->start( m_intervalMs ); |
41 | connect( m_intervalTimer, SIGNAL(timeout() ), SLOT( slotCheck() ) ); | 41 | connect( m_intervalTimer, SIGNAL(timeout() ), SLOT( slotCheck() ) ); |
42 | 42 | ||
43 | QTimer::singleShot( 0, this, SLOT( slotCheck() ) ); | 43 | QTimer::singleShot( 0, this, SLOT( slotCheck() ) ); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | void MailApplet::drawButton(QPainter *) { } | 47 | void MailApplet::drawButton(QPainter *) { } |
48 | void MailApplet::drawButtonText(QPainter *) { } | 48 | void MailApplet::drawButtonText(QPainter *) { } |
49 | 49 | ||
50 | void MailApplet::slotClicked() { | 50 | void MailApplet::slotClicked() { |
51 | qDebug( " CLICKED" ); | 51 | qDebug( " CLICKED" ); |
52 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 52 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
53 | e << QString( "opiemail" ); | 53 | e << QString( "opiemail" ); |
54 | 54 | ||
55 | ODevice *device = ODevice::inst(); | 55 | ODevice *device = ODevice::inst(); |
56 | if ( !device-> ledList ( ). isEmpty ( ) ) { | 56 | if ( !device-> ledList ( ). isEmpty ( ) ) { |
57 | OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0]; | 57 | OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0]; |
58 | 58 | ||
59 | device->setLedState( led, Led_Off ); | 59 | device->setLedState( led, Led_Off ); |
60 | } | 60 | } |