Skip to content

Commit b930703

Browse files
committed
unlock.py: Don't show password entry and unlock button until
prompted by pam.
1 parent d7e4159 commit b930703

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unlock.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ def __init__(self):
171171

172172

173173
self.box.show_all()
174+
self.password_entry.hide()
175+
self.auth_unlock_button.hide()
174176

175177
def initialize_auth_client(self):
176178
return self.auth_client.initialize()
@@ -187,6 +189,9 @@ def on_authentication_failure(self, auth_client):
187189
self.set_busy(False)
188190
self.auth_message_label.set_text(_("Incorrect password"))
189191

192+
self.password_entry.hide()
193+
self.auth_unlock_button.hide()
194+
190195
self.emit("authenticate-failure")
191196
self.emit("uninhibit-timeout")
192197

@@ -211,6 +216,9 @@ def set_busy(self, busy):
211216
self.update_authinfo_label()
212217

213218
def on_authentication_prompt_changed(self, auth_client, prompt):
219+
self.password_entry.show_all()
220+
self.auth_unlock_button.show_all()
221+
214222
if "password:" in prompt.lower():
215223
prompt = _("Please enter your password...")
216224
else:

0 commit comments

Comments
 (0)