summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2004-02-21 13:08:34 (UTC)
committer zecke <zecke>2004-02-21 13:08:34 (UTC)
commitaa11789fc4d735a04fac09063851753d8a57027b (patch) (unidiff)
tree45a4de1ff38a8a5df0838bc5ebb021e297d669d8 /core
parent6155f1be5c19fc51a4929c9e173f9e5a24d193e6 (diff)
downloadopie-aa11789fc4d735a04fac09063851753d8a57027b.zip
opie-aa11789fc4d735a04fac09063851753d8a57027b.tar.gz
opie-aa11789fc4d735a04fac09063851753d8a57027b.tar.bz2
Yeah baby yeah remove IntelliSync support
and add it to the SyncMode... as it should have been done Keep compatible with the old ored meaning... Now we can have IntelliSync plain text transfer, ask for pw less on connect Opie 1.0 plain text transfer, need pw and allow for syncing Qtopia 1.7 base64 transter , need pw and allow for syncing
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/security/security.cpp62
-rw-r--r--core/settings/security/security.h1
-rw-r--r--core/settings/security/securitybase.ui39
3 files changed, 42 insertions, 60 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
@@ -45,20 +45,13 @@
45 int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); 45 int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24);
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&)),
49 this, SLOT(setSyncNet(const QString&))); 49 this, SLOT(setSyncNet(const QString&)));
50 50
51 cfg.setGroup("Sync");
52 QString sa = cfg.readEntry("syncapp","Qtopia");
53 51
54 for (int i=0; i<syncapp->count(); i++) {
55 if ( syncapp->text(i) == sa ) {
56 syncapp->setCurrentItem(i);
57 }
58 }
59 52
60 /* 53 /*
61 cfg.setGroup("Remote"); 54 cfg.setGroup("Remote");
62 if ( telnetAvailable() ) 55 if ( telnetAvailable() )
63 telnet->setChecked(cfg.readEntry("allow_telnet")); 56 telnet->setChecked(cfg.readEntry("allow_telnet"));
64 else 57 else
@@ -81,23 +74,30 @@
81 } else { 74 } else {
82 autoLogin=true; 75 autoLogin=true;
83 } 76 }
84 77
85 cfg.setGroup("SyncMode"); 78 cfg.setGroup("SyncMode");
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 ) {
81 case 0x01:
82 syncModeCombo->setCurrentItem( 0 );
83 break;
84 case 0x02:
85 default:
86 syncModeCombo->setCurrentItem( 1 );
87 break;
88 case 0x04:
89 syncModeCombo->setCurrentItem( 2 );
90 break;
91 }
88 92
89 //since nobody knows what this is and it doesn't do anything, i'll hide it # CoreDump
90 // is this work-in-progress or can it be removed?
91 syncModeCombo->hide();
92 93
93 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 94 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
94 connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); 95 connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
95 connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); 96 connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode()));
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();
102 updateGUI(); 102 updateGUI();
103 103
@@ -127,12 +127,13 @@ void Security::restoreDefaults()
127 127
128 if ( unrecbox.exec() == QMessageBox::Yes) 128 if ( unrecbox.exec() == QMessageBox::Yes)
129 { 129 {
130 syncnet->clear(); 130 syncnet->clear();
131 insertDefaultRanges(); 131 insertDefaultRanges();
132 } 132 }
133 syncModeCombo->setCurrentItem( 2 );
133} 134}
134 135
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" ) );
138 syncnet->insertItem( tr( "192.168.1.0/24" ) ); 139 syncnet->insertItem( tr( "192.168.1.0/24" ) );
@@ -343,13 +344,30 @@ void Security::applySecurity()
343 for (int i=0; i<10; i++) { 344 for (int i=0; i<10; i++) {
344 QString target; 345 QString target;
345 target.sprintf("net%d", i); 346 target.sprintf("net%d", i);
346 cfg.writeEntry(target,syncnet->text(i)); 347 cfg.writeEntry(target,syncnet->text(i));
347 } 348 }
348 349
349 cfg.writeEntry("syncapp",syncapp->currentText()); 350#ifdef ODP
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 );
350 368
351 /* 369 /*
352 cfg.setGroup("Remote"); 370 cfg.setGroup("Remote");
353 if ( telnetAvailable() ) 371 if ( telnetAvailable() )
354 cfg.writeEntry("allow_telnet",telnet->isChecked()); 372 cfg.writeEntry("allow_telnet",telnet->isChecked());
355 if ( sshAvailable() ) 373 if ( sshAvailable() )
@@ -366,29 +384,13 @@ void Security::applySecurity()
366 } else { 384 } else {
367 loginCfg.removeEntry("AutoLogin"); 385 loginCfg.removeEntry("AutoLogin");
368 } 386 }
369 387
370 } 388 }
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
390 392
391 393
392void Security::changeLoginName( int idx ) 394void Security::changeLoginName( int idx )
393{ 395{
394 autoLoginName = userlist->text(idx);; 396 autoLoginName = userlist->text(idx);;
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
@@ -43,13 +43,12 @@ protected:
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();
50 void restoreDefaults(); 49 void restoreDefaults();
51 void insertDefaultRanges(); 50 void insertDefaultRanges();
52 void deleteListEntry(); 51 void deleteListEntry();
53 52
54private: 53private:
55 void loadUsers(void); 54 void loadUsers(void);
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
@@ -8,13 +8,13 @@
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>309</width> 14 <width>327</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>
@@ -463,58 +463,39 @@ Beware that all manually entered net ranges will be lost!</string>
463 </widget> 463 </widget>
464 <widget> 464 <widget>
465 <class>QComboBox</class> 465 <class>QComboBox</class>
466 <item> 466 <item>
467 <property> 467 <property>
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>
497 </property> 470 </property>
498 </item> 471 </item>
499 <item> 472 <item>
500 <property> 473 <property>
501 <name>text</name> 474 <name>text</name>
502 <string>Opie 1.0</string> 475 <string>Opie 1.0</string>
503 </property> 476 </property>
504 </item> 477 </item>
505 <item> 478 <item>
506 <property> 479 <property>
507 <name>text</name> 480 <name>text</name>
508 <string>Both</string> 481 <string>IntelliSync</string>
509 </property> 482 </property>
510 </item> 483 </item>
511 <property stdset="1"> 484 <property stdset="1">
512 <name>name</name> 485 <name>name</name>
513 <cstring>syncModeCombo</cstring> 486 <cstring>syncModeCombo</cstring>
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>
516 </vbox> 497 </vbox>
517 </widget> 498 </widget>
518 </grid> 499 </grid>
519 </widget> 500 </widget>
520 </widget> 501 </widget>