Diffstat (limited to 'core/applets/irdaapplet/irda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index a197957..67e7f22 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -27,2 +27,4 @@ | |||
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #include <qpe/ir.h> | ||
29 | #include <qpe/qcopenvelope_qws.h> | ||
28 | 30 | ||
@@ -151,5 +153,8 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) | |||
151 | 153 | ||
152 | QPoint p = mapToGlobal( QPoint(1, -menu->sizeHint().height()-1) ); | 154 | if( Ir::supported() ){ |
155 | menu->insertItem( tr("Enable Receive"), 4 ); | ||
156 | } | ||
157 | QPoint p = mapToGlobal( QPoint(1, menu->sizeHint().height()-1) ); | ||
153 | ret = menu->exec(p, 2); | 158 | ret = menu->exec(p, 2); |
154 | 159 | ||
155 | qDebug("ret was %d\n", ret); | 160 | qDebug("ret was %d\n", ret); |
@@ -171,5 +176,11 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) | |||
171 | setIrdaDiscoveryStatus(1); | 176 | setIrdaDiscoveryStatus(1); |
172 | timerEvent(NULL); | 177 | timerEvent(NULL); // NULL is undefined in c++ use 0 or 0l |
173 | break; | 178 | break; |
174 | case 4: | 179 | case 4: { // enable receive{ |
180 | qWarning("Enable receive" ); | ||
181 | QCopEnvelope e("QPE/Obex", "receive(bool)" ); | ||
182 | e << true; | ||
183 | break; | ||
184 | } | ||
185 | case 6: | ||
175 | qDebug("FIXME: Bring up pretty menu...\n"); | 186 | qDebug("FIXME: Bring up pretty menu...\n"); |
@@ -177,3 +188,3 @@ void IrdaApplet::mousePressEvent( QMouseEvent *) | |||
177 | } | 188 | } |
178 | 189 | delete menu; // Can somebody explain why use a QPopupMenu* and not QPopupMenu nor QAction. with out delete we will leak cause QPopupMenu doesn't have a parent in this case | |
179 | } | 190 | } |