summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/homeapplet/home.cpp9
-rw-r--r--core/applets/homeapplet/homeapplet.pro2
2 files changed, 4 insertions, 7 deletions
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp
index 02d1265..5a917ff 100644
--- a/core/applets/homeapplet/home.cpp
+++ b/core/applets/homeapplet/home.cpp
@@ -1,20 +1,21 @@
1#include "home.h" 1#include "home.h"
2 2
3#include <opie2/oresource.h>
4
3#include <qpe/applnk.h> 5#include <qpe/applnk.h>
4#include <qpe/resource.h>
5#include <qpe/qcopenvelope_qws.h> 6#include <qpe/qcopenvelope_qws.h>
6 7
7#include <qapplication.h> 8#include <qapplication.h>
8 9
9HomeApplet::HomeApplet ( ) 10HomeApplet::HomeApplet ( )
10 : QObject ( 0, "HomeApplet" ) 11 : QObject ( 0, "HomeApplet" )
11{ 12{
12} 13}
13 14
14HomeApplet::~HomeApplet ( ) 15HomeApplet::~HomeApplet ( )
15{ 16{
16} 17}
17 18
18int HomeApplet::position ( ) const 19int HomeApplet::position ( ) const
19{ 20{
20 return 4; 21 return 4;
@@ -29,37 +30,33 @@ QString HomeApplet::text ( ) const
29{ 30{
30 return tr( "Desktop" ); 31 return tr( "Desktop" );
31} 32}
32 33
33QString HomeApplet::tr( const char* s ) const 34QString HomeApplet::tr( const char* s ) const
34{ 35{
35 return qApp->translate( "HomeApplet", s, 0 ); 36 return qApp->translate( "HomeApplet", s, 0 );
36} 37}
37 38
38QString HomeApplet::tr( const char* s, const char* p ) const 39QString HomeApplet::tr( const char* s, const char* p ) const
39{ 40{
40 return qApp->translate( "HomeApplet", s, p ); 41 return qApp->translate( "HomeApplet", s, p );
41} 42}
42 43
43QIconSet HomeApplet::icon ( ) const 44QIconSet HomeApplet::icon ( ) const
44{ 45{
45 QPixmap pix; 46 QPixmap pix = Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon );
46 QImage img = Resource::loadImage ( "home" );
47
48 if ( !img. isNull ( ))
49 pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
50 return pix; 47 return pix;
51} 48}
52 49
53QPopupMenu *HomeApplet::popup ( QWidget * ) const 50QPopupMenu *HomeApplet::popup ( QWidget * ) const
54{ 51{
55 return 0; 52 return 0;
56} 53}
57 54
58void HomeApplet::activated ( ) 55void HomeApplet::activated ( )
59{ 56{
60 // to desktop (home) 57 // to desktop (home)
61 QCopEnvelope ( "QPE/Application/qpe", "raise()" ); 58 QCopEnvelope ( "QPE/Application/qpe", "raise()" );
62} 59}
63 60
64 61
65QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 62QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
diff --git a/core/applets/homeapplet/homeapplet.pro b/core/applets/homeapplet/homeapplet.pro
index a8db61f..e21e80f 100644
--- a/core/applets/homeapplet/homeapplet.pro
+++ b/core/applets/homeapplet/homeapplet.pro
@@ -1,13 +1,13 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt plugin warn_on 2CONFIG += qt plugin warn_on
3HEADERS = home.h 3HEADERS = home.h
4SOURCES = home.cpp 4SOURCES = home.cpp
5TARGET = homeapplet 5TARGET = homeapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe -lopiecore2
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12include( $(OPIEDIR)/include.pro ) 12include( $(OPIEDIR)/include.pro )
13target.path = $$prefix/plugins/applets 13target.path = $$prefix/plugins/applets