summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/opie-login/loginwindow.ui10
-rw-r--r--core/opie-login/loginwindowimpl.cpp13
2 files changed, 15 insertions, 8 deletions
diff --git a/core/opie-login/loginwindow.ui b/core/opie-login/loginwindow.ui
index 245e942..10c7d80 100644
--- a/core/opie-login/loginwindow.ui
+++ b/core/opie-login/loginwindow.ui
@@ -1,38 +1,38 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>LoginWindow</class> 2<class>LoginWindow</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QWidget</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>LoginWindow</cstring> 7 <cstring>LoginWindow</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>460</width> 14 <width>456</width>
15 <height>341</height> 15 <height>341</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Login</string> 20 <string>Login</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>0</number> 31 <number>0</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>0</number> 35 <number>0</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QLayoutWidget</class> 38 <class>QLayoutWidget</class>
@@ -51,55 +51,55 @@
51 <name>margin</name> 51 <name>margin</name>
52 <number>4</number> 52 <number>4</number>
53 </property> 53 </property>
54 <property stdset="1"> 54 <property stdset="1">
55 <name>spacing</name> 55 <name>spacing</name>
56 <number>4</number> 56 <number>4</number>
57 </property> 57 </property>
58 <widget> 58 <widget>
59 <class>QLabel</class> 59 <class>QLabel</class>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>name</name> 61 <name>name</name>
62 <cstring>m_caption</cstring> 62 <cstring>m_caption</cstring>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>sizePolicy</name> 65 <name>sizePolicy</name>
66 <sizepolicy> 66 <sizepolicy>
67 <hsizetype>5</hsizetype> 67 <hsizetype>5</hsizetype>
68 <vsizetype>5</vsizetype> 68 <vsizetype>5</vsizetype>
69 </sizepolicy> 69 </sizepolicy>
70 </property> 70 </property>
71 <property stdset="1"> 71 <property stdset="1">
72 <name>font</name> 72 <name>font</name>
73 <font> 73 <font>
74 <family>helvetica</family> 74 <family>helvetica</family>
75 <pointsize>18</pointsize> 75 <pointsize>36</pointsize>
76 <bold>1</bold> 76 <bold>1</bold>
77 </font> 77 </font>
78 </property> 78 </property>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>autoMask</name> 80 <name>autoMask</name>
81 <bool>true</bool> 81 <bool>false</bool>
82 </property> 82 </property>
83 <property stdset="1"> 83 <property stdset="1">
84 <name>backgroundOrigin</name> 84 <name>backgroundOrigin</name>
85 <enum>ParentOrigin</enum> 85 <enum>ParentOrigin</enum>
86 </property> 86 </property>
87 <property stdset="1"> 87 <property stdset="1">
88 <name>margin</name> 88 <name>margin</name>
89 <number>1</number> 89 <number>1</number>
90 </property> 90 </property>
91 <property stdset="1"> 91 <property stdset="1">
92 <name>text</name> 92 <name>text</name>
93 <string>&lt;center&gt;Welcome to OPIE&lt;/center&gt;</string> 93 <string>&lt;center&gt;Welcome to OPIE&lt;/center&gt;</string>
94 </property> 94 </property>
95 </widget> 95 </widget>
96 <widget> 96 <widget>
97 <class>QLayoutWidget</class> 97 <class>QLayoutWidget</class>
98 <property stdset="1"> 98 <property stdset="1">
99 <name>name</name> 99 <name>name</name>
100 <cstring>Layout6</cstring> 100 <cstring>Layout6</cstring>
101 </property> 101 </property>
102 <property> 102 <property>
103 <name>layoutSpacing</name> 103 <name>layoutSpacing</name>
104 </property> 104 </property>
105 <grid> 105 <grid>
@@ -117,49 +117,49 @@
117 <name>name</name> 117 <name>name</name>
118 <cstring>m_user</cstring> 118 <cstring>m_user</cstring>
119 </property> 119 </property>
120 <property stdset="1"> 120 <property stdset="1">
121 <name>autoMask</name> 121 <name>autoMask</name>
122 <bool>true</bool> 122 <bool>true</bool>
123 </property> 123 </property>
124 <property stdset="1"> 124 <property stdset="1">
125 <name>editable</name> 125 <name>editable</name>
126 <bool>true</bool> 126 <bool>true</bool>
127 </property> 127 </property>
128 <property stdset="1"> 128 <property stdset="1">
129 <name>autoCompletion</name> 129 <name>autoCompletion</name>
130 <bool>true</bool> 130 <bool>true</bool>
131 </property> 131 </property>
132 </widget> 132 </widget>
133 <widget row="0" column="0" > 133 <widget row="0" column="0" >
134 <class>QLabel</class> 134 <class>QLabel</class>
135 <property stdset="1"> 135 <property stdset="1">
136 <name>name</name> 136 <name>name</name>
137 <cstring>TextLabel1</cstring> 137 <cstring>TextLabel1</cstring>
138 </property> 138 </property>
139 <property stdset="1"> 139 <property stdset="1">
140 <name>autoMask</name> 140 <name>autoMask</name>
141 <bool>true</bool> 141 <bool>false</bool>
142 </property> 142 </property>
143 <property stdset="1"> 143 <property stdset="1">
144 <name>backgroundOrigin</name> 144 <name>backgroundOrigin</name>
145 <enum>ParentOrigin</enum> 145 <enum>ParentOrigin</enum>
146 </property> 146 </property>
147 <property stdset="1"> 147 <property stdset="1">
148 <name>text</name> 148 <name>text</name>
149 <string>User</string> 149 <string>User</string>
150 </property> 150 </property>
151 </widget> 151 </widget>
152 <widget row="1" column="1" > 152 <widget row="1" column="1" >
153 <class>QLayoutWidget</class> 153 <class>QLayoutWidget</class>
154 <property stdset="1"> 154 <property stdset="1">
155 <name>name</name> 155 <name>name</name>
156 <cstring>Layout5</cstring> 156 <cstring>Layout5</cstring>
157 </property> 157 </property>
158 <property> 158 <property>
159 <name>layoutSpacing</name> 159 <name>layoutSpacing</name>
160 </property> 160 </property>
161 <hbox> 161 <hbox>
162 <property stdset="1"> 162 <property stdset="1">
163 <name>margin</name> 163 <name>margin</name>
164 <number>0</number> 164 <number>0</number>
165 </property> 165 </property>
@@ -209,49 +209,49 @@
209 <class>QToolButton</class> 209 <class>QToolButton</class>
210 <property stdset="1"> 210 <property stdset="1">
211 <name>name</name> 211 <name>name</name>
212 <cstring>ToolButton1</cstring> 212 <cstring>ToolButton1</cstring>
213 </property> 213 </property>
214 <property stdset="1"> 214 <property stdset="1">
215 <name>text</name> 215 <name>text</name>
216 <string></string> 216 <string></string>
217 </property> 217 </property>
218 <property stdset="1"> 218 <property stdset="1">
219 <name>pixmap</name> 219 <name>pixmap</name>
220 <pixmap>image1</pixmap> 220 <pixmap>image1</pixmap>
221 </property> 221 </property>
222 </widget> 222 </widget>
223 </hbox> 223 </hbox>
224 </widget> 224 </widget>
225 <widget row="1" column="0" > 225 <widget row="1" column="0" >
226 <class>QLabel</class> 226 <class>QLabel</class>
227 <property stdset="1"> 227 <property stdset="1">
228 <name>name</name> 228 <name>name</name>
229 <cstring>TextLabel2</cstring> 229 <cstring>TextLabel2</cstring>
230 </property> 230 </property>
231 <property stdset="1"> 231 <property stdset="1">
232 <name>autoMask</name> 232 <name>autoMask</name>
233 <bool>true</bool> 233 <bool>false</bool>
234 </property> 234 </property>
235 <property stdset="1"> 235 <property stdset="1">
236 <name>backgroundOrigin</name> 236 <name>backgroundOrigin</name>
237 <enum>ParentOrigin</enum> 237 <enum>ParentOrigin</enum>
238 </property> 238 </property>
239 <property stdset="1"> 239 <property stdset="1">
240 <name>text</name> 240 <name>text</name>
241 <string>Password</string> 241 <string>Password</string>
242 </property> 242 </property>
243 </widget> 243 </widget>
244 </grid> 244 </grid>
245 </widget> 245 </widget>
246 <widget> 246 <widget>
247 <class>Line</class> 247 <class>Line</class>
248 <property stdset="1"> 248 <property stdset="1">
249 <name>name</name> 249 <name>name</name>
250 <cstring>Line1</cstring> 250 <cstring>Line1</cstring>
251 </property> 251 </property>
252 <property stdset="1"> 252 <property stdset="1">
253 <name>orientation</name> 253 <name>orientation</name>
254 <enum>Horizontal</enum> 254 <enum>Horizontal</enum>
255 </property> 255 </property>
256 </widget> 256 </widget>
257 <widget> 257 <widget>
diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp
index 577cb41..330fac5 100644
--- a/core/opie-login/loginwindowimpl.cpp
+++ b/core/opie-login/loginwindowimpl.cpp
@@ -3,49 +3,49 @@
3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This file is free software; you can 5 _;:,     .>    :=|. This file is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27#include <qpe/version.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qlayout.h> 30#include <qlayout.h>
31#include <qframe.h> 31#include <qframe.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qtimer.h> 33#include <qtimer.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qpixmap.h> 35#include <qpixmap.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qpopupmenu.h> 37#include <qpopupmenu.h>
38#include <qmessagebox.h> 38#include <qmessagebox.h>
39#include <qimage.h> 39#include <qimage.h>
40#if QT_VERSION < 300 40#if QT_VERSION < 300
41#include <qgfx_qws.h> 41#include <qgfx_qws.h>
42#endif 42#endif
43#include <qwindowsystem_qws.h> 43#include <qwindowsystem_qws.h>
44 44
45#include <qpe/resource.h> 45#include <qpe/resource.h>
46#include <qpe/qcopenvelope_qws.h> 46#include <qpe/qcopenvelope_qws.h>
47#include <qpe/config.h> 47#include <qpe/config.h>
48 48
49#include <opie/odevice.h> 49#include <opie/odevice.h>
50 50
51#include <stdio.h> 51#include <stdio.h>
@@ -58,57 +58,64 @@
58using namespace Opie; 58using namespace Opie;
59 59
60 60
61LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose ) 61LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose )
62{ 62{
63 QPopupMenu *pop = new QPopupMenu ( this ); 63 QPopupMenu *pop = new QPopupMenu ( this );
64 pop-> insertItem ( tr( "Restart" ), this, SLOT( restart ( ))); 64 pop-> insertItem ( tr( "Restart" ), this, SLOT( restart ( )));
65 pop-> insertItem ( tr( "Quit" ), this, SLOT( quit ( ))); 65 pop-> insertItem ( tr( "Quit" ), this, SLOT( quit ( )));
66 m_menu-> setPopup ( pop ); 66 m_menu-> setPopup ( pop );
67 67
68 QCopChannel *channel = new QCopChannel ( "QPE/TaskBar", this ); 68 QCopChannel *channel = new QCopChannel ( "QPE/TaskBar", this );
69 connect ( channel, SIGNAL( received ( const QCString &, const QByteArray & )), this, SLOT( receive ( const QCString &, const QByteArray & ))); 69 connect ( channel, SIGNAL( received ( const QCString &, const QByteArray & )), this, SLOT( receive ( const QCString &, const QByteArray & )));
70 70
71 QHBoxLayout *lay = new QHBoxLayout ( m_taskbar, 4, 4 ); 71 QHBoxLayout *lay = new QHBoxLayout ( m_taskbar, 4, 4 );
72 m_input = new InputMethods ( m_taskbar ); 72 m_input = new InputMethods ( m_taskbar );
73 connect ( m_input, SIGNAL( inputToggled ( bool )), this, SLOT( calcMaxWindowRect ( ))); 73 connect ( m_input, SIGNAL( inputToggled ( bool )), this, SLOT( calcMaxWindowRect ( )));
74 lay-> addWidget ( m_input ); 74 lay-> addWidget ( m_input );
75 lay-> addStretch ( 10 ); 75 lay-> addStretch ( 10 );
76 76
77 setActiveWindow ( ); 77 setActiveWindow ( );
78 m_password-> setFocus ( ); 78 m_password-> setFocus ( );
79 79
80 m_user-> insertStringList ( lApp-> allUsers ( )); 80 m_user-> insertStringList ( lApp-> allUsers ( ));
81 81
82 //there is no point in displaying the IM for a zaurus
83 if (ODevice::inst ( )-> series ( ) != Model_Zaurus){
82 QTimer::singleShot ( 0, this, SLOT( showIM ( ))); 84 QTimer::singleShot ( 0, this, SLOT( showIM ( )));
85 }
83 86
84 QString opiedir = ::getenv ( "OPIEDIR" ); 87 QString opiedir = ::getenv ( "OPIEDIR" );
85 QPixmap bgpix ( opiedir + "/pics/launcher/opie-background.jpg" ); 88 QPixmap bgpix ( opiedir + "/pics/launcher/opie-background.jpg" );
86 89
87 if ( !bgpix. isNull ( )) 90 if ( !bgpix. isNull ( )) {
88 setBackgroundPixmap ( bgpix ); 91 setBackgroundPixmap ( bgpix );
92 m_caption-> setBackgroundPixmap ( bgpix);
93 TextLabel1-> setBackgroundPixmap ( bgpix);
94 TextLabel2-> setBackgroundPixmap ( bgpix);
95 }
89 96
90 m_caption-> setText ( m_caption-> text ( ) + tr( "<center>%1 %2</center>" ). arg ( ODevice::inst ( )-> systemString ( )). arg ( ODevice::inst ( )-> systemVersionString ( ))); 97 m_caption-> setText ( tr("<center>Welcome to OPIE %1</center><center>& %2 %3</center>"). arg(QPE_VERSION). arg ( ODevice::inst ( )-> systemString ( )). arg ( ODevice::inst ( )-> systemVersionString ( )));
91 98
92 Config cfg ( "opie-login" ); 99 Config cfg ( "opie-login" );
93 cfg. setGroup ( "General" ); 100 cfg. setGroup ( "General" );
94 QString last = cfg. readEntry ( "LastLogin" ); 101 QString last = cfg. readEntry ( "LastLogin" );
95 102
96 if ( !last. isEmpty ( )) 103 if ( !last. isEmpty ( ))
97 m_user-> setEditText ( last ); 104 m_user-> setEditText ( last );
98 105
99 calcMaxWindowRect ( ); 106 calcMaxWindowRect ( );
100} 107}
101 108
102LoginWindowImpl::~LoginWindowImpl ( ) 109LoginWindowImpl::~LoginWindowImpl ( )
103{ 110{
104} 111}
105 112
106 113
107void LoginWindowImpl::receive ( const QCString &msg, const QByteArray &data ) 114void LoginWindowImpl::receive ( const QCString &msg, const QByteArray &data )
108{ 115{
109 QDataStream stream ( data, IO_ReadOnly ); 116 QDataStream stream ( data, IO_ReadOnly );
110 117
111 if ( msg == "hideInputMethod()" ) 118 if ( msg == "hideInputMethod()" )
112 m_input-> hideInputMethod ( ); 119 m_input-> hideInputMethod ( );
113 else if ( msg == "showInputMethod()" ) 120 else if ( msg == "showInputMethod()" )
114 m_input-> showInputMethod ( ); 121 m_input-> showInputMethod ( );