-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 28 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.h | 3 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaapplet.pro | 31 | ||||
-rw-r--r-- | core/applets/irdaapplet/opie-irdaapplet.control | 2 |
4 files changed, 36 insertions, 28 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index c0f11c0..42bed5e 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -46,2 +46,3 @@ | |||
46 | #include <qpopupmenu.h> | 46 | #include <qpopupmenu.h> |
47 | #include <qsound.h> | ||
47 | 48 | ||
@@ -66,4 +67,2 @@ IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) | |||
66 | receiveActive = false; | 67 | receiveActive = false; |
67 | startTimer(5000); | ||
68 | timerEvent(NULL); | ||
69 | popupMenu = 0; | 68 | popupMenu = 0; |
@@ -72,2 +71,7 @@ IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) | |||
72 | 71 | ||
72 | void IrdaApplet::show() { | ||
73 | QWidget::show(); | ||
74 | startTimer(2000); | ||
75 | } | ||
76 | |||
73 | IrdaApplet::~IrdaApplet() { | 77 | IrdaApplet::~IrdaApplet() { |
@@ -208,3 +212,3 @@ void IrdaApplet::showDiscovered() { | |||
208 | for(QStringList::Iterator line=list.begin(); line!=list.end(); line++) { | 212 | for(QStringList::Iterator line=list.begin(); line!=list.end(); line++) { |
209 | qDebug( (*line) ); | 213 | // qDebug( (*line) ); |
210 | if( (*line).startsWith("nickname:") ){ | 214 | if( (*line).startsWith("nickname:") ){ |
@@ -213,3 +217,3 @@ void IrdaApplet::showDiscovered() { | |||
213 | 217 | ||
214 | qDebug(discoveredDevice + "(" + deviceAddr + ")"); | 218 | // qDebug(discoveredDevice + "(" + deviceAddr + ")"); |
215 | 219 | ||
@@ -217,2 +221,3 @@ void IrdaApplet::showDiscovered() { | |||
217 | popup( tr("Found:") + " " + discoveredDevice ); | 221 | popup( tr("Found:") + " " + discoveredDevice ); |
222 | QSound::play(Resource::findSound("irdaapplet/irdaon")); | ||
218 | qcopsend = TRUE; | 223 | qcopsend = TRUE; |
@@ -220,3 +225,3 @@ void IrdaApplet::showDiscovered() { | |||
220 | devicesAvailable.replace( deviceAddr, new QString(discoveredDevice) ); | 225 | devicesAvailable.replace( deviceAddr, new QString(discoveredDevice) ); |
221 | //qDebug("IrdaMon: " + deviceAddr + "=" + *devicesAvailable[deviceAddr] ); | 226 | // qDebug("IrdaMon: " + deviceAddr + "=" + *devicesAvailable[deviceAddr] ); |
222 | } | 227 | } |
@@ -226,7 +231,8 @@ void IrdaApplet::showDiscovered() { | |||
226 | while ( it.current() ) { | 231 | while ( it.current() ) { |
227 | qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); | 232 | // qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); |
228 | if ( (*it.current()).left(3) == "+++" ) { | 233 | if ( (*it.current()).left(3) == "+++" ) { |
229 | popup( tr("Lost:") + " " + (*devicesAvailable[it.currentKey()]).mid(3) ); | 234 | popup( tr("Lost:") + " " + (*devicesAvailable[it.currentKey()]).mid(3) ); |
235 | QSound::play(Resource::findSound("irdaapplet/irdaoff")); | ||
230 | devicesAvailable.remove( it.currentKey() ); | 236 | devicesAvailable.remove( it.currentKey() ); |
231 | qDebug("IrdaMon: delete " + it.currentKey() + "!"); | 237 | // qDebug("IrdaMon: delete " + it.currentKey() + "!"); |
232 | qcopsend = TRUE; | 238 | qcopsend = TRUE; |
@@ -253,4 +259,3 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) { | |||
253 | if (irdaactive && devicesAvailable.count() > 0) { | 259 | if (irdaactive && devicesAvailable.count() > 0) { |
254 | menu->insertItem( tr("Discovered Device:"), 9); | 260 | menu->insertItem( tr("Discovered Device:"), 9); |
255 | |||
256 | QDictIterator<QString> it( devicesAvailable ); | 261 | QDictIterator<QString> it( devicesAvailable ); |
@@ -318,5 +323,2 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) { | |||
318 | } | 323 | } |
319 | case 6: | ||
320 | qDebug("FIXME: Bring up pretty menu...\n"); | ||
321 | // With table of currently-detected devices. | ||
322 | } | 324 | } |
@@ -351,3 +353,3 @@ void IrdaApplet::paintEvent( QPaintEvent* ) { | |||
351 | QPainter p(this); | 353 | QPainter p(this); |
352 | qDebug("paint irda pixmap"); | 354 | // qDebug("paint irda pixmap"); |
353 | 355 | ||
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h index 7b37847..e878946 100644 --- a/core/applets/irdaapplet/irda.h +++ b/core/applets/irdaapplet/irda.h | |||
@@ -49,2 +49,5 @@ private: | |||
49 | 49 | ||
50 | public slots: | ||
51 | void show(); | ||
52 | |||
50 | private slots: | 53 | private slots: |
diff --git a/core/applets/irdaapplet/irdaapplet.pro b/core/applets/irdaapplet/irdaapplet.pro index 035b0c1..47267f7 100644 --- a/core/applets/irdaapplet/irdaapplet.pro +++ b/core/applets/irdaapplet/irdaapplet.pro | |||
@@ -11,15 +11,18 @@ VERSION = 1.0.0 | |||
11 | 11 | ||
12 | TRANSLATIONS = ../../i18n/de/libirdaapplet.ts | 12 | |
13 | TRANSLATIONS += ../../i18n/en/libirdaapplet.ts | 13 | |
14 | TRANSLATIONS += ../../i18n/es/libirdaapplet.ts | 14 | TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts |
15 | TRANSLATIONS += ../../i18n/fr/libirdaapplet.ts | 15 | TRANSLATIONS += ../../../i18n/en/libirdaapplet.ts |
16 | TRANSLATIONS += ../../i18n/hu/libirdaapplet.ts | 16 | TRANSLATIONS += ../../../i18n/es/libirdaapplet.ts |
17 | TRANSLATIONS += ../../i18n/ja/libirdaapplet.ts | 17 | TRANSLATIONS += ../../../i18n/fr/libirdaapplet.ts |
18 | TRANSLATIONS += ../../i18n/ko/libirdaapplet.ts | 18 | TRANSLATIONS += ../../../i18n/hu/libirdaapplet.ts |
19 | TRANSLATIONS += ../../i18n/no/libirdaapplet.ts | 19 | TRANSLATIONS += ../../../i18n/ja/libirdaapplet.ts |
20 | TRANSLATIONS += ../../i18n/pl/libirdaapplet.ts | 20 | TRANSLATIONS += ../../../i18n/ko/libirdaapplet.ts |
21 | TRANSLATIONS += ../../i18n/pt/libirdaapplet.ts | 21 | TRANSLATIONS += ../../../i18n/no/libirdaapplet.ts |
22 | TRANSLATIONS += ../../i18n/pt_BR/libirdaapplet.ts | 22 | TRANSLATIONS += ../../../i18n/pl/libirdaapplet.ts |
23 | TRANSLATIONS += ../../i18n/sl/libirdaapplet.ts | 23 | TRANSLATIONS += ../../../i18n/pt/libirdaapplet.ts |
24 | TRANSLATIONS += ../../i18n/zh_CN/libirdaapplet.ts | 24 | TRANSLATIONS += ../../../i18n/pt_BR/libirdaapplet.ts |
25 | TRANSLATIONS += ../../i18n/zh_TW/libirdaapplet.ts | 25 | TRANSLATIONS += ../../../i18n/sl/libirdaapplet.ts |
26 | TRANSLATIONS += ../../../i18n/zh_CN/libirdaapplet.ts | ||
27 | TRANSLATIONS += ../../../i18n/zh_TW/libirdaapplet.ts | ||
28 | |||
diff --git a/core/applets/irdaapplet/opie-irdaapplet.control b/core/applets/irdaapplet/opie-irdaapplet.control index 85c3386..5b901de 100644 --- a/core/applets/irdaapplet/opie-irdaapplet.control +++ b/core/applets/irdaapplet/opie-irdaapplet.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: plugins/applets/libirdaapplet.so* pics/irdaapplet/* | 1 | Files: plugins/applets/libirdaapplet.so* pics/irdaapplet/* sounds/irdaapplet/*.wav |
2 | Priority: optional | 2 | Priority: optional |