Show password window in first time enabling password

This commit is contained in:
Bilal Elmoussaoui 2016-06-01 13:36:45 +02:00
parent eb9accceda
commit 4d24d767b4

View file

@ -157,6 +157,10 @@ class SettingsWindow(Gtk.Window):
"""
self.password_button.set_sensitive(switch.get_active())
self.cfg.update("state", switch.get_active(), "login")
if switch.get_active():
password = self.cfg.read("password", "login")
if len(password) == 0:
self.new_password_window()
self.parent.refresh_window()
@ -172,4 +176,4 @@ class SettingsWindow(Gtk.Window):
Close the window
"""
self.hide()
return True
return True