summaryrefslogtreecommitdiff
path: root/core/settings/security
Unidiff
Diffstat (limited to 'core/settings/security') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp106
-rw-r--r--core/settings/security/security.h5
-rw-r--r--core/settings/security/securitybase.ui39
3 files changed, 66 insertions, 84 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 34f7e50..4eddb55 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -46,3 +46,3 @@
46 selectNet(auth_peer,auth_peer_bits,TRUE); 46 selectNet(auth_peer,auth_peer_bits,TRUE);
47 47
48 connect(syncnet, SIGNAL(textChanged(const QString&)), 48 connect(syncnet, SIGNAL(textChanged(const QString&)),
@@ -50,11 +50,4 @@
50 50
51 cfg.setGroup("Sync");
52 QString sa = cfg.readEntry("syncapp","Qtopia");
53 51
54 for (int i=0; i<syncapp->count(); i++) { 52
55 if ( syncapp->text(i) == sa ) {
56 syncapp->setCurrentItem(i);
57 }
58 }
59
60 /* 53 /*
@@ -74,3 +67,3 @@
74 Config loginCfg(configFile,Config::File); 67 Config loginCfg(configFile,Config::File);
75 68
76 loginCfg.setGroup("General"); 69 loginCfg.setGroup("General");
@@ -86,7 +79,15 @@
86 int mode = cfg.readNumEntry("Mode",2); // Default to Sharp 79 int mode = cfg.readNumEntry("Mode",2); // Default to Sharp
87 syncModeCombo->setCurrentItem( mode - 1 ); 80 switch( mode ) {
88 81 case 0x01:
89 //since nobody knows what this is and it doesn't do anything, i'll hide it # CoreDump 82 syncModeCombo->setCurrentItem( 0 );
90 // is this work-in-progress or can it be removed? 83 break;
91 syncModeCombo->hide(); 84 case 0x02:
85 default:
86 syncModeCombo->setCurrentItem( 1 );
87 break;
88 case 0x04:
89 syncModeCombo->setCurrentItem( 2 );
90 break;
91 }
92
92 93
@@ -96,6 +97,5 @@
96 connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); 97 connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode()));
97 connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp())); 98 connect(restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
98 connect(restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
99 connect(deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); 99 connect(deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
100 100
101 loadUsers(); 101 loadUsers();
@@ -111,3 +111,3 @@ Security::~Security()
111 111
112void Security::deleteListEntry() 112void Security::deleteListEntry()
113{ 113{
@@ -117,3 +117,3 @@ void Security::deleteListEntry()
117void Security::restoreDefaults() 117void Security::restoreDefaults()
118 { 118{
119 QMessageBox unrecbox( 119 QMessageBox unrecbox(
@@ -127,3 +127,3 @@ void Security::restoreDefaults()
127 127
128 if ( unrecbox.exec() == QMessageBox::Yes) 128 if ( unrecbox.exec() == QMessageBox::Yes)
129 { 129 {
@@ -131,3 +131,4 @@ void Security::restoreDefaults()
131 insertDefaultRanges(); 131 insertDefaultRanges();
132 } 132 }
133 syncModeCombo->setCurrentItem( 2 );
133} 134}
@@ -135,3 +136,3 @@ void Security::restoreDefaults()
135void Security::insertDefaultRanges() 136void Security::insertDefaultRanges()
136{ 137{
137 syncnet->insertItem( tr( "192.168.129.0/24" ) ); 138 syncnet->insertItem( tr( "192.168.129.0/24" ) );
@@ -156,3 +157,3 @@ void Security::updateGUI()
156 autologinToggle->setChecked(autoLogin); 157 autologinToggle->setChecked(autoLogin);
157 userlist->setEnabled(autoLogin); 158 userlist->setEnabled(autoLogin);
158} 159}
@@ -239,3 +240,3 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update)
239 if ( syncnet->text(i) == netrange ) { 240 if ( syncnet->text(i) == netrange ) {
240 already_there=TRUE; 241 already_there=TRUE;
241 } 242 }
@@ -246,8 +247,8 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update)
246 already_there=FALSE; 247 already_there=FALSE;
247 } 248 }
248 } 249 }
249 } 250 }
250 } 251 }
251 } 252 }
252 253
253 for (int i=0; i<syncnet->count(); i++) { 254 for (int i=0; i<syncnet->count(); i++) {
@@ -336,3 +337,3 @@ void Security::applySecurity()
336 parseNet(sn,auth_peer,auth_peer_bits); 337 parseNet(sn,auth_peer,auth_peer_bits);
337 338
338 //this is the *selected* (active) net range 339 //this is the *selected* (active) net range
@@ -340,3 +341,3 @@ void Security::applySecurity()
340 cfg.writeEntry("auth_peer_bits",auth_peer_bits); 341 cfg.writeEntry("auth_peer_bits",auth_peer_bits);
341 342
342 //write back all other net ranges in *cleartext* 343 //write back all other net ranges in *cleartext*
@@ -347,5 +348,22 @@ void Security::applySecurity()
347 } 348 }
348 349
349 cfg.writeEntry("syncapp",syncapp->currentText()); 350#ifdef ODP
350 351 #error "Use 0,1,2 and use Launcher"
352#endif
353 /* keep the old code so we don't use currentItem directly */
354 int value = 0x02;
355 switch( syncModeCombo->currentItem() ) {
356 case 0:
357 value = 0x01;
358 break;
359 case 1:
360 value = 0x02;
361 break;
362 case 2:
363 value = 0x04;
364 break;
365 }
366 cfg.setGroup("SyncMode");
367 cfg.writeEntry( "Mode", value );
368
351 /* 369 /*
@@ -371,19 +389,3 @@ void Security::applySecurity()
371} 389}
372void Security::changeSyncApp() 390
373{
374 // Don't say i didn't tell ya
375 if (syncapp->currentText() == "IntelliSync") {
376 QMessageBox attn(
377 tr("WARNING"),
378 tr("<p>Selecting IntelliSync here will disable the FTP password."
379 "<p>Every machine in your netrange will be able to sync with "
380 "your Zaurus!"),
381 QMessageBox::Warning,
382 QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
383 0, QString::null, TRUE, WStyle_StaysOnTop);
384 attn.setButtonText(QMessageBox::Cancel, tr("Ok"));
385 attn.exec();
386 }
387 updateGUI();
388}
389 391
diff --git a/core/settings/security/security.h b/core/settings/security/security.h
index 72aa352..ed25ce1 100644
--- a/core/settings/security/security.h
+++ b/core/settings/security/security.h
@@ -27,3 +27,3 @@ class QPEDialogListener;
27class Security : public SecurityBase 27class Security : public SecurityBase
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
@@ -48,3 +48,2 @@ private slots:
48 void toggleAutoLogin(bool); 48 void toggleAutoLogin(bool);
49 void changeSyncApp();
50 void restoreDefaults(); 49 void restoreDefaults();
@@ -62,3 +61,3 @@ private:
62 61
63 62
64 QString enterPassCode(const QString&); 63 QString enterPassCode(const QString&);
diff --git a/core/settings/security/securitybase.ui b/core/settings/security/securitybase.ui
index 1769ae1..dcf1d6b 100644
--- a/core/settings/security/securitybase.ui
+++ b/core/settings/security/securitybase.ui
@@ -13,3 +13,3 @@
13 <y>0</y> 13 <y>0</y>
14 <width>309</width> 14 <width>327</width>
15 <height>483</height> 15 <height>483</height>
@@ -468,29 +468,2 @@ Beware that all manually entered net ranges will be lost!</string>
468 <name>text</name> 468 <name>text</name>
469 <string>QTopia</string>
470 </property>
471 </item>
472 <item>
473 <property>
474 <name>text</name>
475 <string>IntelliSync</string>
476 </property>
477 </item>
478 <property stdset="1">
479 <name>name</name>
480 <cstring>syncapp</cstring>
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>
490 </widget>
491 <widget>
492 <class>QComboBox</class>
493 <item>
494 <property>
495 <name>text</name>
496 <string>Qtopia 1.7</string> 469 <string>Qtopia 1.7</string>
@@ -507,3 +480,3 @@ The default is Qtopia. It will let you log in with username "root" and password
507 <name>text</name> 480 <name>text</name>
508 <string>Both</string> 481 <string>IntelliSync</string>
509 </property> 482 </property>
@@ -514,2 +487,10 @@ The default is Qtopia. It will let you log in with username "root" and password
514 </property> 487 </property>
488 <property>
489 <name>whatsThis</name>
490 <string>Alter the Sync Protocol to tweak for the different devices.
491 IntelliSync will disable the password check but you'll be prompted to accept the connection.
492 Opie1.0 will be compatible with QtopiaDesktop, MultiSync and KitchenSync
493 Qtopia1.7 will alter the way data is send to the client and will not work with older clients.
494 </string>
495 </property>
515 </widget> 496 </widget>