-rw-r--r-- | core/applets/logoutapplet/logout.cpp | 9 | ||||
-rw-r--r-- | core/applets/logoutapplet/logoutapplet.pro | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp index 0f36f16..dc0c67c 100644 --- a/core/applets/logoutapplet/logout.cpp +++ b/core/applets/logoutapplet/logout.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | #include "logout.h" | 1 | #include "logout.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 | #include <qmessagebox.h> | 9 | #include <qmessagebox.h> |
9 | 10 | ||
10 | #include <unistd.h> | 11 | #include <unistd.h> |
11 | 12 | ||
12 | LogoutApplet::LogoutApplet ( ) | 13 | LogoutApplet::LogoutApplet ( ) |
13 | : QObject ( 0, "LogoutApplet" ) | 14 | : QObject ( 0, "LogoutApplet" ) |
14 | { | 15 | { |
15 | } | 16 | } |
16 | 17 | ||
@@ -36,29 +37,25 @@ QString LogoutApplet::text ( ) const | |||
36 | QString LogoutApplet::tr( const char* s ) const | 37 | QString LogoutApplet::tr( const char* s ) const |
37 | { | 38 | { |
38 | return qApp->translate( "LogoutApplet", s, 0 ); | 39 | return qApp->translate( "LogoutApplet", s, 0 ); |
39 | } | 40 | } |
40 | 41 | ||
41 | QString LogoutApplet::tr( const char* s, const char* p ) const | 42 | QString LogoutApplet::tr( const char* s, const char* p ) const |
42 | { | 43 | { |
43 | return qApp->translate( "LogoutApplet", s, p ); | 44 | return qApp->translate( "LogoutApplet", s, p ); |
44 | } | 45 | } |
45 | 46 | ||
46 | QIconSet LogoutApplet::icon ( ) const | 47 | QIconSet LogoutApplet::icon ( ) const |
47 | { | 48 | { |
48 | QPixmap pix; | 49 | QPixmap pix = Opie::Core::OResource::loadPixmap("logout", Opie::Core::OResource::SmallIcon ); |
49 | QImage img = Resource::loadImage ( "logout" ); | ||
50 | |||
51 | if ( !img. isNull ( )) | ||
52 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
53 | return pix; | 50 | return pix; |
54 | } | 51 | } |
55 | 52 | ||
56 | QPopupMenu *LogoutApplet::popup ( QWidget * ) const | 53 | QPopupMenu *LogoutApplet::popup ( QWidget * ) const |
57 | { | 54 | { |
58 | return 0; | 55 | return 0; |
59 | } | 56 | } |
60 | 57 | ||
61 | // This is a workaround for a Qt bug | 58 | // This is a workaround for a Qt bug |
62 | // clipboard applet has to stop its poll timer, or Qt/E | 59 | // clipboard applet has to stop its poll timer, or Qt/E |
63 | // will hang on quit() right before it emits aboutToQuit() | 60 | // will hang on quit() right before it emits aboutToQuit() |
64 | 61 | ||
diff --git a/core/applets/logoutapplet/logoutapplet.pro b/core/applets/logoutapplet/logoutapplet.pro index 23cab02..5bb1571 100644 --- a/core/applets/logoutapplet/logoutapplet.pro +++ b/core/applets/logoutapplet/logoutapplet.pro | |||
@@ -1,13 +1,13 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt plugin warn_on | 2 | CONFIG += qt plugin warn_on |
3 | HEADERS = logout.h | 3 | HEADERS = logout.h |
4 | SOURCES = logout.cpp | 4 | SOURCES = logout.cpp |
5 | TARGET = logoutapplet | 5 | TARGET = logoutapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe -lopiecore2 |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | include( $(OPIEDIR)/include.pro ) | 12 | include( $(OPIEDIR)/include.pro ) |
13 | target.path = $$prefix/plugins/applets | 13 | target.path = $$prefix/plugins/applets |