-rw-r--r-- | core/applets/aboutapplet/about.cpp | 9 | ||||
-rw-r--r-- | core/applets/aboutapplet/aboutapplet.pro | 2 | ||||
-rw-r--r-- | core/applets/aboutapplet/opie-aboutapplet.control | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/core/applets/aboutapplet/about.cpp b/core/applets/aboutapplet/about.cpp index ec214f3..accfdd6 100644 --- a/core/applets/aboutapplet/about.cpp +++ b/core/applets/aboutapplet/about.cpp | |||
@@ -1,75 +1,72 @@ | |||
1 | #include "about.h" | 1 | #include "about.h" |
2 | #include "widget.h" | 2 | #include "widget.h" |
3 | 3 | ||
4 | #include <opie2/oresource.h> | ||
5 | |||
4 | #include <qpe/applnk.h> | 6 | #include <qpe/applnk.h> |
5 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
6 | #include <qpe/resource.h> | ||
7 | #include <qpe/qcopenvelope_qws.h> | 8 | #include <qpe/qcopenvelope_qws.h> |
8 | 9 | ||
9 | #include <qlabel.h> | 10 | #include <qlabel.h> |
10 | 11 | ||
11 | AboutApplet::AboutApplet ( ) | 12 | AboutApplet::AboutApplet ( ) |
12 | : QObject ( 0, "AboutApplet" ), m_ad( 0l ) | 13 | : QObject ( 0, "AboutApplet" ), m_ad( 0l ) |
13 | {} | 14 | {} |
14 | 15 | ||
15 | AboutApplet::~AboutApplet ( ) | 16 | AboutApplet::~AboutApplet ( ) |
16 | { | 17 | { |
17 | delete m_ad; | 18 | delete m_ad; |
18 | } | 19 | } |
19 | 20 | ||
20 | int AboutApplet::position ( ) const | 21 | int AboutApplet::position ( ) const |
21 | { | 22 | { |
22 | return 1; | 23 | return 1; |
23 | } | 24 | } |
24 | 25 | ||
25 | QString AboutApplet::name ( ) const | 26 | QString AboutApplet::name ( ) const |
26 | { | 27 | { |
27 | return tr( "About shortcut" ); | 28 | return tr( "About shortcut" ); |
28 | } | 29 | } |
29 | 30 | ||
30 | QString AboutApplet::text ( ) const | 31 | QString AboutApplet::text ( ) const |
31 | { | 32 | { |
32 | return tr( "About" ); | 33 | return tr( "About" ); |
33 | } | 34 | } |
34 | 35 | ||
35 | QString AboutApplet::tr( const char* s ) const | 36 | QString AboutApplet::tr( const char* s ) const |
36 | { | 37 | { |
37 | return qApp->translate( "AboutApplet", s, 0 ); | 38 | return qApp->translate( "AboutApplet", s, 0 ); |
38 | } | 39 | } |
39 | 40 | ||
40 | QString AboutApplet::tr( const char* s, const char* p ) const | 41 | QString AboutApplet::tr( const char* s, const char* p ) const |
41 | { | 42 | { |
42 | return qApp->translate( "AboutApplet", s, p ); | 43 | return qApp->translate( "AboutApplet", s, p ); |
43 | } | 44 | } |
44 | 45 | ||
45 | QIconSet AboutApplet::icon() const | 46 | QIconSet AboutApplet::icon() const |
46 | { | 47 | { |
47 | QPixmap pix; | 48 | QPixmap pix = Opie::Core::OResource::loadPixmap ( "logo/opielogo", Opie::Core::OResource::SmallIcon ); |
48 | QImage img = Resource::loadImage ( "logo/opielogo" ); | ||
49 | |||
50 | if ( !img.isNull() ) | ||
51 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
52 | return pix; | 49 | return pix; |
53 | } | 50 | } |
54 | 51 | ||
55 | QPopupMenu *AboutApplet::popup ( QWidget * ) const | 52 | QPopupMenu *AboutApplet::popup ( QWidget * ) const |
56 | { | 53 | { |
57 | return 0; | 54 | return 0; |
58 | } | 55 | } |
59 | 56 | ||
60 | void AboutApplet::activated() | 57 | void AboutApplet::activated() |
61 | { | 58 | { |
62 | if ( !m_ad ) | 59 | if ( !m_ad ) |
63 | m_ad = new AboutWidget( 0, "aboutDialog" ); | 60 | m_ad = new AboutWidget( 0, "aboutDialog" ); |
64 | 61 | ||
65 | QPEApplication::showWidget( m_ad ); | 62 | QPEApplication::showWidget( m_ad ); |
66 | } | 63 | } |
67 | 64 | ||
68 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 65 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
69 | { | 66 | { |
70 | *iface = 0; | 67 | *iface = 0; |
71 | if ( uuid == IID_QUnknown ) | 68 | if ( uuid == IID_QUnknown ) |
72 | * iface = this; | 69 | * iface = this; |
73 | else if ( uuid == IID_MenuApplet ) | 70 | else if ( uuid == IID_MenuApplet ) |
74 | * iface = this; | 71 | * iface = this; |
75 | else | 72 | else |
diff --git a/core/applets/aboutapplet/aboutapplet.pro b/core/applets/aboutapplet/aboutapplet.pro index f12f7fd..c2841c4 100644 --- a/core/applets/aboutapplet/aboutapplet.pro +++ b/core/applets/aboutapplet/aboutapplet.pro | |||
@@ -1,14 +1,14 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt plugin warn_on | 2 | CONFIG += qt plugin warn_on |
3 | HEADERS = about.h | 3 | HEADERS = about.h |
4 | SOURCES = about.cpp | 4 | SOURCES = about.cpp |
5 | INTERFACES = widget.ui | 5 | INTERFACES = widget.ui |
6 | TARGET = aboutapplet | 6 | TARGET = aboutapplet |
7 | DESTDIR = $(OPIEDIR)/plugins/applets | 7 | DESTDIR = $(OPIEDIR)/plugins/applets |
8 | INCLUDEPATH += $(OPIEDIR)/include | 8 | INCLUDEPATH += $(OPIEDIR)/include |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe -lopiecore2 |
11 | VERSION = 1.0.0 | 11 | VERSION = 1.0.0 |
12 | 12 | ||
13 | include( $(OPIEDIR)/include.pro ) | 13 | include( $(OPIEDIR)/include.pro ) |
14 | target.path = $$prefix/plugins/applets | 14 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/aboutapplet/opie-aboutapplet.control b/core/applets/aboutapplet/opie-aboutapplet.control index 9d85de4..11fe300 100644 --- a/core/applets/aboutapplet/opie-aboutapplet.control +++ b/core/applets/aboutapplet/opie-aboutapplet.control | |||
@@ -1,11 +1,11 @@ | |||
1 | Package: opie-aboutapplet | 1 | Package: opie-aboutapplet |
2 | Files: plugins/applets/libaboutapplet.so* | 2 | Files: plugins/applets/libaboutapplet.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applets | 4 | Section: opie/applets |
5 | Maintainer: Opie Team <opie@handhelds.org> | 5 | Maintainer: Opie Team <opie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal | 7 | Depends: task-opie-minimal, libopiecore2 |
8 | Conflicts: opie-aboutapplet-ipaq | 8 | Conflicts: opie-aboutapplet-ipaq |
9 | Description: About Opie | 9 | Description: About Opie |
10 | About box for Opie | 10 | About box for Opie |
11 | Version: $QPE_VERSION$EXTRAVERSION | 11 | Version: $QPE_VERSION$EXTRAVERSION |