Diffstat (limited to 'core/applets/logoutapplet/logout.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/logoutapplet/logout.cpp | 9 |
1 files changed, 3 insertions, 6 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 | ||