summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-26 18:23:57 (UTC)
committer harlekin <harlekin>2003-03-26 18:23:57 (UTC)
commit8c1acc27882a79ea9f1ee9b9be708b9bbab052ba (patch) (unidiff)
treeb906f762e28da948eaaa3ea0df5c81fdd9d41755
parent88a93db37e001dc02f9edddf81919266fde0173c (diff)
downloadopie-8c1acc27882a79ea9f1ee9b9be708b9bbab052ba.zip
opie-8c1acc27882a79ea9f1ee9b9be708b9bbab052ba.tar.gz
opie-8c1acc27882a79ea9f1ee9b9be708b9bbab052ba.tar.bz2
also activate discovery if not allready running - makes beaming with s45 easier
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/irdaapplet/irda.cpp28
-rw-r--r--core/applets/irdaapplet/irda.h3
2 files changed, 21 insertions, 10 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp
index a5b4bfc..51c2ebf 100644
--- a/core/applets/irdaapplet/irda.cpp
+++ b/core/applets/irdaapplet/irda.cpp
@@ -59,3 +59,4 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
59 m_popup = 0; 59 m_popup = 0;
60 m_wasOn = false; 60 m_wasOn = false;
61 m_wasDiscover = false;
61 62
@@ -290,4 +291,4 @@ void IrdaApplet::timerEvent ( QTimerEvent * )
290{ 291{
291 bool oldactive = m_irda_active; 292 bool oldactive = m_irda_active;
292 bool olddiscovery = m_irda_discovery_active; 293 bool olddiscovery = m_irda_discovery_active;
293 bool receiveUpdate = false; 294 bool receiveUpdate = false;
@@ -299,3 +300,3 @@ void IrdaApplet::timerEvent ( QTimerEvent * )
299 300
300 m_irda_active = checkIrdaStatus ( ); 301 m_irda_active = checkIrdaStatus ( );
301 m_irda_discovery_active = checkIrdaDiscoveryStatus ( ); 302 m_irda_discovery_active = checkIrdaDiscoveryStatus ( );
@@ -316,3 +317,3 @@ void IrdaApplet::paintEvent ( QPaintEvent * )
316 if ( m_irda_discovery_active ) 317 if ( m_irda_discovery_active )
317 p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); 318 p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap );
318 319
@@ -331,8 +332,17 @@ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) {
331 m_wasOn = checkIrdaStatus(); 332 m_wasOn = checkIrdaStatus();
332 if (!m_wasOn) 333 m_wasDiscover = checkIrdaDiscoveryStatus();
334 if (!m_wasOn) {
333 setIrdaStatus( true ); 335 setIrdaStatus( true );
334 }else if ( str == "disableIrda()") { 336 }
335 if (!m_wasOn) 337 if ( !m_wasDiscover ) {
338 setIrdaDiscoveryStatus ( true );
339 }
340 } else if ( str == "disableIrda()") {
341 if (!m_wasOn) {
336 setIrdaStatus( false ); 342 setIrdaStatus( false );
337 }else if ( str == "listDevices()") { 343 }
344 if ( !m_wasDiscover ) {
345 setIrdaDiscoveryStatus ( false );
346 }
347 } else if ( str == "listDevices()") {
338 QCopEnvelope e("QPE/IrDaAppletBack", "devices(QStringList)"); 348 QCopEnvelope e("QPE/IrDaAppletBack", "devices(QStringList)");
diff --git a/core/applets/irdaapplet/irda.h b/core/applets/irdaapplet/irda.h
index 675f874..ec1d32c 100644
--- a/core/applets/irdaapplet/irda.h
+++ b/core/applets/irdaapplet/irda.h
@@ -70,3 +70,4 @@ private:
70 70
71 bool m_wasOn; // if IrDa was enabled 71 bool m_wasOn; // if IrDa was enabled
72 bool m_wasDiscover;
72}; 73};