summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockdlg.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2015-09-18 23:01:01 -0500
committerTimothy Pearson <[email protected]>2015-09-18 23:01:01 -0500
commit6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9 (patch)
treee30e480a7524c15acd02901d3e6f0e48a9f6a12b /kdesktop/lock/lockdlg.cc
parent1ec002a8ee0c9165bedbcb6e273d9bacb0588e47 (diff)
downloadtdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.tar.gz
tdebase-6f5e7b211009bf3a5b6816ee3cb064d7f393dfb9.zip
Streamline cryptographic card logon process
Diffstat (limited to 'kdesktop/lock/lockdlg.cc')
-rw-r--r--kdesktop/lock/lockdlg.cc26
1 files changed, 24 insertions, 2 deletions
diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc
index 59ad23f28..3ae0efaa4 100644
--- a/kdesktop/lock/lockdlg.cc
+++ b/kdesktop/lock/lockdlg.cc
@@ -276,6 +276,10 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
mLayoutButton->hide(); // no kxkb running
}
capsLocked();
+
+ if (static_cast< LockProcess* >(parent())->cryptographicCardDevice()) {
+ attemptCardLogin();
+ }
}
PasswordDlg::~PasswordDlg()
@@ -954,14 +958,32 @@ void PasswordDlg::attemptCardLogin() {
greet->setInfoMessageDisplay(false);
validUserCardInserted = true;
- greet->start();
- greet->next();
+ greet->setPasswordPrompt(i18n("PIN:"));
+
+ // Force relayout
+ setFixedSize(sizeHint().width(), sizeHint().height() + 1);
+ setFixedSize(sizeHint());
+
+ // Attempt authentication if configured
+ TDECryptographicCardDevice* cdevice = static_cast< LockProcess* >(parent())->cryptographicCardDevice();
+ if (cdevice) {
+ TQString autoPIN = cdevice->autoPIN();
+ if (autoPIN != TQString::null) {
+ greet->setPassword(autoPIN);
+ greet->next();
+ }
+ }
}
void PasswordDlg::resetCardLogin() {
validUserCardInserted = false;
greet->abort();
greet->start();
+ greet->setPasswordPrompt(TQString::null);
+
+ // Force relayout
+ setFixedSize(sizeHint().width(), sizeHint().height() + 1);
+ setFixedSize(sizeHint());
// Restore information message display settings
greet->setInfoMessageDisplay(showInfoMessages);