Diffstat (limited to 'core/applets/irdaapplet/irda.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 24 |
1 files changed, 13 insertions, 11 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 @@ #include <qpopupmenu.h> +#include <qsound.h> @@ -66,4 +67,2 @@ IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) receiveActive = false; - startTimer(5000); - timerEvent(NULL); popupMenu = 0; @@ -72,2 +71,7 @@ IrdaApplet::IrdaApplet( QWidget *parent, const char *name ) +void IrdaApplet::show() { + QWidget::show(); + startTimer(2000); +} + IrdaApplet::~IrdaApplet() { @@ -208,3 +212,3 @@ void IrdaApplet::showDiscovered() { for(QStringList::Iterator line=list.begin(); line!=list.end(); line++) { - qDebug( (*line) ); + // qDebug( (*line) ); if( (*line).startsWith("nickname:") ){ @@ -213,3 +217,3 @@ void IrdaApplet::showDiscovered() { - qDebug(discoveredDevice + "(" + deviceAddr + ")"); + // qDebug(discoveredDevice + "(" + deviceAddr + ")"); @@ -217,2 +221,3 @@ void IrdaApplet::showDiscovered() { popup( tr("Found:") + " " + discoveredDevice ); + QSound::play(Resource::findSound("irdaapplet/irdaon")); qcopsend = TRUE; @@ -226,7 +231,8 @@ void IrdaApplet::showDiscovered() { while ( it.current() ) { - qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); + // qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); if ( (*it.current()).left(3) == "+++" ) { popup( tr("Lost:") + " " + (*devicesAvailable[it.currentKey()]).mid(3) ); + QSound::play(Resource::findSound("irdaapplet/irdaoff")); devicesAvailable.remove( it.currentKey() ); - qDebug("IrdaMon: delete " + it.currentKey() + "!"); + // qDebug("IrdaMon: delete " + it.currentKey() + "!"); qcopsend = TRUE; @@ -254,3 +260,2 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) { menu->insertItem( tr("Discovered Device:"), 9); - QDictIterator<QString> it( devicesAvailable ); @@ -318,5 +323,2 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) { } - case 6: - qDebug("FIXME: Bring up pretty menu...\n"); - // With table of currently-detected devices. } @@ -351,3 +353,3 @@ void IrdaApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint irda pixmap"); + // qDebug("paint irda pixmap"); |