diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-18 15:54:06 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-18 15:54:06 -0500 |
commit | 9ea67803526cec0439175b8dc2ee5f0e7b87bc89 (patch) | |
tree | ab6d82eb81e1794f99d4665a3b4f99db36a704bb /tdmlib/kgreet_pam.cpp | |
parent | 46d9df235b2b98b057e2bc9719b7d3416bd5438f (diff) | |
download | tdebase-9ea67803526cec0439175b8dc2ee5f0e7b87bc89.tar.gz tdebase-9ea67803526cec0439175b8dc2ee5f0e7b87bc89.zip |
Stabilize cryptographic card login
Fix some coding style issues
Diffstat (limited to 'tdmlib/kgreet_pam.cpp')
-rw-r--r-- | tdmlib/kgreet_pam.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/tdmlib/kgreet_pam.cpp b/tdmlib/kgreet_pam.cpp index 97d19afde..7fcfafc8b 100644 --- a/tdmlib/kgreet_pam.cpp +++ b/tdmlib/kgreet_pam.cpp @@ -88,7 +88,8 @@ KPamGreeter::KPamGreeter( KGreeterPluginHandler *_handler, ctx( _ctx ), exp( -1 ), pExp( -1 ), - running( false ) + running( false ), + suppressInfoMsg(false) { ctx = Login; @@ -287,6 +288,10 @@ KPamGreeter::setEnabled(bool enable) authEdit[0]->setFocus(); } +void KPamGreeter::setInfoMessageDisplay(bool enable) { + suppressInfoMsg = !enable; +} + void // private KPamGreeter::returnData() { @@ -319,17 +324,22 @@ KPamGreeter::returnData() bool // virtual KPamGreeter::textMessage( const char *text, bool err ) { - kg_debug(" ************** textMessage(%s, %d)\n", text, err); + kg_debug(" ************** textMessage(%s, %d)\n", text, err); - if (!authEdit.size()) - return false; + if (!authEdit.size()) { + return false; + } - if (getLayoutItem()) { - TQLabel* label = new TQLabel(TQString::fromUtf8(text), m_parentWidget); - getLayoutItem()->addWidget(label, state+1, 0, 0); - } + if (!err && suppressInfoMsg) { + return true; + } - return true; + if (getLayoutItem()) { + TQLabel* label = new TQLabel(TQString::fromUtf8(text), m_parentWidget); + getLayoutItem()->addWidget(label, state+1, 0, 0); + } + + return true; } void // virtual |