summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-13 16:15:30 (UTC)
committer sandman <sandman>2002-10-13 16:15:30 (UTC)
commit93133ba6cc82398012c8f7206a7e9a270a04edc6 (patch) (unidiff)
treef2af0d8b8d456077a9e91289290d4c19d120ae90
parent467451d6d19a2cf5245afa2d219b7d2b1cd008f5 (diff)
downloadopie-93133ba6cc82398012c8f7206a7e9a270a04edc6.zip
opie-93133ba6cc82398012c8f7206a7e9a270a04edc6.tar.gz
opie-93133ba6cc82398012c8f7206a7e9a270a04edc6.tar.bz2
changed to reflect the qcop interface cleanup of the launcher
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/homeapplet/home.cpp2
-rw-r--r--core/applets/suspendapplet/suspend.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp
index 3670e6d..0d4ad66 100644
--- a/core/applets/homeapplet/home.cpp
+++ b/core/applets/homeapplet/home.cpp
@@ -1,74 +1,74 @@
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 <qiconset.h> 4#include <qiconset.h>
5#include <qpopupmenu.h> 5#include <qpopupmenu.h>
6 6
7#include "home.h" 7#include "home.h"
8 8
9 9
10HomeApplet::HomeApplet ( ) 10HomeApplet::HomeApplet ( )
11 : QObject ( 0, "HomeApplet" ), ref ( 0 ) 11 : QObject ( 0, "HomeApplet" ), ref ( 0 )
12{ 12{
13} 13}
14 14
15HomeApplet::~HomeApplet ( ) 15HomeApplet::~HomeApplet ( )
16{ 16{
17} 17}
18 18
19int HomeApplet::position ( ) const 19int HomeApplet::position ( ) const
20{ 20{
21 return 4; 21 return 4;
22} 22}
23 23
24QString HomeApplet::name ( ) const 24QString HomeApplet::name ( ) const
25{ 25{
26 return tr( "Home shortcut" ); 26 return tr( "Home shortcut" );
27} 27}
28 28
29QString HomeApplet::text ( ) const 29QString HomeApplet::text ( ) const
30{ 30{
31 return tr( "Home" ); 31 return tr( "Home" );
32} 32}
33 33
34QIconSet HomeApplet::icon ( ) const 34QIconSet HomeApplet::icon ( ) const
35{ 35{
36 QPixmap pix; 36 QPixmap pix;
37 QImage img = Resource::loadImage ( "home" ); 37 QImage img = Resource::loadImage ( "home" );
38 38
39 if ( !img. isNull ( )) 39 if ( !img. isNull ( ))
40 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 40 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
41 return pix; 41 return pix;
42} 42}
43 43
44QPopupMenu *HomeApplet::popup ( QWidget * ) const 44QPopupMenu *HomeApplet::popup ( QWidget * ) const
45{ 45{
46 return 0; 46 return 0;
47} 47}
48 48
49void HomeApplet::activated ( ) 49void HomeApplet::activated ( )
50{ 50{
51 // to desktop (home) 51 // to desktop (home)
52 QCopEnvelope ( "QPE/Desktop", "home()" ); 52 QCopEnvelope ( "QPE/Application/qpe", "raise()" );
53} 53}
54 54
55 55
56QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 56QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
57{ 57{
58 *iface = 0; 58 *iface = 0;
59 if ( uuid == IID_QUnknown ) 59 if ( uuid == IID_QUnknown )
60 *iface = this; 60 *iface = this;
61 else if ( uuid == IID_MenuApplet ) 61 else if ( uuid == IID_MenuApplet )
62 *iface = this; 62 *iface = this;
63 63
64 if ( *iface ) 64 if ( *iface )
65 (*iface)-> addRef ( ); 65 (*iface)-> addRef ( );
66 return QS_OK; 66 return QS_OK;
67} 67}
68 68
69Q_EXPORT_INTERFACE( ) 69Q_EXPORT_INTERFACE( )
70{ 70{
71 Q_CREATE_INSTANCE( HomeApplet ) 71 Q_CREATE_INSTANCE( HomeApplet )
72} 72}
73 73
74 74
diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp
index e9861e8..b502e87 100644
--- a/core/applets/suspendapplet/suspend.cpp
+++ b/core/applets/suspendapplet/suspend.cpp
@@ -1,74 +1,74 @@
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 <qiconset.h> 4#include <qiconset.h>
5#include <qpopupmenu.h> 5#include <qpopupmenu.h>
6 6
7#include "suspend.h" 7#include "suspend.h"
8 8
9 9
10SuspendApplet::SuspendApplet ( ) 10SuspendApplet::SuspendApplet ( )
11 : QObject ( 0, "SuspendApplet" ), ref ( 0 ) 11 : QObject ( 0, "SuspendApplet" ), ref ( 0 )
12{ 12{
13} 13}
14 14
15SuspendApplet::~SuspendApplet ( ) 15SuspendApplet::~SuspendApplet ( )
16{ 16{
17} 17}
18 18
19int SuspendApplet::position ( ) const 19int SuspendApplet::position ( ) const
20{ 20{
21 return 2; 21 return 2;
22} 22}
23 23
24QString SuspendApplet::name ( ) const 24QString SuspendApplet::name ( ) const
25{ 25{
26 return tr( "Suspend shortcut" ); 26 return tr( "Suspend shortcut" );
27} 27}
28 28
29QString SuspendApplet::text ( ) const 29QString SuspendApplet::text ( ) const
30{ 30{
31 return tr( "Suspend" ); 31 return tr( "Suspend" );
32} 32}
33 33
34QIconSet SuspendApplet::icon ( ) const 34QIconSet SuspendApplet::icon ( ) const
35{ 35{
36 QPixmap pix; 36 QPixmap pix;
37 QImage img = Resource::loadImage ( "suspend" ); 37 QImage img = Resource::loadImage ( "suspend" );
38 38
39 if ( !img. isNull ( )) 39 if ( !img. isNull ( ))
40 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 40 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
41 return pix; 41 return pix;
42} 42}
43 43
44QPopupMenu *SuspendApplet::popup ( QWidget * ) const 44QPopupMenu *SuspendApplet::popup ( QWidget * ) const
45{ 45{
46 return 0; 46 return 0;
47} 47}
48 48
49void SuspendApplet::activated ( ) 49void SuspendApplet::activated ( )
50{ 50{
51 // suspend 51 // suspend
52 QCopEnvelope ( "QPE/Desktop", "suspend()" ); 52 QCopEnvelope ( "QPE/System", "suspend()" );
53} 53}
54 54
55 55
56QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 56QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
57{ 57{
58 *iface = 0; 58 *iface = 0;
59 if ( uuid == IID_QUnknown ) 59 if ( uuid == IID_QUnknown )
60 *iface = this; 60 *iface = this;
61 else if ( uuid == IID_MenuApplet ) 61 else if ( uuid == IID_MenuApplet )
62 *iface = this; 62 *iface = this;
63 63
64 if ( *iface ) 64 if ( *iface )
65 (*iface)-> addRef ( ); 65 (*iface)-> addRef ( );
66 return QS_OK; 66 return QS_OK;
67} 67}
68 68
69Q_EXPORT_INTERFACE( ) 69Q_EXPORT_INTERFACE( )
70{ 70{
71 Q_CREATE_INSTANCE( SuspendApplet ) 71 Q_CREATE_INSTANCE( SuspendApplet )
72} 72}
73 73
74 74