summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/lockapplet/lock.cpp7
-rw-r--r--core/applets/lockapplet/lockapplet.pro2
-rw-r--r--core/applets/lockapplet/opie-lockapplet.control2
3 files changed, 4 insertions, 7 deletions
diff --git a/core/applets/lockapplet/lock.cpp b/core/applets/lockapplet/lock.cpp
index 89f27bb..a831b99 100644
--- a/core/applets/lockapplet/lock.cpp
+++ b/core/applets/lockapplet/lock.cpp
@@ -1,84 +1,81 @@
1#include "lock.h" 1#include "lock.h"
2 2
3/* OPIE */ 3/* OPIE */
4#include <opie2/multiauthpassword.h> 4#include <opie2/multiauthpassword.h>
5#include <opie2/oresource.h>
5 6
6#include <qpe/applnk.h> 7#include <qpe/applnk.h>
7#include <qpe/resource.h>
8 8
9/* QT */ 9/* QT */
10#include <qiconset.h> 10#include <qiconset.h>
11#include <qpopupmenu.h> 11#include <qpopupmenu.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13 13
14 14
15LockMenuApplet::LockMenuApplet() 15LockMenuApplet::LockMenuApplet()
16 :QObject( 0, "LockMenuApplet" ) 16 :QObject( 0, "LockMenuApplet" )
17{ 17{
18} 18}
19 19
20LockMenuApplet::~LockMenuApplet ( ) 20LockMenuApplet::~LockMenuApplet ( )
21{} 21{}
22 22
23int LockMenuApplet::position() const 23int LockMenuApplet::position() const
24{ 24{
25 return 3; 25 return 3;
26} 26}
27 27
28QString LockMenuApplet::name() const 28QString LockMenuApplet::name() const
29{ 29{
30 return tr( "Lock shortcut" ); 30 return tr( "Lock shortcut" );
31} 31}
32 32
33QString LockMenuApplet::text() const 33QString LockMenuApplet::text() const
34{ 34{
35 return tr( "Lock" ); 35 return tr( "Lock" );
36} 36}
37 37
38 38
39QIconSet LockMenuApplet::icon() const 39QIconSet LockMenuApplet::icon() const
40{ 40{
41 QPixmap pix; 41 QPixmap pix = Opie::Core::OResource::loadPixmap( "security/lock", Opie::Core::OResource::SmallIcon );
42 QImage img = Resource::loadImage( "security/lock" );
43 if ( !img.isNull() )
44 pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
45 return pix; 42 return pix;
46} 43}
47 44
48QPopupMenu* LockMenuApplet::popup(QWidget*) const 45QPopupMenu* LockMenuApplet::popup(QWidget*) const
49{ 46{
50 /* no subdir */ 47 /* no subdir */
51 return 0; 48 return 0;
52} 49}
53 50
54void LockMenuApplet::activated() 51void LockMenuApplet::activated()
55{ 52{
56 /* 53 /*
57 QMessageBox::information(0,tr("No white rabbit found"), 54 QMessageBox::information(0,tr("No white rabbit found"),
58 tr("<qt>No white rabbit was seen near Opie." 55 tr("<qt>No white rabbit was seen near Opie."
59 "Only the beautiful OpieZilla is available" 56 "Only the beautiful OpieZilla is available"
60 "for your pleassure</qt>")); 57 "for your pleassure</qt>"));
61 */ 58 */
62 Opie::Security::MultiauthPassword::authenticate(Opie::Security::LockNow); 59 Opie::Security::MultiauthPassword::authenticate(Opie::Security::LockNow);
63} 60}
64 61
65 62
66QRESULT LockMenuApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 63QRESULT LockMenuApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
67{ 64{
68 *iface = 0; 65 *iface = 0;
69 if ( uuid == IID_QUnknown ) 66 if ( uuid == IID_QUnknown )
70 *iface = this; 67 *iface = this;
71 else if ( uuid == IID_MenuApplet ) 68 else if ( uuid == IID_MenuApplet )
72 *iface = this; 69 *iface = this;
73 else 70 else
74 return QS_FALSE; 71 return QS_FALSE;
75 72
76 if ( *iface ) 73 if ( *iface )
77 (*iface)->addRef(); 74 (*iface)->addRef();
78 return QS_OK; 75 return QS_OK;
79} 76}
80 77
81Q_EXPORT_INTERFACE() 78Q_EXPORT_INTERFACE()
82{ 79{
83 Q_CREATE_INSTANCE( LockMenuApplet ) 80 Q_CREATE_INSTANCE( LockMenuApplet )
84} 81}
diff --git a/core/applets/lockapplet/lockapplet.pro b/core/applets/lockapplet/lockapplet.pro
index ce4761c..500acba 100644
--- a/core/applets/lockapplet/lockapplet.pro
+++ b/core/applets/lockapplet/lockapplet.pro
@@ -1,12 +1,12 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt plugn warn_on 2CONFIG += qt plugn warn_on
3HEADERS = lock.h 3HEADERS = lock.h
4SOURCES = lock.cpp 4SOURCES = lock.cpp
5TARGET = lockapplet 5TARGET = lockapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe -lopiesecurity2 9LIBS += -lqpe -lopiecore2 -lopiesecurity2
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12include( $(OPIEDIR)/include.pro ) 12include( $(OPIEDIR)/include.pro )
diff --git a/core/applets/lockapplet/opie-lockapplet.control b/core/applets/lockapplet/opie-lockapplet.control
index cf76d69..97194ab 100644
--- a/core/applets/lockapplet/opie-lockapplet.control
+++ b/core/applets/lockapplet/opie-lockapplet.control
@@ -1,11 +1,11 @@
1Package: opie-lockapplet 1Package: opie-lockapplet
2Files: plugins/applets/liblockapplet.so* pics/security/lock.png 2Files: plugins/applets/liblockapplet.so* pics/security/lock.png
3Priority: optional 3Priority: optional
4Section: opie/applets 4Section: opie/applets
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal, opie-security 7Depends: task-opie-minimal, libopiecore2, libopiesecurity2
8Description: Lock Opie now 8Description: Lock Opie now
9 Button to lock Opie (as configured in the Security 9 Button to lock Opie (as configured in the Security
10 settings) on demand. 10 settings) on demand.
11Version: $QPE_VERSION$EXTRAVERSION 11Version: $QPE_VERSION$EXTRAVERSION