author | conber <conber> | 2002-06-19 13:33:18 (UTC) |
---|---|---|
committer | conber <conber> | 2002-06-19 13:33:18 (UTC) |
commit | 6eed7b58b02de6efb49a67f3da3dabbd3aeaa27b (patch) (unidiff) | |
tree | 834e7d2d431cf5264c86c468d1e24364da618661 | |
parent | 952cb1ec42e827f1bc45f9d3f0a1b685ff545790 (diff) | |
download | opie-6eed7b58b02de6efb49a67f3da3dabbd3aeaa27b.zip opie-6eed7b58b02de6efb49a67f3da3dabbd3aeaa27b.tar.gz opie-6eed7b58b02de6efb49a67f3da3dabbd3aeaa27b.tar.bz2 |
changed bend to use ODevice
-rw-r--r-- | noncore/unsupported/mail2/bend/bend.cpp | 40 | ||||
-rw-r--r-- | noncore/unsupported/mail2/bend/bend.h | 3 |
2 files changed, 12 insertions, 31 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"); |
@@ -59,6 +55,5 @@ void BenD::slotClicked() | |||
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 | |||
123 | void BenD::slotSoundOff() | ||
124 | { | ||
125 | ZaurusStuff::buzzerOff(); | ||
126 | } | ||
127 | |||
diff --git a/noncore/unsupported/mail2/bend/bend.h b/noncore/unsupported/mail2/bend/bend.h index 7972929..233c552 100644 --- a/noncore/unsupported/mail2/bend/bend.h +++ b/noncore/unsupported/mail2/bend/bend.h | |||
@@ -20,3 +20,2 @@ protected: | |||
20 | void gotNewMail(); | 20 | void gotNewMail(); |
21 | QString rot13(const QString &input); | ||
22 | 21 | ||
@@ -25,3 +24,2 @@ protected slots: | |||
25 | void slotClicked(); | 24 | void slotClicked(); |
26 | void slotSoundOff(); | ||
27 | void slotIMAPStatus(IMAPResponse &response); | 25 | void slotIMAPStatus(IMAPResponse &response); |
@@ -32,3 +30,2 @@ private: | |||
32 | int _intervalMs; | 30 | int _intervalMs; |
33 | bool _zaurus, _ledOn; | ||
34 | 31 | ||