summaryrefslogtreecommitdiff
path: root/core/applets
authorchicken <chicken>2004-03-01 16:12:01 (UTC)
committer chicken <chicken>2004-03-01 16:12:01 (UTC)
commit9bc70bb8a0bdd3a7bc0013f2cacce7c039b88b38 (patch) (unidiff)
tree62527c430eb2f6c62ac01c11cdfea06494101a0e /core/applets
parent931c55406a043195712955c732a875e17899df90 (diff)
downloadopie-9bc70bb8a0bdd3a7bc0013f2cacce7c039b88b38.zip
opie-9bc70bb8a0bdd3a7bc0013f2cacce7c039b88b38.tar.gz
opie-9bc70bb8a0bdd3a7bc0013f2cacce7c039b88b38.tar.bz2
fix includes
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/battery.cpp1
-rw-r--r--core/applets/batteryapplet/batterystatus.cpp2
-rw-r--r--core/applets/cardmon/cardmon.cpp2
-rw-r--r--core/applets/homeapplet/home.cpp2
-rw-r--r--core/applets/irdaapplet/irda.cpp5
-rw-r--r--core/applets/logoutapplet/logout.cpp2
-rw-r--r--core/applets/multikeyapplet/multikey.cpp6
7 files changed, 0 insertions, 20 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp
index fed9b34..b2cef55 100644
--- a/core/applets/batteryapplet/battery.cpp
+++ b/core/applets/batteryapplet/battery.cpp
@@ -1,76 +1,75 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "battery.h" 20#include "battery.h"
21#include "batterystatus.h" 21#include "batterystatus.h"
22 22
23/* OPIE */ 23/* OPIE */
24#include <opie2/otaskbarapplet.h> 24#include <opie2/otaskbarapplet.h>
25#include <qpe/applnk.h> 25#include <qpe/applnk.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27#include <qpe/power.h> 27#include <qpe/power.h>
28#include <qpe/qpeapplication.h>
29 28
30/* QT */ 29/* QT */
31#include <qpainter.h> 30#include <qpainter.h>
32#include <qtimer.h> 31#include <qtimer.h>
33 32
34 33
35BatteryMeter::BatteryMeter( QWidget *parent ) 34BatteryMeter::BatteryMeter( QWidget *parent )
36 : QWidget( parent ), charging(false) 35 : QWidget( parent ), charging(false)
37{ 36{
38 ps = new PowerStatus; 37 ps = new PowerStatus;
39 startTimer( 10000 ); 38 startTimer( 10000 );
40 39
41 setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); 40 setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) );
42 setFixedHeight( AppLnk::smallIconSize() ); 41 setFixedHeight( AppLnk::smallIconSize() );
43 42
44 chargeTimer = new QTimer( this ); 43 chargeTimer = new QTimer( this );
45 connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); 44 connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) );
46 timerEvent(0); 45 timerEvent(0);
47 QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); 46 QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
48 Config c( "qpe" ); 47 Config c( "qpe" );
49 c.setGroup( "Battery" ); 48 c.setGroup( "Battery" );
50 style = c.readNumEntry( "Style", 0 ); 49 style = c.readNumEntry( "Style", 0 );
51} 50}
52 51
53BatteryMeter::~BatteryMeter() 52BatteryMeter::~BatteryMeter()
54{ 53{
55 delete ps; 54 delete ps;
56} 55}
57 56
58QSize BatteryMeter::sizeHint() const 57QSize BatteryMeter::sizeHint() const
59{ 58{
60 return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); 59 return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() );
61} 60}
62 61
63void BatteryMeter::mousePressEvent( QMouseEvent* e ) 62void BatteryMeter::mousePressEvent( QMouseEvent* e )
64{ 63{
65 if ( e->button() == RightButton ) 64 if ( e->button() == RightButton )
66 { 65 {
67 style = 1-style; 66 style = 1-style;
68 Config c( "qpe" ); 67 Config c( "qpe" );
69 c.setGroup( "Battery" ); 68 c.setGroup( "Battery" );
70 c.writeEntry( "Style", style ); 69 c.writeEntry( "Style", style );
71 repaint( true ); 70 repaint( true );
72 } 71 }
73 QWidget::mousePressEvent( e ); 72 QWidget::mousePressEvent( e );
74} 73}
75 74
76void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ ) 75void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ )
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp
index b9ca7b5..ea11495 100644
--- a/core/applets/batteryapplet/batterystatus.cpp
+++ b/core/applets/batteryapplet/batterystatus.cpp
@@ -1,63 +1,61 @@
1 1
2#include "batterystatus.h" 2#include "batterystatus.h"
3 3
4/* OPIE */ 4/* OPIE */
5#include <opie2/odevice.h> 5#include <opie2/odevice.h>
6#include <qpe/power.h> 6#include <qpe/power.h>
7 7
8/* QT */ 8/* QT */
9#include <qpainter.h>
10#include <qpushbutton.h> 9#include <qpushbutton.h>
11#include <qdrawutil.h> 10#include <qdrawutil.h>
12#include <qfile.h> 11#include <qfile.h>
13#include <qlayout.h> 12#include <qlayout.h>
14#include <qtextstream.h> 13#include <qtextstream.h>
15#include <qapplication.h>
16#include <qmessagebox.h> 14#include <qmessagebox.h>
17 15
18using namespace Opie; 16using namespace Opie;
19 17
20BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent ) 18BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent )
21 : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) { 19 : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) {
22 setCaption( tr("Battery status") ); 20 setCaption( tr("Battery status") );
23 setMinimumSize( 150, 200 ); 21 setMinimumSize( 150, 200 );
24 22
25 QPushButton *pb = new QPushButton( tr("Close"), this ); 23 QPushButton *pb = new QPushButton( tr("Close"), this );
26 QVBoxLayout *layout = new QVBoxLayout ( this ); 24 QVBoxLayout *layout = new QVBoxLayout ( this );
27 25
28 jackPercent = 0; 26 jackPercent = 0;
29 27
30 pb->setMaximumSize( 120, 40 ); 28 pb->setMaximumSize( 120, 40 );
31 29
32 pb->show(); 30 pb->show();
33 31
34 layout->addStretch(); 32 layout->addStretch();
35 layout->addWidget( pb ); 33 layout->addWidget( pb );
36 34
37 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { 35 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
38 getProcApmStatusIpaq(); 36 getProcApmStatusIpaq();
39 } 37 }
40 connect( pb, SIGNAL( clicked() ), this, SLOT( close() ) ); 38 connect( pb, SIGNAL( clicked() ), this, SLOT( close() ) );
41 percent = ps->batteryPercentRemaining(); 39 percent = ps->batteryPercentRemaining();
42 show(); 40 show();
43} 41}
44 42
45BatteryStatus::~BatteryStatus() 43BatteryStatus::~BatteryStatus()
46{ 44{
47} 45}
48 46
49/* 47/*
50 * Make use of the advanced apm interface of the ipaq 48 * Make use of the advanced apm interface of the ipaq
51 */ 49 */
52bool BatteryStatus::getProcApmStatusIpaq() { 50bool BatteryStatus::getProcApmStatusIpaq() {
53 51
54 bat2 = false; 52 bat2 = false;
55 53
56 QFile procApmIpaq("/proc/hal/battery"); 54 QFile procApmIpaq("/proc/hal/battery");
57 55
58 if (procApmIpaq.open(IO_ReadOnly) ) { 56 if (procApmIpaq.open(IO_ReadOnly) ) {
59 QStringList list; 57 QStringList list;
60 // since it is /proc we _must_ use QTextStream 58 // since it is /proc we _must_ use QTextStream
61 QTextStream stream ( &procApmIpaq); 59 QTextStream stream ( &procApmIpaq);
62 QString streamIn; 60 QString streamIn;
63 streamIn = stream.read(); 61 streamIn = stream.read();
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index 8ffaada..7625545 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -1,79 +1,77 @@
1/* 1/*
2* cardmon.cpp 2* cardmon.cpp
3* 3*
4* --------------------- 4* ---------------------
5* 5*
6* copyright : (c) 2002 by Maximilian Reiss 6* copyright : (c) 2002 by Maximilian Reiss
7* email : max.reiss@gmx.de 7* email : max.reiss@gmx.de
8* based on two apps by Devin Butterfield 8* based on two apps by Devin Butterfield
9*/ 9*/
10/*************************************************************************** 10/***************************************************************************
11 * * 11 * *
12 * This program is free software; you can redistribute it and/or modify * 12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by * 13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or * 14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. * 15 * (at your option) any later version. *
16 * * 16 * *
17 ***************************************************************************/ 17 ***************************************************************************/
18 18
19#include "cardmon.h" 19#include "cardmon.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/odevice.h> 22#include <opie2/odevice.h>
23#include <opie2/otaskbarapplet.h> 23#include <opie2/otaskbarapplet.h>
24#include <qpe/applnk.h> 24#include <qpe/applnk.h>
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26 26
27/* QT */ 27/* QT */
28#include <qapplication.h>
29#include <qcopchannel_qws.h> 28#include <qcopchannel_qws.h>
30#include <qpainter.h> 29#include <qpainter.h>
31#include <qmessagebox.h>
32#include <qfile.h> 30#include <qfile.h>
33#include <qtextstream.h> 31#include <qtextstream.h>
34#include <qsound.h> 32#include <qsound.h>
35#include <qtimer.h> 33#include <qtimer.h>
36 34
37/* STD */ 35/* STD */
38#include <stdio.h> 36#include <stdio.h>
39#include <unistd.h> 37#include <unistd.h>
40#include <stdlib.h> 38#include <stdlib.h>
41#include <string.h> 39#include <string.h>
42#include <fcntl.h> 40#include <fcntl.h>
43 41
44#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
45#include <sys/vfs.h> 43#include <sys/vfs.h>
46#include <mntent.h> 44#include <mntent.h>
47#endif 45#endif
48 46
49using namespace Opie; 47using namespace Opie;
50 48
51CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), 49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
52 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) 50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) )
53{ 51{
54 52
55 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); 53 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this );
56 connect( pcmciaChannel, 54 connect( pcmciaChannel,
57 SIGNAL( received( const QCString &, const QByteArray & ) ), this, 55 SIGNAL( received( const QCString &, const QByteArray & ) ), this,
58 SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); 56 SLOT( cardMessage( const QCString &, const QByteArray & ) ) );
59 57
60 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); 58 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this );
61 connect( sdChannel, 59 connect( sdChannel,
62 SIGNAL( received( const QCString &, const QByteArray & ) ), this, 60 SIGNAL( received( const QCString &, const QByteArray & ) ), this,
63 SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); 61 SLOT( cardMessage( const QCString &, const QByteArray & ) ) );
64 62
65 cardInPcmcia0 = FALSE; 63 cardInPcmcia0 = FALSE;
66 cardInPcmcia1 = FALSE; 64 cardInPcmcia1 = FALSE;
67 cardInSd = FALSE; 65 cardInSd = FALSE;
68 66
69 setFocusPolicy( NoFocus ); 67 setFocusPolicy( NoFocus );
70 68
71 setFixedWidth ( AppLnk::smallIconSize() ); 69 setFixedWidth ( AppLnk::smallIconSize() );
72 setFixedHeight ( AppLnk::smallIconSize() ); 70 setFixedHeight ( AppLnk::smallIconSize() );
73 71
74 getStatusPcmcia( TRUE ); 72 getStatusPcmcia( TRUE );
75 getStatusSd( TRUE ); 73 getStatusSd( TRUE );
76 repaint( FALSE ); 74 repaint( FALSE );
77 popupMenu = 0; 75 popupMenu = 0;
78} 76}
79 77
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp
index 455575f..8a930be 100644
--- a/core/applets/homeapplet/home.cpp
+++ b/core/applets/homeapplet/home.cpp
@@ -1,54 +1,52 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qpe/qcopenvelope_qws.h> 2#include <qpe/qcopenvelope_qws.h>
3 3
4#include <qapplication.h> 4#include <qapplication.h>
5#include <qiconset.h>
6#include <qpopupmenu.h>
7 5
8#include "home.h" 6#include "home.h"
9 7
10 8
11HomeApplet::HomeApplet ( ) 9HomeApplet::HomeApplet ( )
12 : QObject ( 0, "HomeApplet" ) 10 : QObject ( 0, "HomeApplet" )
13{ 11{
14} 12}
15 13
16HomeApplet::~HomeApplet ( ) 14HomeApplet::~HomeApplet ( )
17{ 15{
18} 16}
19 17
20int HomeApplet::position ( ) const 18int HomeApplet::position ( ) const
21{ 19{
22 return 4; 20 return 4;
23} 21}
24 22
25QString HomeApplet::name ( ) const 23QString HomeApplet::name ( ) const
26{ 24{
27 return tr( "Home shortcut" ); 25 return tr( "Home shortcut" );
28} 26}
29 27
30QString HomeApplet::text ( ) const 28QString HomeApplet::text ( ) const
31{ 29{
32 return tr( "Desktop" ); 30 return tr( "Desktop" );
33} 31}
34 32
35QString HomeApplet::tr( const char* s ) const 33QString HomeApplet::tr( const char* s ) const
36{ 34{
37 return qApp->translate( "HomeApplet", s, 0 ); 35 return qApp->translate( "HomeApplet", s, 0 );
38} 36}
39 37
40QString HomeApplet::tr( const char* s, const char* p ) const 38QString HomeApplet::tr( const char* s, const char* p ) const
41{ 39{
42 return qApp->translate( "HomeApplet", s, p ); 40 return qApp->translate( "HomeApplet", s, p );
43} 41}
44 42
45QIconSet HomeApplet::icon ( ) const 43QIconSet HomeApplet::icon ( ) const
46{ 44{
47 QPixmap pix; 45 QPixmap pix;
48 QImage img = Resource::loadImage ( "home" ); 46 QImage img = Resource::loadImage ( "home" );
49 47
50 if ( !img. isNull ( )) 48 if ( !img. isNull ( ))
51 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 49 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
52 return pix; 50 return pix;
53} 51}
54 52
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp
index f850424..a47f33d 100644
--- a/core/applets/irdaapplet/irda.cpp
+++ b/core/applets/irdaapplet/irda.cpp
@@ -1,77 +1,72 @@
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 <qcopchannel_qws.h>
18 17
19#include <qpe/qpeapplication.h>
20#include <qpe/resource.h> 18#include <qpe/resource.h>
21#include <qpe/ir.h>
22#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
23#include <qpe/sound.h>
24 20
25#include <qpainter.h> 21#include <qpainter.h>
26#include <qfile.h> 22#include <qfile.h>
27#include <qtimer.h> 23#include <qtimer.h>
28#include <qtextstream.h> 24#include <qtextstream.h>
29#include <qpopupmenu.h>
30 25
31#include <unistd.h> 26#include <unistd.h>
32#include <net/if.h> 27#include <net/if.h>
33#include <netinet/in.h> 28#include <netinet/in.h>
34#include <sys/types.h> 29#include <sys/types.h>
35#include <sys/socket.h> 30#include <sys/socket.h>
36#include <sys/ioctl.h> 31#include <sys/ioctl.h>
37 32
38#include "irda.h" 33#include "irda.h"
39 34
40//=========================================================================== 35//===========================================================================
41 36
42IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) 37IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
43 : QWidget ( parent, name ) 38 : QWidget ( parent, name )
44{ 39{
45 setFixedHeight ( 18 ); 40 setFixedHeight ( 18 );
46 setFixedWidth ( 14 ); 41 setFixedWidth ( 14 );
47 42
48 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); 43 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP );
49 44
50 m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); 45 m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" );
51 m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); 46 m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" );
52 m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); 47 m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" );
53 m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); 48 m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" );
54 49
55 m_irda_active = false; 50 m_irda_active = false;
56 m_irda_discovery_active = false; 51 m_irda_discovery_active = false;
57 m_receive_active = false; 52 m_receive_active = false;
58 m_receive_state_changed = false; 53 m_receive_state_changed = false;
59 m_popup = 0; 54 m_popup = 0;
60 m_wasOn = false; 55 m_wasOn = false;
61 m_wasDiscover = false; 56 m_wasDiscover = false;
62 57
63 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); 58 QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this );
64 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), 59 connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ),
65 this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); 60 this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) );
66} 61}
67 62
68void IrdaApplet::show() 63void IrdaApplet::show()
69{ 64{
70 QWidget::show ( ); 65 QWidget::show ( );
71 startTimer ( 2000 ); 66 startTimer ( 2000 );
72} 67}
73 68
74IrdaApplet::~IrdaApplet() 69IrdaApplet::~IrdaApplet()
75{ 70{
76 if ( m_sockfd >= 0 ) 71 if ( m_sockfd >= 0 )
77 ::close ( m_sockfd ); 72 ::close ( m_sockfd );
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp
index 92222c9..0ac0067 100644
--- a/core/applets/logoutapplet/logout.cpp
+++ b/core/applets/logoutapplet/logout.cpp
@@ -1,54 +1,52 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qpe/qcopenvelope_qws.h> 2#include <qpe/qcopenvelope_qws.h>
3 3
4#include <qapplication.h> 4#include <qapplication.h>
5#include <qiconset.h>
6#include <qpopupmenu.h>
7#include <qmessagebox.h> 5#include <qmessagebox.h>
8 6
9#include <unistd.h> 7#include <unistd.h>
10 8
11#include "logout.h" 9#include "logout.h"
12 10
13 11
14LogoutApplet::LogoutApplet ( ) 12LogoutApplet::LogoutApplet ( )
15 : QObject ( 0, "LogoutApplet" ) 13 : QObject ( 0, "LogoutApplet" )
16{ 14{
17} 15}
18 16
19LogoutApplet::~LogoutApplet ( ) 17LogoutApplet::~LogoutApplet ( )
20{ 18{
21} 19}
22 20
23int LogoutApplet::position ( ) const 21int LogoutApplet::position ( ) const
24{ 22{
25 return 0; 23 return 0;
26} 24}
27 25
28QString LogoutApplet::name ( ) const 26QString LogoutApplet::name ( ) const
29{ 27{
30 return tr( "Logout shortcut" ); 28 return tr( "Logout shortcut" );
31} 29}
32 30
33QString LogoutApplet::text ( ) const 31QString LogoutApplet::text ( ) const
34{ 32{
35 return tr( "Logout" ); 33 return tr( "Logout" );
36} 34}
37 35
38QString LogoutApplet::tr( const char* s ) const 36QString LogoutApplet::tr( const char* s ) const
39{ 37{
40 return qApp->translate( "LogoutApplet", s, 0 ); 38 return qApp->translate( "LogoutApplet", s, 0 );
41} 39}
42 40
43QString LogoutApplet::tr( const char* s, const char* p ) const 41QString LogoutApplet::tr( const char* s, const char* p ) const
44{ 42{
45 return qApp->translate( "LogoutApplet", s, p ); 43 return qApp->translate( "LogoutApplet", s, p );
46} 44}
47 45
48QIconSet LogoutApplet::icon ( ) const 46QIconSet LogoutApplet::icon ( ) const
49{ 47{
50 QPixmap pix; 48 QPixmap pix;
51 QImage img = Resource::loadImage ( "logout" ); 49 QImage img = Resource::loadImage ( "logout" );
52 50
53 if ( !img. isNull ( )) 51 if ( !img. isNull ( ))
54 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 52 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp
index b36ee12..b17498d 100644
--- a/core/applets/multikeyapplet/multikey.cpp
+++ b/core/applets/multikeyapplet/multikey.cpp
@@ -1,76 +1,70 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2004 Anton Kachalov mouse@altlinux.ru 2** Copyright (C) 2004 Anton Kachalov mouse@altlinux.ru
3** All rights reserved. 3** All rights reserved.
4** 4**
5** This file may be distributed and/or modified under the terms of the 5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software 6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the 7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file. 8** packaging of this file.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** 12**
13**********************************************************************/ 13**********************************************************************/
14 14
15#include "multikey.h" 15#include "multikey.h"
16 16
17/* OPIE */ 17/* OPIE */
18#include <opie2/otaskbarapplet.h> 18#include <opie2/otaskbarapplet.h>
19#include <qpe/global.h>
20#include <qpe/config.h>
21#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
22#include <qpe/qpeapplication.h>
23 20
24/* QT */ 21/* QT */
25#include <qlabel.h>
26#include <qdir.h> 22#include <qdir.h>
27#include <qfileinfo.h>
28#include <qcopchannel_qws.h>
29 23
30Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN") 24Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN")
31{ 25{
32 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this); 26 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this);
33 connect( swChannel, SIGNAL(received(const QCString &, const QByteArray &)), 27 connect( swChannel, SIGNAL(received(const QCString &, const QByteArray &)),
34 this, SLOT(message(const QCString &, const QByteArray &))); 28 this, SLOT(message(const QCString &, const QByteArray &)));
35 29
36 setFont( QFont( "Helvetica", 10, QFont::Normal ) ); 30 setFont( QFont( "Helvetica", 10, QFont::Normal ) );
37 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold); 31 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold);
38 lang = 0; 32 lang = 0;
39 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()"); 33 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()");
40 setText("EN"); 34 setText("EN");
41 popupMenu.insertItem("EN", 0); 35 popupMenu.insertItem("EN", 0);
42 show(); 36 show();
43} 37}
44 38
45void Multikey::mousePressEvent(QMouseEvent *ev) 39void Multikey::mousePressEvent(QMouseEvent *ev)
46{ 40{
47 if (!sw_maps.count()) 41 if (!sw_maps.count())
48 return; 42 return;
49 43
50 if (ev->button() == RightButton) { 44 if (ev->button() == RightButton) {
51 45
52 QPoint p = mapToGlobal(QPoint(0, 0)); 46 QPoint p = mapToGlobal(QPoint(0, 0));
53 QSize s = popupMenu.sizeHint(); 47 QSize s = popupMenu.sizeHint();
54 int opt = popupMenu.exec(QPoint(p.x() + (width() / 2) - (s.width() / 2), 48 int opt = popupMenu.exec(QPoint(p.x() + (width() / 2) - (s.width() / 2),
55 p.y() - s.height()), 0); 49 p.y() - s.height()), 0);
56 50
57 if (opt == -1) 51 if (opt == -1)
58 return; 52 return;
59 lang = opt; 53 lang = opt;
60 54
61 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)"); 55 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)");
62 e << sw_maps[lang]; 56 e << sw_maps[lang];
63 setText(labels[lang]); 57 setText(labels[lang]);
64 } 58 }
65 QWidget::mousePressEvent(ev); 59 QWidget::mousePressEvent(ev);
66} 60}
67 61
68void Multikey::mouseReleaseEvent(QMouseEvent *ev) 62void Multikey::mouseReleaseEvent(QMouseEvent *ev)
69{ 63{
70 if (!sw_maps.count()) 64 if (!sw_maps.count())
71 return; 65 return;
72 66
73 lang = lang < sw_maps.count()-1 ? lang+1 : 0; 67 lang = lang < sw_maps.count()-1 ? lang+1 : 0;
74 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)"); 68 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)");
75 //qDebug("Lang=%d, count=%d, lab=%s", lang, sw_maps.count(), labels[lang].ascii()); 69 //qDebug("Lang=%d, count=%d, lab=%s", lang, sw_maps.count(), labels[lang].ascii());
76 e << sw_maps[lang]; 70 e << sw_maps[lang];