summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--core/applets/irdaapplet/irda.cpp25
2 files changed, 14 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f996c66..bbd22a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,48 +12,49 @@
12 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 12 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
13 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 13 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
14 * Opie-Console use Custom Font and Size in a Profile (harlekin) 14 * Opie-Console use Custom Font and Size in a Profile (harlekin)
15 * Opie-Console transparently log the Output and Input to a file (harlekin) 15 * Opie-Console transparently log the Output and Input to a file (harlekin)
16 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 16 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
17 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 17 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
18 * Opie-Security gained a 'test authentication' button (clem) 18 * Opie-Security gained a 'test authentication' button (clem)
19 19
20 Fixed Bugs 20 Fixed Bugs
21 ---------- 21 ----------
22 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 22 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
23 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 23 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
24 * #1245 - Opie-Go 'paused' (zecke) 24 * #1245 - Opie-Go 'paused' (zecke)
25 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 25 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
26 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 26 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
27 * #1395 - Build VNC Backend with gcc3.4 27 * #1395 - Build VNC Backend with gcc3.4
28 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 28 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
29 * #1445 - Opie-Sheet Has No Icon (CoreDump) 29 * #1445 - Opie-Sheet Has No Icon (CoreDump)
30 * #1448 - Brightness Applet added (mickeyl) 30 * #1448 - Brightness Applet added (mickeyl)
31 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 31 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
32 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 32 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
33 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 33 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
34 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 34 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
35 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) 35 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem)
36 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
36 37
37 2004-09-17Opie 1.1.6 38 2004-09-17Opie 1.1.6
38 39
39 New Features 40 New Features
40 ------------ 41 ------------
41 * Fifteen gained configurable number of items (zecke) 42 * Fifteen gained configurable number of items (zecke)
42 * Fifteen can have custom background images (zecke) 43 * Fifteen can have custom background images (zecke)
43 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 44 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
44 * Integrated the new security framework into libopie2 (zecke,clem) 45 * Integrated the new security framework into libopie2 (zecke,clem)
45 * Converted the launcher to use the new security framework (zecke) 46 * Converted the launcher to use the new security framework (zecke)
46 * Backup can now handle custom locations for backup and restore (ar) 47 * Backup can now handle custom locations for backup and restore (ar)
47 * Implemented right-on-hold feedback (wimpie,zecke) 48 * Implemented right-on-hold feedback (wimpie,zecke)
48 * Lots of new features in opie-reader (tim,pohly) 49 * Lots of new features in opie-reader (tim,pohly)
49 * Build system cleanups (schurig) 50 * Build system cleanups (schurig)
50 51
51 Fixed Bugs 52 Fixed Bugs
52 -------- 53 --------
53 * #1005 - Fixed backup to CompactFlash (ar) 54 * #1005 - Fixed backup to CompactFlash (ar)
54 * #1167 - Fixed Opie write crashing on more text than one page (ar) 55 * #1167 - Fixed Opie write crashing on more text than one page (ar)
55 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 56 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
56 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 57 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
57 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 58 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
58 * #1370 - Pimconverter now reacts on cancel key (eilers) 59 * #1370 - Pimconverter now reacts on cancel key (eilers)
59 * #1376 - Bring back the capslock/numlock display (zecke) 60 * #1376 - Bring back the capslock/numlock display (zecke)
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp
index 267714e..6148308 100644
--- a/core/applets/irdaapplet/irda.cpp
+++ b/core/applets/irdaapplet/irda.cpp
@@ -1,76 +1,77 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 David Woodhouse <dwmw2@infradead.org> 2** Copyright (C) 2002 David Woodhouse <dwmw2@infradead.org>
3** Max Reiss <harlekin@handhelds.org> [trivial stuff] 3** Max Reiss <harlekin@handhelds.org> [trivial stuff]
4** Robert Griebl <sandman@handhelds.org> 4** Robert Griebl <sandman@handhelds.org>
5** Holger Freyther <zecke@handhelds.org> QCOP Interface 5** Holger Freyther <zecke@handhelds.org> QCOP Interface
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15**********************************************************************/ 15**********************************************************************/
16 16
17#include "irda.h" 17#include "irda.h"
18 18
19/* OPIE */ 19/* OPIE */
20#include <opie2/otaskbarapplet.h> 20#include <opie2/otaskbarapplet.h>
21#include <qpe/applnk.h>
21#include <qpe/resource.h> 22#include <qpe/resource.h>
22#include <qpe/qcopenvelope_qws.h> 23#include <qpe/qcopenvelope_qws.h>
24using namespace Opie::Ui;
23 25
24/* QT */ 26/* QT */
25#include <qpainter.h> 27#include <qpainter.h>
26#include <qfile.h> 28#include <qfile.h>
27#include <qtimer.h> 29#include <qtimer.h>
28#include <qtextstream.h> 30#include <qtextstream.h>
29 31
30/* STD */ 32/* STD */
31#include <unistd.h> 33#include <unistd.h>
32#include <net/if.h> 34#include <net/if.h>
33#include <netinet/in.h> 35#include <netinet/in.h>
34#include <sys/types.h> 36#include <sys/types.h>
35#include <sys/socket.h> 37#include <sys/socket.h>
36#include <sys/ioctl.h> 38#include <sys/ioctl.h>
37 39
38//=========================================================================== 40//===========================================================================
39 41
40using namespace Opie::Ui;
41IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) 42IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
42 : QWidget ( parent, name ) 43 : QWidget ( parent, name )
43{ 44{
44 setFixedHeight ( 18 ); 45 setFixedHeight( AppLnk::smallIconSize() );
45 setFixedWidth ( 14 ); 46 setFixedWidth( AppLnk::smallIconSize() );
46 47
47 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); 48 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP );
48 49
49 m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); 50 m_irdaOnPixmap = Resource::loadImage( "irdaapplet/irdaon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize());
50 m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); 51 m_irdaOffPixmap = Resource::loadImage( "irdaapplet/irdaoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize());
51 m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); 52 m_irdaDiscoveryOnPixmap = Resource::loadImage( "irdaapplet/magglass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize());
52 m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); 53 m_receiveActivePixmap = Resource::loadImage( "irdaapplet/receive" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize());
53 54
54 m_irda_active = false; 55 m_irda_active = false;
55 m_irda_discovery_active = false; 56 m_irda_discovery_active = false;
56 m_receive_active = false; 57 m_receive_active = false;
57 m_receive_state_changed = false; 58 m_receive_state_changed = false;
58 m_popup = 0; 59 m_popup = 0;
59 m_wasOn = false; 60 m_wasOn = false;
60 m_wasDiscover = false; 61 m_wasDiscover = false;
61 62
62 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); 63 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this );
63 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), 64 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ),
64 this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); 65 this, SLOT(slotMessage(const QCString&,const QByteArray&) ) );
65} 66}
66 67
67int IrdaApplet::position() 68int IrdaApplet::position()
68{ 69{
69 return 6; 70 return 6;
70} 71}
71 72
72void IrdaApplet::show() 73void IrdaApplet::show()
73{ 74{
74 QWidget::show ( ); 75 QWidget::show ( );
75 startTimer ( 2000 ); 76 startTimer ( 2000 );
76} 77}
@@ -293,57 +294,57 @@ void IrdaApplet::mousePressEvent ( QMouseEvent * )
293 294
294void IrdaApplet::timerEvent ( QTimerEvent * ) 295void IrdaApplet::timerEvent ( QTimerEvent * )
295{ 296{
296 bool oldactive = m_irda_active; 297 bool oldactive = m_irda_active;
297 bool olddiscovery = m_irda_discovery_active; 298 bool olddiscovery = m_irda_discovery_active;
298 bool receiveUpdate = false; 299 bool receiveUpdate = false;
299 300
300 if ( m_receive_state_changed ) { 301 if ( m_receive_state_changed ) {
301 receiveUpdate = true; 302 receiveUpdate = true;
302 m_receive_state_changed = false; 303 m_receive_state_changed = false;
303 } 304 }
304 305
305 m_irda_active = checkIrdaStatus ( ); 306 m_irda_active = checkIrdaStatus ( );
306 m_irda_discovery_active = checkIrdaDiscoveryStatus ( ); 307 m_irda_discovery_active = checkIrdaDiscoveryStatus ( );
307 308
308 if ( m_irda_discovery_active ) 309 if ( m_irda_discovery_active )
309 showDiscovered ( ); 310 showDiscovered ( );
310 311
311 if (( m_irda_active != oldactive ) || ( m_irda_discovery_active != olddiscovery ) || receiveUpdate ) 312 if (( m_irda_active != oldactive ) || ( m_irda_discovery_active != olddiscovery ) || receiveUpdate )
312 update ( ); 313 update ( );
313} 314}
314 315
315void IrdaApplet::paintEvent ( QPaintEvent * ) 316void IrdaApplet::paintEvent ( QPaintEvent * )
316{ 317{
317 QPainter p ( this ); 318 QPainter p( this );
318 319
319 p. drawPixmap ( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap ); 320 p.drawPixmap( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap );
320 321
321 if ( m_irda_discovery_active ) 322 if ( m_irda_discovery_active )
322 p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); 323 p.drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap );
323 324
324 if ( m_receive_active ) 325 if ( m_receive_active )
325 p. drawPixmap( 0, 1, m_receiveActivePixmap ); 326 p.drawPixmap( 0, 1, m_receiveActivePixmap );
326} 327}
327/* 328/*
328 * We know 3 calls 329 * We know 3 calls
329 * a) enable 330 * a) enable
330 * b) disable 331 * b) disable
331 * a and b will temp enable the IrDa device and disable will disable it again if it wasn't on 332 * a and b will temp enable the IrDa device and disable will disable it again if it wasn't on
332 * c) listDevices: We will return a list of known devices 333 * c) listDevices: We will return a list of known devices
333 */ 334 */
334void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ) { 335void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ) {
335 if ( str == "enableIrda()") { 336 if ( str == "enableIrda()") {
336 m_wasOn = checkIrdaStatus(); 337 m_wasOn = checkIrdaStatus();
337 m_wasDiscover = checkIrdaDiscoveryStatus(); 338 m_wasDiscover = checkIrdaDiscoveryStatus();
338 if (!m_wasOn) { 339 if (!m_wasOn) {
339 setIrdaStatus( true ); 340 setIrdaStatus( true );
340 } 341 }
341 if ( !m_wasDiscover ) { 342 if ( !m_wasDiscover ) {
342 setIrdaDiscoveryStatus ( true ); 343 setIrdaDiscoveryStatus ( true );
343 } 344 }
344 } else if ( str == "disableIrda()") { 345 } else if ( str == "disableIrda()") {
345 if (!m_wasOn) { 346 if (!m_wasOn) {
346 setIrdaStatus( false ); 347 setIrdaStatus( false );
347 } 348 }
348 if ( !m_wasDiscover ) { 349 if ( !m_wasDiscover ) {
349 setIrdaDiscoveryStatus ( false ); 350 setIrdaDiscoveryStatus ( false );