summaryrefslogtreecommitdiff
path: root/core/settings
Side-by-side diff
Diffstat (limited to 'core/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index c4726b3..00ea105 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -110,24 +110,28 @@ void Security::updateGUI()
void Security::show()
{
- valid=FALSE;
+ //valid=FALSE;
setEnabled(FALSE);
SecurityBase::show();
if ( passcode.isEmpty() ) {
// could insist...
//changePassCode();
//if ( passcode.isEmpty() )
//reject();
} else {
- QString pc = enterPassCode(tr("Enter passcode"));
- if ( pc != passcode ) {
- QMessageBox::critical(this, tr("Passcode incorrect"),
- tr("The passcode entered is incorrect.\nAccess denied"));
- reject();
- return;
- }
+
+ if (!valid) // security passcode was not asked yet, so ask now
+ {
+ QString pc = enterPassCode(tr("Enter passcode"));
+ if ( pc != passcode ) {
+ QMessageBox::critical(this, tr("Passcode incorrect"),
+ tr("The passcode entered is incorrect.\nAccess denied"));
+ reject();
+ return;
+ }
+ }
}
setEnabled(TRUE);
valid=TRUE;
}
@@ -212,15 +216,20 @@ void Security::loadUsers ( void )
passwd.close();
}
}
+
void Security::toggleAutoLogin(bool val)
{
autoLogin=val;
userlist->setEnabled(val);
if (!autoLogin)
autoLoginName=userlist->currentText();
}
+
+
+
+
void Security::setSyncNet(const QString& sn)
{
int auth_peer,auth_peer_bits;
parseNet(sn,auth_peer,auth_peer_bits);
@@ -229,8 +238,9 @@ void Security::setSyncNet(const QString& sn)
void Security::applySecurity()
{
if ( valid ) {
+<<<<<<< security.cpp
Config cfg("Security");
cfg.setGroup("Passcode");
cfg.writeEntry("passcode",passcode);
cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked());
@@ -261,8 +271,9 @@ void Security::applySecurity()
}
cfg.setGroup("SyncMode");
cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 );
+
}
}
void Security::changeLoginName( int idx )