Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 28 |
1 files changed, 23 insertions, 5 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 | |||
@@ -196,11 +196,29 @@ bool SyncAuthentication::checkPassword( const QString& password ) | |||
196 | Config cfg("Security"); | 196 | Config cfg("Security"); |
197 | cfg.setGroup("Sync"); | 197 | cfg.setGroup("SyncMode"); |
198 | QString syncapp = cfg.readEntry("syncapp","Qtopia"); | 198 | int mode = cfg.readNumEntry("Mode", 0x02 ); |
199 | 199 | ||
200 | //No password needed if the user really wants it | 200 | //No pass word needed if the user really needs it |
201 | if (syncapp == "IntelliSync") { | 201 | if (mode & 0x04) { |
202 | QMessageBox unauth( | ||
203 | tr("Sync Connection"), | ||
204 | tr("<qt><p>An unauthorized system is requesting access to this device." | ||
205 | "<p>You chose IntelliSync so you may I allow or deny this connection.</qt>" ), | ||
206 | QMessageBox::Warning, | ||
207 | QMessageBox::Ok, QMessageBox::Cancel|QMessageBox::Default, QMessageBox::NoButton, | ||
208 | 0, QString::null, TRUE, WStyle_StaysOnTop); | ||
209 | unauth.setButtonText(QMessageBox::Ok, tr("Allow" ) ); | ||
210 | unauth.setButtonText(QMessageBox::Cancel, tr("Deny")); | ||
211 | switch( unauth.exec() ) { | ||
212 | case QMessageBox::Ok: | ||
202 | return TRUE; | 213 | return TRUE; |
214 | break; | ||
215 | case QMessageBox::Cancel: | ||
216 | default: | ||
217 | denials++; | ||
218 | lastdenial=now; | ||
219 | return FALSE; | ||
220 | } | ||
203 | } | 221 | } |
204 | 222 | ||
205 | // Detect old Qtopia Desktop (no password) | 223 | // Detect old Qtopia Desktop (no password) and fail |
206 | if ( password.isEmpty() ) { | 224 | if ( password.isEmpty() ) { |