From: David Shea dshea@redhat.com
Two of the conditionals around the grab_focus calls (password checkbox set but no password, full name set but username not set) are only possible via kickstart in which case the UI should be left alone anyway, and the default case is already handled by focusWidgetName. The sensitivity of the advanced button is handled by the input signal handlers and does not need to be doubled in refresh(). --- pyanaconda/ui/gui/spokes/user.py | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 5c20e3e..b8bc4e0 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -324,16 +324,6 @@ def refresh(self): self.pw.emit("changed") self.confirm.emit("changed")
- if self.username.get_text() and self.usepassword.get_active() and \ - self._user.password == "": - self.pw.grab_focus() - elif self.fullname.get_text(): - self.username.grab_focus() - else: - self.fullname.grab_focus() - - self.b_advanced.set_sensitive(bool(self._user.name)) - @property def status(self): if len(self.data.user.userList) == 0: