summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp50
-rw-r--r--core/settings/security/security.cpp41
-rw-r--r--core/settings/security/security.h1
-rw-r--r--core/settings/security/securitybase.ui34
4 files changed, 99 insertions, 27 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 439e110..eea9f3a 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -195,22 +195,32 @@ 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)
- if ( password.isEmpty() ) {
- if ( denials < 1 || now > lastdenial+600 ) {
- QMessageBox unauth(
- tr("Sync Connection"),
- tr("<p>An unauthorized system is requesting access to this device."
- "<p>If you are using a version of Qtopia Desktop older than 1.5.1, "
- "please upgrade."),
- QMessageBox::Warning,
- QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
- 0, QString::null, TRUE, WStyle_StaysOnTop);
- unauth.setButtonText(QMessageBox::Cancel, tr("Deny"));
- unauth.exec();
-
- denials++;
- lastdenial=now;
- }
- return FALSE;
- }
+ if ( password.isEmpty() ) {
+ if ( denials < 3 || now > lastdenial+600 ) {
+ QMessageBox unauth(
+ tr("Sync Connection"),
+ tr("<p>An unauthorized system is requesting access to this device."
+ "<p>If you are using a version of Qtopia Desktop older than 1.5.1, "
+ "please upgrade or change the security setting to use IntelliSync." ),
+ QMessageBox::Warning,
+ QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
+ 0, QString::null, TRUE, WStyle_StaysOnTop);
+ unauth.setButtonText(QMessageBox::Cancel, tr("Deny"));
+ unauth.exec();
+
+ denials++;
+ lastdenial=now;
+ }
+ return FALSE;
+
+ }
@@ -221,3 +231,3 @@ bool SyncAuthentication::checkPassword( const QString& password )
- ++lock;
+ ++lock;
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 81363d2..1b90121 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -50,2 +50,12 @@
+ cfg.setGroup("Sync");
+ QString sa = cfg.readEntry("syncapp","Qtopia");
+
+ //There must be a better way to do that...
+ for (int i=0; i<syncapp->count(); i++) {
+ if ( syncapp->text(i) == sa ) {
+ syncapp->setCurrentItem(i);
+ }
+ }
+
/*
@@ -65,3 +75,3 @@
Config loginCfg(configFile,Config::File);
-
+
loginCfg.setGroup("General");
@@ -83,3 +93,4 @@
connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode()));
-
+ connect(syncapp,SIGNAL(activated(int)), this, SLOT(changeSyncApp()));
+
loadUsers();
@@ -106,4 +117,3 @@ void Security::updateGUI()
autologinToggle->setChecked(autoLogin);
- userlist->setEnabled(autoLogin);
-
+ userlist->setEnabled(autoLogin);
}
@@ -250,3 +260,5 @@ void Security::applySecurity()
cfg.writeEntry("auth_peer",auth_peer);
- cfg.writeEntry("auth_peer_bits",auth_peer_bits);
+ cfg.writeEntry("auth_peer_bits",auth_peer_bits);
+ cfg.writeEntry("syncapp",syncapp->currentText());
+
/*
@@ -272,2 +284,21 @@ void Security::applySecurity()
}
+void Security::changeSyncApp()
+{
+ // Don't say i didn't tell ya
+ if (syncapp->currentText() == "IntelliSync") {
+ QMessageBox attn(
+ tr("WARNING"),
+ tr("<p>Selecting IntelliSync here will disable the FTP password."
+ "<p>Every machine in your netrange will be able to sync with "
+ "your Zaurus!"),
+ QMessageBox::Warning,
+ QMessageBox::Cancel, QMessageBox::NoButton, QMessageBox::NoButton,
+ 0, QString::null, TRUE, WStyle_StaysOnTop);
+ attn.setButtonText(QMessageBox::Cancel, tr("Ok"));
+ attn.exec();
+ }
+ updateGUI();
+}
+
+
diff --git a/core/settings/security/security.h b/core/settings/security/security.h
index 52d56de..b1a3eca 100644
--- a/core/settings/security/security.h
+++ b/core/settings/security/security.h
@@ -48,2 +48,3 @@ private slots:
void toggleAutoLogin(bool);
+ void changeSyncApp();
diff --git a/core/settings/security/securitybase.ui b/core/settings/security/securitybase.ui
index 9fb63a8..934111e 100644
--- a/core/settings/security/securitybase.ui
+++ b/core/settings/security/securitybase.ui
@@ -13,3 +13,3 @@
<y>0</y>
- <width>329</width>
+ <width>321</width>
<height>483</height>
@@ -284,3 +284,3 @@
<name>margin</name>
- <number>6</number>
+ <number>11</number>
</property>
@@ -384,2 +384,32 @@
<widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Select your sync software</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>QTopia</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>IntelliSync</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>syncapp</cstring>
+ </property>
+ </widget>
+ <widget>
<class>QComboBox</class>