summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp100
-rw-r--r--core/settings/security/security.h7
-rw-r--r--core/settings/security/securitybase.ui202
3 files changed, 228 insertions, 81 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 1b90121..d7871b3 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -1,351 +1,439 @@
1/********************************************************************** 1/**********************************************************************
2 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 2 ** Copyright (C) 2000 Trolltech AS. All rights reserved.
3 ** 3 **
4 ** This file is part of Qtopia Environment. 4 ** This file is part of Qtopia Environment.
5 ** 5 **
6 ** This file may be distributed and/or modified under the terms of the 6 ** This file may be distributed and/or modified under the terms of the
7 ** GNU General Public License version 2 as published by the Free Software 7 ** GNU General Public License version 2 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.GPL included in the 8 ** Foundation and appearing in the file LICENSE.GPL included in the
9 ** packaging of this file. 9 ** packaging of this file.
10 ** 10 **
11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 ** 13 **
14 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 14 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
15 ** 15 **
16 ** Contact info@trolltech.com if any conditions of this licensing are 16 ** Contact info@trolltech.com if any conditions of this licensing are
17 ** not clear to you. 17 ** not clear to you.
18 ** 18 **
19 **********************************************************************/ 19 **********************************************************************/
20#include "security.h" 20#include "security.h"
21 21
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/password.h> 24#include <qpe/password.h>
25#include <qpe/qpedialog.h> 25#include <qpe/qpedialog.h>
26#include <qpe/qcopenvelope_qws.h> 26#include <qpe/qcopenvelope_qws.h>
27 27
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qlistview.h> 33#include <qlistview.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35 35
36 Security::Security( QWidget* parent, const char* name, WFlags fl ) 36 Security::Security( QWidget* parent, const char* name, WFlags fl )
37: SecurityBase( parent, name, TRUE, fl ) 37: SecurityBase( parent, name, TRUE, WStyle_ContextHelp )
38{ 38{
39 valid=FALSE; 39 valid=FALSE;
40 Config cfg("Security"); 40 Config cfg("Security");
41 cfg.setGroup("Passcode"); 41 cfg.setGroup("Passcode");
42 passcode = cfg.readEntry("passcode"); 42 passcode = cfg.readEntry("passcode");
43 passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); 43 passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE));
44 cfg.setGroup("Sync"); 44 cfg.setGroup("Sync");
45 int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 45 int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24
46 int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); 46 int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24);
47 selectNet(auth_peer,auth_peer_bits); 47 selectNet(auth_peer,auth_peer_bits,TRUE);
48
48 connect(syncnet, SIGNAL(textChanged(const QString&)), 49 connect(syncnet, SIGNAL(textChanged(const QString&)),
49 this, SLOT(setSyncNet(const QString&))); 50 this, SLOT(setSyncNet(const QString&)));
50 51
51 cfg.setGroup("Sync"); 52 cfg.setGroup("Sync");
52 QString sa = cfg.readEntry("syncapp","Qtopia"); 53 QString sa = cfg.readEntry("syncapp","Qtopia");
53 54
54 //There must be a better way to do that...
55 for (int i=0; i<syncapp->count(); i++) { 55 for (int i=0; i<syncapp->count(); i++) {
56 if ( syncapp->text(i) == sa ) { 56 if ( syncapp->text(i) == sa ) {
57 syncapp->setCurrentItem(i); 57 syncapp->setCurrentItem(i);
58 } 58 }
59 } 59 }
60 60
61 /* 61 /*
62 cfg.setGroup("Remote"); 62 cfg.setGroup("Remote");
63 if ( telnetAvailable() ) 63 if ( telnetAvailable() )
64 telnet->setChecked(cfg.readEntry("allow_telnet")); 64 telnet->setChecked(cfg.readEntry("allow_telnet"));
65 else 65 else
66 telnet->hide(); 66 telnet->hide();
67 67
68 if ( sshAvailable() ) 68 if ( sshAvailable() )
69 ssh->setChecked(cfg.readEntry("allow_ssh")); 69 ssh->setChecked(cfg.readEntry("allow_ssh"));
70 else 70 else
71 ssh->hide(); 71 ssh->hide();
72 */ 72 */
73 73
74 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 74 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
75 Config loginCfg(configFile,Config::File); 75 Config loginCfg(configFile,Config::File);
76 76
77 loginCfg.setGroup("General"); 77 loginCfg.setGroup("General");
78 autoLoginName=loginCfg.readEntry("AutoLogin",""); 78 autoLoginName=loginCfg.readEntry("AutoLogin","");
79 79
80 if (autoLoginName.stripWhiteSpace().isEmpty()) { 80 if (autoLoginName.stripWhiteSpace().isEmpty()) {
81 autoLogin=false; 81 autoLogin=false;
82 } else { 82 } else {
83 autoLogin=true; 83 autoLogin=true;
84 } 84 }
85 85
86 cfg.setGroup("SyncMode"); 86 cfg.setGroup("SyncMode");
87 int mode = cfg.readNumEntry("Mode",2); // Default to Sharp 87 int mode = cfg.readNumEntry("Mode",2); // Default to Sharp
88 syncModeCombo->setCurrentItem( mode - 1 ); 88 syncModeCombo->setCurrentItem( mode - 1 );
89
90 //since nobody knows what this is and it doesn't do anything, i'll hide it # CoreDump
91 // is this work-in-progress or can it be removed?
92 syncModeCombo->hide();
89 93
90 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 94 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
91 connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); 95 connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
92 connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); 96 connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode()));
93 connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); 97 connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode()));
94 connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp())); 98 connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp()));
99 connect(restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
100 connect(deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
95 101
96 loadUsers(); 102 loadUsers();
97 updateGUI(); 103 updateGUI();
98 104
99 dl = new QPEDialogListener(this); 105 dl = new QPEDialogListener(this);
100 showMaximized(); 106 showMaximized();
101} 107}
102 108
103Security::~Security() 109Security::~Security()
104{ 110{
105} 111}
106 112
113void Security::deleteListEntry()
114{
115 syncnet->removeItem(syncnet->currentItem());
116}
117
118void Security::restoreDefaults()
119 {
120 QMessageBox unrecbox(
121 tr("Attention"),
122 tr("<p>All user-defined net ranges will be lost."),
123 QMessageBox::Warning,
124 QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton,
125 0, QString::null, TRUE, WStyle_StaysOnTop);
126 unrecbox.setButtonText(QMessageBox::Cancel, tr("Cancel"));
127 unrecbox.setButtonText(QMessageBox::Yes, tr("Ok"));
128
129 if ( unrecbox.exec() == QMessageBox::Yes)
130 {
131 syncnet->clear();
132 insertDefaultRanges();
133 }
134}
135
136void Security::insertDefaultRanges()
137{
138 syncnet->insertItem( tr( "192.168.129.0/24" ) );
139 syncnet->insertItem( tr( "192.168.1.0/24" ) );
140 syncnet->insertItem( tr( "192.168.0.0/16" ) );
141 syncnet->insertItem( tr( "172.16.0.0/12" ) );
142 syncnet->insertItem( tr( "10.0.0.0/8" ) );
143 syncnet->insertItem( tr( "1.0.0.0/8" ) );
144 syncnet->insertItem( tr( "Any" ) );
145 syncnet->insertItem( tr( "None" ) );
146}
107 147
108void Security::updateGUI() 148void Security::updateGUI()
109{ 149{
110 bool empty = passcode.isEmpty(); 150 bool empty = passcode.isEmpty();
111 151
112 changepasscode->setText( empty ? tr("Set passcode" ) 152 changepasscode->setText( empty ? tr("Set passcode" )
113 : tr("Change passcode" ) ); 153 : tr("Change passcode" ) );
114 passcode_poweron->setEnabled( !empty ); 154 passcode_poweron->setEnabled( !empty );
115 clearpasscode->setEnabled( !empty ); 155 clearpasscode->setEnabled( !empty );
116 156
117 autologinToggle->setChecked(autoLogin); 157 autologinToggle->setChecked(autoLogin);
118 userlist->setEnabled(autoLogin); 158 userlist->setEnabled(autoLogin);
119} 159}
120 160
121 161
122void Security::show() 162void Security::show()
123{ 163{
124 //valid=FALSE; 164 //valid=FALSE;
125 setEnabled(FALSE); 165 setEnabled(FALSE);
126 SecurityBase::show(); 166 SecurityBase::show();
127 if ( passcode.isEmpty() ) { 167 if ( passcode.isEmpty() ) {
128 // could insist... 168 // could insist...
129 //changePassCode(); 169 //changePassCode();
130 //if ( passcode.isEmpty() ) 170 //if ( passcode.isEmpty() )
131 //reject(); 171 //reject();
132 } else { 172 } else {
133 if (!valid) // security passcode was not asked yet, so ask now 173 if (!valid) // security passcode was not asked yet, so ask now
134 { 174 {
135 QString pc = enterPassCode(tr("Enter passcode")); 175 QString pc = enterPassCode(tr("Enter passcode"));
136 if ( pc != passcode ) { 176 if ( pc != passcode ) {
137 QMessageBox::critical(this, tr("Passcode incorrect"), 177 QMessageBox::critical(this, tr("Passcode incorrect"),
138 tr("The passcode entered is incorrect.\nAccess denied")); 178 tr("The passcode entered is incorrect.\nAccess denied"));
139 reject(); 179 reject();
140 return; 180 return;
141 } 181 }
142 } 182 }
143 } 183 }
144 setEnabled(TRUE); 184 setEnabled(TRUE);
145 valid=TRUE; 185 valid=TRUE;
146} 186}
147 187
148void Security::accept() 188void Security::accept()
149{ 189{
150 applySecurity(); 190 applySecurity();
151 QDialog::accept(); 191 QDialog::accept();
152 QCopEnvelope env("QPE/System", "securityChanged()" ); 192 QCopEnvelope env("QPE/System", "securityChanged()" );
153} 193}
154 194
155void Security::done(int r) 195void Security::done(int r)
156{ 196{
157 QDialog::done(r); 197 QDialog::done(r);
158 close(); 198 close();
159} 199}
160 200
161void Security::selectNet(int auth_peer,int auth_peer_bits) 201void Security::selectNet(int auth_peer,int auth_peer_bits, bool update)
162{ 202{
163 QString sn; 203 QString sn;
164 if ( auth_peer_bits == 0 && auth_peer == 0 ) { 204 if ( auth_peer_bits == 0 && auth_peer == 0 ) {
165 sn = tr("Any"); 205 sn = tr("Any");
166 } else if ( auth_peer_bits == 32 && auth_peer == 0 ) { 206 } else if ( auth_peer_bits == 32 && auth_peer == 0 ) {
167 sn = tr("None"); 207 sn = tr("None");
168 } else { 208 } else {
169 sn = 209 sn =
170 QString::number((auth_peer>>24)&0xff) + "." 210 QString::number((auth_peer>>24)&0xff) + "."
171 + QString::number((auth_peer>>16)&0xff) + "." 211 + QString::number((auth_peer>>16)&0xff) + "."
172 + QString::number((auth_peer>>8)&0xff) + "." 212 + QString::number((auth_peer>>8)&0xff) + "."
173 + QString::number((auth_peer>>0)&0xff) + "/" 213 + QString::number((auth_peer>>0)&0xff) + "/"
174 + QString::number(auth_peer_bits); 214 + QString::number(auth_peer_bits);
175 } 215 }
216
217 //insert user-defined list of netranges upon start
218 if (update) {
219 //User selected/active netrange first
220 syncnet->insertItem( tr( sn ) );
221
222 Config cfg("Security");
223 cfg.setGroup("Sync");
224
225 //set up defaults if needed, if someone manually deletes net0 he'll get a suprise hehe
226 QString test = cfg.readEntry("net0","");
227 if (test.isEmpty()) {
228 insertDefaultRanges();
229 } else {
230 // 10 ought to be enough for everybody... :)
231 // If you need more, don't forget to edit applySecurity() as well
232 bool already_there=FALSE;
233 for (int i=0; i<10; i++) {
234 QString target, netrange;
235 target.sprintf("net%d", i);
236 netrange = cfg.readEntry(target,"");
237 if (! netrange.isEmpty()){
238 //make sure we have no "twin" entries
239 for (int i=0; i<syncnet->count(); i++) {
240 if ( syncnet->text(i) == netrange ) {
241 already_there=TRUE;
242 }
243 }
244 if (! already_there) {
245 syncnet->insertItem( tr( netrange ) );
246 } else {
247 already_there=FALSE;
248 }
249 }
250 }
251 }
252 }
253
176 for (int i=0; i<syncnet->count(); i++) { 254 for (int i=0; i<syncnet->count(); i++) {
177 if ( syncnet->text(i).left(sn.length()) == sn ) { 255 if ( syncnet->text(i).left(sn.length()) == sn ) {
178 syncnet->setCurrentItem(i); 256 syncnet->setCurrentItem(i);
179 return; 257 return;
180 } 258 }
181 } 259 }
182 qDebug("No match for \"%s\"",sn.latin1()); 260 qDebug("No match for \"%s\"",sn.latin1());
183} 261}
184 262
185void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) 263void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits)
186{ 264{
187 auth_peer=0; 265 auth_peer=0;
188 if ( sn == tr("Any") ) { 266 if ( sn == tr("Any") ) {
189 auth_peer = 0; 267 auth_peer = 0;
190 auth_peer_bits = 0; 268 auth_peer_bits = 0;
191 } else if ( sn == tr("None") ) { 269 } else if ( sn == tr("None") ) {
192 auth_peer = 0; 270 auth_peer = 0;
193 auth_peer_bits = 32; 271 auth_peer_bits = 32;
194 } else { 272 } else {
195 int x=0; 273 int x=0;
196 for (int i=0; i<4; i++) { 274 for (int i=0; i<4; i++) {
197 int nx = sn.find(QChar(i==3 ? '/' : '.'),x); 275 int nx = sn.find(QChar(i==3 ? '/' : '.'),x);
198 auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt(); 276 auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt();
199 x = nx+1; 277 x = nx+1;
200 } 278 }
201 uint n = (uint)sn.find(' ',x)-x; 279 uint n = (uint)sn.find(' ',x)-x;
202 auth_peer_bits = sn.mid(x,n).toInt(); 280 auth_peer_bits = sn.mid(x,n).toInt();
203 } 281 }
204} 282}
205 283
206void Security::loadUsers ( void ) 284void Security::loadUsers ( void )
207{ 285{
208 QFile passwd("/etc/passwd"); 286 QFile passwd("/etc/passwd");
209 if ( passwd.open(IO_ReadOnly) ) { 287 if ( passwd.open(IO_ReadOnly) ) {
210 QTextStream t( &passwd ); 288 QTextStream t( &passwd );
211 QString s; 289 QString s;
212 QStringList account; 290 QStringList account;
213 while ( !t.eof() ) { 291 while ( !t.eof() ) {
214 account = QStringList::split(':',t.readLine()); 292 account = QStringList::split(':',t.readLine());
215 293
216 // Hide disabled accounts 294 // Hide disabled accounts
217 if (*account.at(1)!="*") { 295 if (*account.at(1)!="*") {
218 296
219 userlist->insertItem(*account.at(0)); 297 userlist->insertItem(*account.at(0));
220 // Highlight this item if it is set to autologinToggle 298 // Highlight this item if it is set to autologinToggle
221 if ( *account.at(0) == autoLoginName) 299 if ( *account.at(0) == autoLoginName)
222 userlist->setCurrentItem(userlist->count()-1); 300 userlist->setCurrentItem(userlist->count()-1);
223 } 301 }
224 } 302 }
225 passwd.close(); 303 passwd.close();
226 } 304 }
227 305
228} 306}
229 307
230void Security::toggleAutoLogin(bool val) 308void Security::toggleAutoLogin(bool val)
231{ 309{
232 autoLogin=val; 310 autoLogin=val;
233 userlist->setEnabled(val); 311 userlist->setEnabled(val);
234 if (!autoLogin) 312 if (!autoLogin)
235 autoLoginName=userlist->currentText(); 313 autoLoginName=userlist->currentText();
236} 314}
237 315
238 316
239 317
240 318
241void Security::setSyncNet(const QString& sn) 319void Security::setSyncNet(const QString& sn)
242{ 320{
243 int auth_peer,auth_peer_bits; 321 int auth_peer,auth_peer_bits;
244 parseNet(sn,auth_peer,auth_peer_bits); 322 parseNet(sn,auth_peer,auth_peer_bits);
245 selectNet(auth_peer,auth_peer_bits); 323 selectNet(auth_peer,auth_peer_bits,FALSE);
246} 324}
247 325
248void Security::applySecurity() 326void Security::applySecurity()
249{ 327{
250 if ( valid ) { 328 if ( valid ) {
251 Config cfg("Security"); 329 Config cfg("Security");
252 cfg.setGroup("Passcode"); 330 cfg.setGroup("Passcode");
253 cfg.writeEntry("passcode",passcode); 331 cfg.writeEntry("passcode",passcode);
254 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); 332 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked());
255 cfg.setGroup("Sync"); 333 cfg.setGroup("Sync");
256 int auth_peer=0; 334 int auth_peer=0;
257 int auth_peer_bits; 335 int auth_peer_bits;
258 QString sn = syncnet->currentText(); 336 QString sn = syncnet->currentText();
259 parseNet(sn,auth_peer,auth_peer_bits); 337 parseNet(sn,auth_peer,auth_peer_bits);
338
339 //this is the *selected* (active) net range
260 cfg.writeEntry("auth_peer",auth_peer); 340 cfg.writeEntry("auth_peer",auth_peer);
261 cfg.writeEntry("auth_peer_bits",auth_peer_bits); 341 cfg.writeEntry("auth_peer_bits",auth_peer_bits);
342
343 //write back all other net ranges in *cleartext*
344 for (int i=0; i<10; i++) {
345 QString target;
346 target.sprintf("net%d", i);
347 cfg.writeEntry(target,syncnet->text(i));
348 }
349
262 cfg.writeEntry("syncapp",syncapp->currentText()); 350 cfg.writeEntry("syncapp",syncapp->currentText());
263 351
264 /* 352 /*
265 cfg.setGroup("Remote"); 353 cfg.setGroup("Remote");
266 if ( telnetAvailable() ) 354 if ( telnetAvailable() )
267 cfg.writeEntry("allow_telnet",telnet->isChecked()); 355 cfg.writeEntry("allow_telnet",telnet->isChecked());
268 if ( sshAvailable() ) 356 if ( sshAvailable() )
269 cfg.writeEntry("allow_ssh",ssh->isChecked()); 357 cfg.writeEntry("allow_ssh",ssh->isChecked());
270 // ### write ssh/telnet sys config files 358 // ### write ssh/telnet sys config files
271 */ 359 */
272 360
273 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 361 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
274 Config loginCfg(configFile,Config::File); 362 Config loginCfg(configFile,Config::File);
275 loginCfg.setGroup("General"); 363 loginCfg.setGroup("General");
276 364
277 if (autoLogin) { 365 if (autoLogin) {
278 loginCfg.writeEntry("AutoLogin",autoLoginName); 366 loginCfg.writeEntry("AutoLogin",autoLoginName);
279 } else { 367 } else {
280 loginCfg.removeEntry("AutoLogin"); 368 loginCfg.removeEntry("AutoLogin");
281 } 369 }
282 370
283 } 371 }
284} 372}
285void Security::changeSyncApp() 373void Security::changeSyncApp()
286{ 374{
287 // Don't say i didn't tell ya 375 // Don't say i didn't tell ya
288 if (syncapp->currentText() == "IntelliSync") { 376 if (syncapp->currentText() == "IntelliSync") {
289 QMessageBox attn( 377 QMessageBox attn(
290 tr("WARNING"), 378 tr("WARNING"),
291 tr("<p>Selecting IntelliSync here will disable the FTP password." 379 tr("<p>Selecting IntelliSync here will disable the FTP password."
292 "<p>Every machine in your netrange will be able to sync with " 380 "<p>Every machine in your netrange will be able to sync with "
293 "your Zaurus!"), 381 "your Zaurus!"),
294 QMessageBox::Warning, 382 QMessageBox::Warning,
295 QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton, 383 QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
296 0, QString::null, TRUE, WStyle_StaysOnTop); 384 0, QString::null, TRUE, WStyle_StaysOnTop);
297 attn.setButtonText(QMessageBox::Cancel, tr("Ok")); 385 attn.setButtonText(QMessageBox::Cancel, tr("Ok"));
298 attn.exec(); 386 attn.exec();
299 } 387 }
300 updateGUI(); 388 updateGUI();
301} 389}
302 390
303 391
304 392
305void Security::changeLoginName( int idx ) 393void Security::changeLoginName( int idx )
306{ 394{
307 autoLoginName = userlist->text(idx);; 395 autoLoginName = userlist->text(idx);;
308 updateGUI(); 396 updateGUI();
309} 397}
310 398
311void Security::changePassCode() 399void Security::changePassCode()
312{ 400{
313 QString new1; 401 QString new1;
314 QString new2; 402 QString new2;
315 403
316 do { 404 do {
317 new1 = enterPassCode(tr("Enter new passcode")); 405 new1 = enterPassCode(tr("Enter new passcode"));
318 if ( new1.isNull() ) 406 if ( new1.isNull() )
319 return; 407 return;
320 new2 = enterPassCode(tr("Re-enter new passcode")); 408 new2 = enterPassCode(tr("Re-enter new passcode"));
321 if ( new2.isNull() ) 409 if ( new2.isNull() )
322 return; 410 return;
323 } while (new1 != new2); 411 } while (new1 != new2);
324 412
325 passcode = new1; 413 passcode = new1;
326 updateGUI(); 414 updateGUI();
327} 415}
328 416
329void Security::clearPassCode() 417void Security::clearPassCode()
330{ 418{
331 passcode = QString::null; 419 passcode = QString::null;
332 updateGUI(); 420 updateGUI();
333} 421}
334 422
335 423
336QString Security::enterPassCode(const QString& prompt) 424QString Security::enterPassCode(const QString& prompt)
337{ 425{
338 return Password::getPassword(prompt); 426 return Password::getPassword(prompt);
339} 427}
340 428
341bool Security::telnetAvailable() const 429bool Security::telnetAvailable() const
342{ 430{
343 // ### not implemented 431 // ### not implemented
344 return FALSE; 432 return FALSE;
345} 433}
346 434
347bool Security::sshAvailable() const 435bool Security::sshAvailable() const
348{ 436{
349 // ### not implemented 437 // ### not implemented
350 return FALSE; 438 return FALSE;
351} 439}
diff --git a/core/settings/security/security.h b/core/settings/security/security.h
index b1a3eca..72aa352 100644
--- a/core/settings/security/security.h
+++ b/core/settings/security/security.h
@@ -1,72 +1,75 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef SECURITY_H 20#ifndef SECURITY_H
21#define SECURITY_H 21#define SECURITY_H
22 22
23#include "securitybase.h" 23#include "securitybase.h"
24 24
25class QPEDialogListener; 25class QPEDialogListener;
26 26
27class Security : public SecurityBase 27class Security : public SecurityBase
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 static QString appName() { return QString::fromLatin1("security"); } 32 static QString appName() { return QString::fromLatin1("security"); }
33 Security( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 33 Security( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
34 ~Security(); 34 ~Security();
35 35
36 void show(); 36 void show();
37 37
38protected: 38protected:
39 void accept(); 39 void accept();
40 void applySecurity(); 40 void applySecurity();
41 void done(int); 41 void done(int);
42 42
43private slots: 43private slots:
44 void changePassCode(); 44 void changePassCode();
45 void clearPassCode(); 45 void clearPassCode();
46 void setSyncNet(const QString&); 46 void setSyncNet(const QString&);
47 void changeLoginName(int); 47 void changeLoginName(int);
48 void toggleAutoLogin(bool); 48 void toggleAutoLogin(bool);
49 void changeSyncApp(); 49 void changeSyncApp();
50 50 void restoreDefaults();
51 void insertDefaultRanges();
52 void deleteListEntry();
51 53
52private: 54private:
53 void loadUsers(void); 55 void loadUsers(void);
54 bool telnetAvailable() const; 56 bool telnetAvailable() const;
55 bool sshAvailable() const; 57 bool sshAvailable() const;
56 void updateGUI(); 58 void updateGUI();
57 59
58 static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); 60 static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits);
59 void selectNet(int auth_peer,int auth_peer_bits); 61 void selectNet(int auth_peer,int auth_peer_bits,bool update);
62
60 63
61 QString enterPassCode(const QString&); 64 QString enterPassCode(const QString&);
62 QString passcode; 65 QString passcode;
63 bool valid; 66 bool valid;
64 bool autoLogin; 67 bool autoLogin;
65 QString autoLoginName; 68 QString autoLoginName;
66 69
67 QPEDialogListener *dl; 70 QPEDialogListener *dl;
68}; 71};
69 72
70 73
71#endif // SECURITY_H 74#endif // SECURITY_H
72 75
diff --git a/core/settings/security/securitybase.ui b/core/settings/security/securitybase.ui
index 934111e..1769ae1 100644
--- a/core/settings/security/securitybase.ui
+++ b/core/settings/security/securitybase.ui
@@ -1,467 +1,523 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SecurityBase</class> 2<class>SecurityBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>SecurityBase</cstring> 7 <cstring>SecurityBase</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>321</width> 14 <width>309</width>
15 <height>483</height> 15 <height>483</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>Security Settings</string> 20 <string>Security Settings</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>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget2</cstring> 41 <cstring>TabWidget2</cstring>
42 </property> 42 </property>
43 <property> 43 <property>
44 <name>layoutMargin</name> 44 <name>layoutMargin</name>
45 </property> 45 </property>
46 <widget> 46 <widget>
47 <class>QWidget</class> 47 <class>QWidget</class>
48 <property stdset="1"> 48 <property stdset="1">
49 <name>name</name> 49 <name>name</name>
50 <cstring>tab</cstring> 50 <cstring>tab</cstring>
51 </property> 51 </property>
52 <attribute> 52 <attribute>
53 <name>title</name> 53 <name>title</name>
54 <string>Passcode</string> 54 <string>Passcode</string>
55 </attribute> 55 </attribute>
56 <vbox> 56 <vbox>
57 <property stdset="1"> 57 <property stdset="1">
58 <name>margin</name> 58 <name>margin</name>
59 <number>6</number> 59 <number>6</number>
60 </property> 60 </property>
61 <property stdset="1"> 61 <property stdset="1">
62 <name>spacing</name> 62 <name>spacing</name>
63 <number>6</number> 63 <number>6</number>
64 </property> 64 </property>
65 <widget> 65 <widget>
66 <class>QGroupBox</class> 66 <class>QGroupBox</class>
67 <property stdset="1"> 67 <property stdset="1">
68 <name>name</name> 68 <name>name</name>
69 <cstring>GroupBox4</cstring> 69 <cstring>GroupBox4</cstring>
70 </property> 70 </property>
71 <property stdset="1"> 71 <property stdset="1">
72 <name>title</name> 72 <name>title</name>
73 <string>Passcode</string> 73 <string>Passcode</string>
74 </property> 74 </property>
75 <vbox> 75 <vbox>
76 <property stdset="1"> 76 <property stdset="1">
77 <name>margin</name> 77 <name>margin</name>
78 <number>11</number> 78 <number>11</number>
79 </property> 79 </property>
80 <property stdset="1"> 80 <property stdset="1">
81 <name>spacing</name> 81 <name>spacing</name>
82 <number>6</number> 82 <number>6</number>
83 </property> 83 </property>
84 <widget> 84 <widget>
85 <class>QLayoutWidget</class> 85 <class>QLayoutWidget</class>
86 <property stdset="1"> 86 <property stdset="1">
87 <name>name</name> 87 <name>name</name>
88 <cstring>Layout1</cstring> 88 <cstring>Layout1</cstring>
89 </property> 89 </property>
90 <property> 90 <property>
91 <name>layoutSpacing</name> 91 <name>layoutSpacing</name>
92 </property> 92 </property>
93 <hbox> 93 <hbox>
94 <property stdset="1"> 94 <property stdset="1">
95 <name>margin</name> 95 <name>margin</name>
96 <number>0</number> 96 <number>0</number>
97 </property> 97 </property>
98 <property stdset="1"> 98 <property stdset="1">
99 <name>spacing</name> 99 <name>spacing</name>
100 <number>-1</number> 100 <number>-1</number>
101 </property> 101 </property>
102 <widget> 102 <widget>
103 <class>QPushButton</class> 103 <class>QPushButton</class>
104 <property stdset="1"> 104 <property stdset="1">
105 <name>name</name> 105 <name>name</name>
106 <cstring>changepasscode</cstring> 106 <cstring>changepasscode</cstring>
107 </property> 107 </property>
108 <property stdset="1"> 108 <property stdset="1">
109 <name>text</name> 109 <name>text</name>
110 <string>Change passcode</string> 110 <string>Change passcode</string>
111 </property> 111 </property>
112 <property>
113 <name>whatsThis</name>
114 <string>This button will let you change the security passcode.
115
116Note: This is *not* the sync password.</string>
117 </property>
112 </widget> 118 </widget>
113 <widget> 119 <widget>
114 <class>QPushButton</class> 120 <class>QPushButton</class>
115 <property stdset="1"> 121 <property stdset="1">
116 <name>name</name> 122 <name>name</name>
117 <cstring>clearpasscode</cstring> 123 <cstring>clearpasscode</cstring>
118 </property> 124 </property>
119 <property stdset="1"> 125 <property stdset="1">
120 <name>text</name> 126 <name>text</name>
121 <string>Clear passcode</string> 127 <string>Clear passcode</string>
122 </property> 128 </property>
129 <property>
130 <name>whatsThis</name>
131 <string>Delete the current passcode.
132You can enter a new one at any time.</string>
133 </property>
123 </widget> 134 </widget>
124 </hbox> 135 </hbox>
125 </widget> 136 </widget>
126 <widget> 137 <widget>
127 <class>QCheckBox</class> 138 <class>QCheckBox</class>
128 <property stdset="1"> 139 <property stdset="1">
129 <name>name</name> 140 <name>name</name>
130 <cstring>passcode_poweron</cstring> 141 <cstring>passcode_poweron</cstring>
131 </property> 142 </property>
132 <property stdset="1"> 143 <property stdset="1">
133 <name>text</name> 144 <name>text</name>
134 <string>Require pass code at power-on</string> 145 <string>Require pass code at power-on</string>
135 </property> 146 </property>
147 <property>
148 <name>whatsThis</name>
149 <string>If you enable this option, a passcode must be entered after every resume event of your Zaurus.</string>
150 </property>
136 </widget> 151 </widget>
137 <widget> 152 <widget>
138 <class>QLabel</class> 153 <class>QLabel</class>
139 <property stdset="1"> 154 <property stdset="1">
140 <name>name</name> 155 <name>name</name>
141 <cstring>TextLabel1</cstring> 156 <cstring>TextLabel1</cstring>
142 </property> 157 </property>
143 <property stdset="1"> 158 <property stdset="1">
144 <name>sizePolicy</name> 159 <name>sizePolicy</name>
145 <sizepolicy> 160 <sizepolicy>
146 <hsizetype>5</hsizetype> 161 <hsizetype>5</hsizetype>
147 <vsizetype>7</vsizetype> 162 <vsizetype>7</vsizetype>
148 </sizepolicy> 163 </sizepolicy>
149 </property> 164 </property>
150 <property stdset="1"> 165 <property stdset="1">
151 <name>text</name> 166 <name>text</name>
152 <string>&lt;P&gt;Pass code protection provides a minimal level of protection from casual access to this device.</string> 167 <string>&lt;P&gt;Pass code protection provides a minimal level of protection from casual access to this device.</string>
153 </property> 168 </property>
154 <property stdset="1"> 169 <property stdset="1">
155 <name>textFormat</name> 170 <name>textFormat</name>
156 <enum>RichText</enum> 171 <enum>RichText</enum>
157 </property> 172 </property>
158 <property stdset="1"> 173 <property stdset="1">
159 <name>alignment</name> 174 <name>alignment</name>
160 <set>AlignTop|AlignLeft</set> 175 <set>AlignTop|AlignLeft</set>
161 </property> 176 </property>
162 <property> 177 <property>
163 <name>vAlign</name> 178 <name>vAlign</name>
164 </property> 179 </property>
165 </widget> 180 </widget>
166 </vbox> 181 </vbox>
167 </widget> 182 </widget>
168 <spacer> 183 <spacer>
169 <property> 184 <property>
170 <name>name</name> 185 <name>name</name>
171 <cstring>Spacer3</cstring> 186 <cstring>Spacer3</cstring>
172 </property> 187 </property>
173 <property stdset="1"> 188 <property stdset="1">
174 <name>orientation</name> 189 <name>orientation</name>
175 <enum>Vertical</enum> 190 <enum>Vertical</enum>
176 </property> 191 </property>
177 <property stdset="1"> 192 <property stdset="1">
178 <name>sizeType</name> 193 <name>sizeType</name>
179 <enum>Expanding</enum> 194 <enum>Expanding</enum>
180 </property> 195 </property>
181 <property> 196 <property>
182 <name>sizeHint</name> 197 <name>sizeHint</name>
183 <size> 198 <size>
184 <width>20</width> 199 <width>20</width>
185 <height>20</height> 200 <height>20</height>
186 </size> 201 </size>
187 </property> 202 </property>
188 </spacer> 203 </spacer>
189 </vbox> 204 </vbox>
190 </widget> 205 </widget>
191 <widget> 206 <widget>
192 <class>QWidget</class> 207 <class>QWidget</class>
193 <property stdset="1"> 208 <property stdset="1">
194 <name>name</name> 209 <name>name</name>
195 <cstring>tab</cstring> 210 <cstring>tab</cstring>
196 </property> 211 </property>
197 <attribute> 212 <attribute>
198 <name>title</name> 213 <name>title</name>
199 <string>Login</string> 214 <string>Login</string>
200 </attribute> 215 </attribute>
201 <vbox> 216 <vbox>
202 <property stdset="1"> 217 <property stdset="1">
203 <name>margin</name> 218 <name>margin</name>
204 <number>6</number> 219 <number>6</number>
205 </property> 220 </property>
206 <property stdset="1"> 221 <property stdset="1">
207 <name>spacing</name> 222 <name>spacing</name>
208 <number>6</number> 223 <number>6</number>
209 </property> 224 </property>
210 <widget> 225 <widget>
211 <class>QGroupBox</class> 226 <class>QGroupBox</class>
212 <property stdset="1"> 227 <property stdset="1">
213 <name>name</name> 228 <name>name</name>
214 <cstring>GroupBox3</cstring> 229 <cstring>GroupBox3</cstring>
215 </property> 230 </property>
216 <property stdset="1"> 231 <property stdset="1">
217 <name>title</name> 232 <name>title</name>
218 <string>Login</string> 233 <string>Login</string>
219 </property> 234 </property>
220 <vbox> 235 <vbox>
221 <property stdset="1"> 236 <property stdset="1">
222 <name>margin</name> 237 <name>margin</name>
223 <number>11</number> 238 <number>11</number>
224 </property> 239 </property>
225 <property stdset="1"> 240 <property stdset="1">
226 <name>spacing</name> 241 <name>spacing</name>
227 <number>6</number> 242 <number>6</number>
228 </property> 243 </property>
229 <widget> 244 <widget>
230 <class>QCheckBox</class> 245 <class>QCheckBox</class>
231 <property stdset="1"> 246 <property stdset="1">
232 <name>name</name> 247 <name>name</name>
233 <cstring>autologinToggle</cstring> 248 <cstring>autologinToggle</cstring>
234 </property> 249 </property>
235 <property stdset="1"> 250 <property stdset="1">
236 <name>text</name> 251 <name>text</name>
237 <string>Login Automatically</string> 252 <string>Login Automatically</string>
238 </property> 253 </property>
254 <property>
255 <name>whatsThis</name>
256 <string>If you select this option, opie-login will automagically log you in with the user you have selected in the drop-down list.
257
258For the Zaurus 5x00 this is always the user "root".</string>
259 </property>
239 </widget> 260 </widget>
240 <widget> 261 <widget>
241 <class>QComboBox</class> 262 <class>QComboBox</class>
242 <property stdset="1"> 263 <property stdset="1">
243 <name>name</name> 264 <name>name</name>
244 <cstring>userlist</cstring> 265 <cstring>userlist</cstring>
245 </property> 266 </property>
267 <property>
268 <name>whatsThis</name>
269 <string>This drop-down list allows you to select the user for auto-login
270(if enabled above).
271
272You can only select an actually configured user.</string>
273 </property>
246 </widget> 274 </widget>
247 </vbox> 275 </vbox>
248 </widget> 276 </widget>
249 <spacer> 277 <spacer>
250 <property> 278 <property>
251 <name>name</name> 279 <name>name</name>
252 <cstring>Spacer2</cstring> 280 <cstring>Spacer2</cstring>
253 </property> 281 </property>
254 <property stdset="1"> 282 <property stdset="1">
255 <name>orientation</name> 283 <name>orientation</name>
256 <enum>Vertical</enum> 284 <enum>Vertical</enum>
257 </property> 285 </property>
258 <property stdset="1"> 286 <property stdset="1">
259 <name>sizeType</name> 287 <name>sizeType</name>
260 <enum>Expanding</enum> 288 <enum>Expanding</enum>
261 </property> 289 </property>
262 <property> 290 <property>
263 <name>sizeHint</name> 291 <name>sizeHint</name>
264 <size> 292 <size>
265 <width>20</width> 293 <width>20</width>
266 <height>20</height> 294 <height>20</height>
267 </size> 295 </size>
268 </property> 296 </property>
269 </spacer> 297 </spacer>
270 </vbox> 298 </vbox>
271 </widget> 299 </widget>
272 <widget> 300 <widget>
273 <class>QWidget</class> 301 <class>QWidget</class>
274 <property stdset="1"> 302 <property stdset="1">
275 <name>name</name> 303 <name>name</name>
276 <cstring>tab</cstring> 304 <cstring>tab</cstring>
277 </property> 305 </property>
278 <attribute> 306 <attribute>
279 <name>title</name> 307 <name>title</name>
280 <string>Sync</string> 308 <string>Sync</string>
281 </attribute> 309 </attribute>
282 <vbox> 310 <grid>
283 <property stdset="1"> 311 <property stdset="1">
284 <name>margin</name> 312 <name>margin</name>
285 <number>11</number> 313 <number>11</number>
286 </property> 314 </property>
287 <property stdset="1"> 315 <property stdset="1">
288 <name>spacing</name> 316 <name>spacing</name>
289 <number>6</number> 317 <number>6</number>
290 </property> 318 </property>
291 <widget> 319 <spacer row="1" column="0" >
320 <property>
321 <name>name</name>
322 <cstring>Spacer1</cstring>
323 </property>
324 <property stdset="1">
325 <name>orientation</name>
326 <enum>Vertical</enum>
327 </property>
328 <property stdset="1">
329 <name>sizeType</name>
330 <enum>Expanding</enum>
331 </property>
332 <property>
333 <name>sizeHint</name>
334 <size>
335 <width>20</width>
336 <height>20</height>
337 </size>
338 </property>
339 </spacer>
340 <widget row="0" column="0" >
292 <class>QGroupBox</class> 341 <class>QGroupBox</class>
293 <property stdset="1"> 342 <property stdset="1">
294 <name>name</name> 343 <name>name</name>
295 <cstring>GroupBox2</cstring> 344 <cstring>GroupBox2</cstring>
296 </property> 345 </property>
297 <property stdset="1"> 346 <property stdset="1">
298 <name>title</name> 347 <name>title</name>
299 <string>Sync</string> 348 <string>Sync</string>
300 </property> 349 </property>
301 <vbox> 350 <vbox>
302 <property stdset="1"> 351 <property stdset="1">
303 <name>margin</name> 352 <name>margin</name>
304 <number>11</number> 353 <number>11</number>
305 </property> 354 </property>
306 <property stdset="1"> 355 <property stdset="1">
307 <name>spacing</name> 356 <name>spacing</name>
308 <number>6</number> 357 <number>6</number>
309 </property> 358 </property>
310 <widget> 359 <widget>
311 <class>QLabel</class> 360 <class>QLabel</class>
312 <property stdset="1"> 361 <property stdset="1">
313 <name>name</name> 362 <name>name</name>
314 <cstring>TextLabel1_2</cstring> 363 <cstring>TextLabel1_2</cstring>
315 </property> 364 </property>
316 <property stdset="1"> 365 <property stdset="1">
317 <name>text</name> 366 <name>text</name>
318 <string>Accept sync from network:</string> 367 <string>Accept sync from network:</string>
319 </property> 368 </property>
320 <property stdset="1"> 369 <property stdset="1">
321 <name>textFormat</name> 370 <name>textFormat</name>
322 <enum>RichText</enum> 371 <enum>RichText</enum>
323 </property> 372 </property>
324 </widget> 373 </widget>
325 <widget> 374 <widget>
326 <class>QComboBox</class> 375 <class>QComboBox</class>
327 <item>
328 <property>
329 <name>text</name>
330 <string>192.168.129.0/24 (default)</string>
331 </property>
332 </item>
333 <item>
334 <property>
335 <name>text</name>
336 <string>192.168.1.0/24</string>
337 </property>
338 </item>
339 <item>
340 <property>
341 <name>text</name>
342 <string>192.168.0.0/16</string>
343 </property>
344 </item>
345 <item>
346 <property>
347 <name>text</name>
348 <string>172.16.0.0/12</string>
349 </property>
350 </item>
351 <item>
352 <property>
353 <name>text</name>
354 <string>10.0.0.0/8</string>
355 </property>
356 </item>
357 <item>
358 <property>
359 <name>text</name>
360 <string>1.0.0.0/8</string>
361 </property>
362 </item>
363 <item>
364 <property>
365 <name>text</name>
366 <string>Any</string>
367 </property>
368 </item>
369 <item>
370 <property>
371 <name>text</name>
372 <string>None</string>
373 </property>
374 </item>
375 <property stdset="1"> 376 <property stdset="1">
376 <name>name</name> 377 <name>name</name>
377 <cstring>syncnet</cstring> 378 <cstring>syncnet</cstring>
378 </property> 379 </property>
379 <property stdset="1"> 380 <property stdset="1">
380 <name>editable</name> 381 <name>editable</name>
381 <bool>true</bool> 382 <bool>true</bool>
382 </property> 383 </property>
384 <property>
385 <name>whatsThis</name>
386 <string>Select a net-range or enter a new one.
387
388This drop-down list lets you select a net range which is allowed to connect to your Zaurus.
389
390For example, a net range of 192.168.1.0/24 will allow any machine with an IP between 192.168.1.1 and 192.168.1.254 to connect to (and sync with) your Zaurus.
391
392The entry "All" will allow *any* IP to connect.
393The entry "None" will *deny* any connection.
394
395If unsure, select "Any".</string>
396 </property>
397 </widget>
398 <widget>
399 <class>QLayoutWidget</class>
400 <property stdset="1">
401 <name>name</name>
402 <cstring>Layout4</cstring>
403 </property>
404 <hbox>
405 <property stdset="1">
406 <name>margin</name>
407 <number>0</number>
408 </property>
409 <property stdset="1">
410 <name>spacing</name>
411 <number>6</number>
412 </property>
413 <widget>
414 <class>QPushButton</class>
415 <property stdset="1">
416 <name>name</name>
417 <cstring>deleteentry</cstring>
418 </property>
419 <property stdset="1">
420 <name>text</name>
421 <string>Delete Entry</string>
422 </property>
423 <property>
424 <name>whatsThis</name>
425 <string>Delete the selected net range from the list
426
427If you press this button, the currently selected net range will be deleted from the list of net ranges.
428
429If you hit this button in error, the button "Restore Defaults" will restore
430the list to the state it has been when you initially booted your Zaurus.</string>
431 </property>
432 </widget>
433 <widget>
434 <class>QPushButton</class>
435 <property stdset="1">
436 <name>name</name>
437 <cstring>restoredefaults</cstring>
438 </property>
439 <property stdset="1">
440 <name>text</name>
441 <string>Restore Defaults</string>
442 </property>
443 <property>
444 <name>whatsThis</name>
445 <string>This button will restore the list of net ranges
446to the defaults.
447
448Beware that all manually entered net ranges will be lost!</string>
449 </property>
450 </widget>
451 </hbox>
383 </widget> 452 </widget>
384 <widget> 453 <widget>
385 <class>QLabel</class> 454 <class>QLabel</class>
386 <property stdset="1"> 455 <property stdset="1">
387 <name>name</name> 456 <name>name</name>
388 <cstring>TextLabel2</cstring> 457 <cstring>TextLabel2</cstring>
389 </property> 458 </property>
390 <property stdset="1"> 459 <property stdset="1">
391 <name>text</name> 460 <name>text</name>
392 <string>Select your sync software</string> 461 <string>Select your sync software</string>
393 </property> 462 </property>
394 </widget> 463 </widget>
395 <widget> 464 <widget>
396 <class>QComboBox</class> 465 <class>QComboBox</class>
397 <item> 466 <item>
398 <property> 467 <property>
399 <name>text</name> 468 <name>text</name>
400 <string>QTopia</string> 469 <string>QTopia</string>
401 </property> 470 </property>
402 </item> 471 </item>
403 <item> 472 <item>
404 <property> 473 <property>
405 <name>text</name> 474 <name>text</name>
406 <string>IntelliSync</string> 475 <string>IntelliSync</string>
407 </property> 476 </property>
408 </item> 477 </item>
409 <property stdset="1"> 478 <property stdset="1">
410 <name>name</name> 479 <name>name</name>
411 <cstring>syncapp</cstring> 480 <cstring>syncapp</cstring>
412 </property> 481 </property>
482 <property>
483 <name>whatsThis</name>
484 <string>This option changes the login behaviour of the internal FTP server.
485
486If you have problems syncing, try the "IntelliSync" setting, which will accept any password you throw at the sync (FTP) port.
487
488The default is Qtopia. It will let you log in with username "root" and password "Qtopia". The password is CaSeSeNsItIvE.</string>
489 </property>
413 </widget> 490 </widget>
414 <widget> 491 <widget>
415 <class>QComboBox</class> 492 <class>QComboBox</class>
416 <item> 493 <item>
417 <property> 494 <property>
418 <name>text</name> 495 <name>text</name>
419 <string>Qtopia 1.7</string> 496 <string>Qtopia 1.7</string>
420 </property> 497 </property>
421 </item> 498 </item>
422 <item> 499 <item>
423 <property> 500 <property>
424 <name>text</name> 501 <name>text</name>
425 <string>Opie 1.0</string> 502 <string>Opie 1.0</string>
426 </property> 503 </property>
427 </item> 504 </item>
428 <item> 505 <item>
429 <property> 506 <property>
430 <name>text</name> 507 <name>text</name>
431 <string>Both</string> 508 <string>Both</string>
432 </property> 509 </property>
433 </item> 510 </item>
434 <property stdset="1"> 511 <property stdset="1">
435 <name>name</name> 512 <name>name</name>
436 <cstring>syncModeCombo</cstring> 513 <cstring>syncModeCombo</cstring>
437 </property> 514 </property>
438 </widget> 515 </widget>
439 </vbox> 516 </vbox>
440 </widget> 517 </widget>
441 <spacer> 518 </grid>
442 <property>
443 <name>name</name>
444 <cstring>Spacer1</cstring>
445 </property>
446 <property stdset="1">
447 <name>orientation</name>
448 <enum>Vertical</enum>
449 </property>
450 <property stdset="1">
451 <name>sizeType</name>
452 <enum>Expanding</enum>
453 </property>
454 <property>
455 <name>sizeHint</name>
456 <size>
457 <width>20</width>
458 <height>20</height>
459 </size>
460 </property>
461 </spacer>
462 </vbox>
463 </widget> 519 </widget>
464 </widget> 520 </widget>
465 </vbox> 521 </vbox>
466</widget> 522</widget>
467</UI> 523</UI>