summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/bend/bend.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/bend/bend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/bend/bend.cpp44
1 files changed, 14 insertions, 30 deletions
diff --git a/noncore/unsupported/mail2/bend/bend.cpp b/noncore/unsupported/mail2/bend/bend.cpp
index fe3b736..681aca2 100644
--- a/noncore/unsupported/mail2/bend/bend.cpp
+++ b/noncore/unsupported/mail2/bend/bend.cpp
@@ -11,8 +11,7 @@
11 11
12#include <stdlib.h> 12#include <opie/odevice.h>
13 13
14#include "configfile.h"
15#include "imapresponse.h" 14#include "imapresponse.h"
16#include "imaphandler.h" 15#include "imaphandler.h"
17#include "zaurusstuff.h" 16#include "configfile.h"
18#include "bend.h" 17#include "bend.h"
@@ -22,5 +21,2 @@ BenD::BenD(QWidget *parent, const char *name, WFlags fl)
22{ 21{
23 _zaurus = false;
24 if (QFile("/dev/sharp_buz").exists()) _zaurus = true;
25
26 _config = new Config("mail"); 22 _config = new Config("mail");
@@ -58,7 +54,6 @@ void BenD::slotClicked()
58 e << QString("mail"); 54 e << QString("mail");
59 55
60 if (_ledOn) { 56 ODevice *device = ODevice::inst();
61 ZaurusStuff::blinkLedOff(); 57 if (device->led(1) == OLED_BlinkSlow)
62 _ledOn = false; 58 device->setLed(1, OLED_Off);
63 }
64} 59}
@@ -100,19 +95,13 @@ void BenD::slotIMAPStatus(IMAPResponse &response)
100 if (response.STATUS()[0].recent().toInt() > 0) { 95 if (response.STATUS()[0].recent().toInt() > 0) {
96 ODevice *device = ODevice::inst();
101 if (isHidden()) show(); 97 if (isHidden()) show();
102 if (_config->readBoolEntry("BlinkLed", true)) 98 if (_config->readBoolEntry("BlinkLed", true))
103 ZaurusStuff::blinkLedOn(); 99 device->setLed(1, OLED_BlinkSlow);
104 if (_config->readBoolEntry("PlaySound", false)) { 100 if (_config->readBoolEntry("PlaySound", false))
105 if (_zaurus) { 101 device->alarmSound();
106 ZaurusStuff::buzzerOn();
107 QTimer::singleShot(3000, this, SLOT(slotSoundOff()));
108 } else {
109 QSound::play(Resource::findSound("mail/newmail"));
110 }
111 }
112 } else { 102 } else {
103 ODevice *device = ODevice::inst();
113 if (!isHidden()) hide(); 104 if (!isHidden()) hide();
114 if (!_ledOn) { 105 if (device->led(1) == OLED_BlinkSlow)
115 ZaurusStuff::blinkLedOff(); 106 device->setLed(1, OLED_Off);
116 _ledOn = false;
117 }
118 } 107 }
@@ -122,6 +111 @@ void BenD::slotIMAPStatus(IMAPResponse &response)
122
123void BenD::slotSoundOff()
124{
125 ZaurusStuff::buzzerOff();
126}
127