Commit e057f216 authored by segfault's avatar segfault

Greeter: Fix AttributeError

Now that settings can be loaded from persistence, it's possible that a
setting's popover is opened without the add-setting-dialog ever being
created.
parent 8c270a8b
......@@ -134,14 +134,16 @@ class AdminSettingUI(AdditionalSetting):
def cb_entry_admin_changed(self, editable, user_data=None):
self.update_check_icon()
passwords_match = self.passwords_match()
self.dialog.button_add.set_sensitive(passwords_match)
if passwords_match:
self.password = self.password_entry.get_text()
if self.dialog:
self.dialog.button_add.set_sensitive(passwords_match)
return False
def cb_entry_admin_activate(self, widget, user_data=None):
if not self.passwords_match():
self.dialog.button_add.set_sensitive(False)
if self.dialog:
self.dialog.button_add.set_sensitive(False)
self.password_verify_entry.grab_focus()
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment