Diffstat (limited to 'core/settings/security/security.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/security/security.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index 75a181b..c4726b3 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp | |||
@@ -20,12 +20,13 @@ | |||
20 | #include "security.h" | 20 | #include "security.h" |
21 | 21 | ||
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | #include <qpe/password.h> | 24 | #include <qpe/password.h> |
25 | #include <qpe/qpedialog.h> | 25 | #include <qpe/qpedialog.h> |
26 | #include <qpe/qcopenvelope_qws.h> | ||
26 | 27 | ||
27 | #include <qcheckbox.h> | 28 | #include <qcheckbox.h> |
28 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
29 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
30 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
31 | #include <qfile.h> | 32 | #include <qfile.h> |
@@ -69,12 +70,15 @@ | |||
69 | if (autoLoginName.stripWhiteSpace().isEmpty()) { | 70 | if (autoLoginName.stripWhiteSpace().isEmpty()) { |
70 | autoLogin=false; | 71 | autoLogin=false; |
71 | } else { | 72 | } else { |
72 | autoLogin=true; | 73 | autoLogin=true; |
73 | } | 74 | } |
74 | 75 | ||
76 | cfg.setGroup("SyncMode"); | ||
77 | int mode = cfg.readNumEntry("Mode",2); // Default to Sharp | ||
78 | syncModeCombo->setCurrentItem( mode - 1 ); | ||
75 | 79 | ||
76 | connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); | 80 | connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); |
77 | connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); | 81 | connect(userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); |
78 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); | 82 | connect(changepasscode,SIGNAL(clicked()), this, SLOT(changePassCode())); |
79 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); | 83 | connect(clearpasscode,SIGNAL(clicked()), this, SLOT(clearPassCode())); |
80 | 84 | ||
@@ -129,12 +133,13 @@ void Security::show() | |||
129 | } | 133 | } |
130 | 134 | ||
131 | void Security::accept() | 135 | void Security::accept() |
132 | { | 136 | { |
133 | applySecurity(); | 137 | applySecurity(); |
134 | QDialog::accept(); | 138 | QDialog::accept(); |
139 | QCopEnvelope env("QPE/System", "securityChanged()" ); | ||
135 | } | 140 | } |
136 | 141 | ||
137 | void Security::done(int r) | 142 | void Security::done(int r) |
138 | { | 143 | { |
139 | QDialog::done(r); | 144 | QDialog::done(r); |
140 | close(); | 145 | close(); |
@@ -252,12 +257,14 @@ void Security::applySecurity() | |||
252 | if (autoLogin) { | 257 | if (autoLogin) { |
253 | loginCfg.writeEntry("AutoLogin",autoLoginName); | 258 | loginCfg.writeEntry("AutoLogin",autoLoginName); |
254 | } else { | 259 | } else { |
255 | loginCfg.removeEntry("AutoLogin"); | 260 | loginCfg.removeEntry("AutoLogin"); |
256 | } | 261 | } |
257 | 262 | ||
263 | cfg.setGroup("SyncMode"); | ||
264 | cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 ); | ||
258 | } | 265 | } |
259 | } | 266 | } |
260 | 267 | ||
261 | void Security::changeLoginName( int idx ) | 268 | void Security::changeLoginName( int idx ) |
262 | { | 269 | { |
263 | autoLoginName = userlist->text(idx);; | 270 | autoLoginName = userlist->text(idx);; |