summaryrefslogtreecommitdiff
path: root/core/launcher/transferserver.cpp
authorzecke <zecke>2004-02-21 13:09:17 (UTC)
committer zecke <zecke>2004-02-21 13:09:17 (UTC)
commit4024cfd1e32a43d82361d6ba9977fe64db88e3ce (patch) (side-by-side diff)
tree1d2e0592a3df330a17d9a07cd2f29615ce5be595 /core/launcher/transferserver.cpp
parentaa11789fc4d735a04fac09063851753d8a57027b (diff)
downloadopie-4024cfd1e32a43d82361d6ba9977fe64db88e3ce.zip
opie-4024cfd1e32a43d82361d6ba9977fe64db88e3ce.tar.gz
opie-4024cfd1e32a43d82361d6ba9977fe64db88e3ce.tar.bz2
Fix up syncing mode
InetlliSync,Opie1.0,QtopiaNEW
Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp36
1 files changed, 27 insertions, 9 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 9cb9d7a..8367a62 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -194,15 +194,33 @@ bool SyncAuthentication::checkPassword( const QString& password )
int now = time(0);
Config cfg("Security");
- cfg.setGroup("Sync");
- QString syncapp = cfg.readEntry("syncapp","Qtopia");
-
- //No password needed if the user really wants it
- if (syncapp == "IntelliSync") {
- return TRUE;
- }
-
- // Detect old Qtopia Desktop (no password)
+ cfg.setGroup("SyncMode");
+ int mode = cfg.readNumEntry("Mode", 0x02 );
+
+ //No pass word needed if the user really needs it
+ if (mode & 0x04) {
+ QMessageBox unauth(
+ tr("Sync Connection"),
+ tr("<qt><p>An unauthorized system is requesting access to this device."
+ "<p>You chose IntelliSync so you may I allow or deny this connection.</qt>" ),
+ QMessageBox::Warning,
+ QMessageBox::Ok, QMessageBox::Cancel|QMessageBox::Default, QMessageBox::NoButton,
+ 0, QString::null, TRUE, WStyle_StaysOnTop);
+ unauth.setButtonText(QMessageBox::Ok, tr("Allow" ) );
+ unauth.setButtonText(QMessageBox::Cancel, tr("Deny"));
+ switch( unauth.exec() ) {
+ case QMessageBox::Ok:
+ return TRUE;
+ break;
+ case QMessageBox::Cancel:
+ default:
+ denials++;
+ lastdenial=now;
+ return FALSE;
+ }
+ }
+
+ // Detect old Qtopia Desktop (no password) and fail
if ( password.isEmpty() ) {
if ( denials < 3 || now > lastdenial+600 ) {
QMessageBox unauth(