summaryrefslogtreecommitdiff
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2017-09-15 15:36:44 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2017-09-15 15:36:44 +0200
commitfd852c755d0ce0df02bc85b1ebd5285ce5b08261 (patch)
tree73cdd76fe0cb41766371d936dfc6d93f45cabb32
parentf9fc2e1a5b0e75b68d8310d93afcaa5d071e4051 (diff)
Reset num_retry_auth_ when we show the swith-to-greeter button.
(bzr r4253.3.3)
-rw-r--r--lockscreen/UserPromptView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lockscreen/UserPromptView.cpp b/lockscreen/UserPromptView.cpp
index 011bb0d4f..7a083632d 100644
--- a/lockscreen/UserPromptView.cpp
+++ b/lockscreen/UserPromptView.cpp
@@ -487,7 +487,6 @@ void UserPromptView::StartAuthentication()
void UserPromptView::DoUnlock()
{
- num_retry_auth_ = 0;
session_manager_->unlock_requested.emit();
}
@@ -505,13 +504,14 @@ void UserPromptView::HandleAuthenticationStartFailure()
}
else
{
+ num_retry_auth_ = 0;
+
AddMessage(_("Authentication failure"), nux::color::Red);
AddButton(_("Switch to greeter…"), [this] {
session_manager_->SwitchToGreeter();
});
GetLayout()->AddLayout(button_layout_);
}
-
}
}