console: Fix password entry grab_focus

This commit is contained in:
Cole Robinson 2015-04-12 12:43:29 -04:00
parent f013453999
commit 4e47cc9061

View File

@ -556,23 +556,23 @@ class vmmConsolePages(vmmGObjectUI):
self.widget("console-auth-username").set_visible(withUsername)
self.widget("label-auth-username").set_visible(withUsername)
if withUsername:
self.widget("console-auth-username").grab_focus()
else:
self.widget("console-auth-password").grab_focus()
self.widget("console-auth-username").set_text(username)
self.widget("console-auth-password").set_text(pw)
self.widget("console-auth-remember").set_sensitive(
bool(self.config.has_keyring()))
if self.config.has_keyring():
self.widget("console-auth-remember").set_active(bool(pw and
username))
self.widget("console-auth-remember").set_active(
bool(pw and username))
self.widget("console-pages").set_current_page(
self.CONSOLE_PAGE_AUTHENTICATE)
if withUsername:
self.widget("console-auth-username").grab_focus()
else:
self.widget("console-auth-password").grab_focus()
def _activate_viewer_page(self):
self.widget("console-pages").set_current_page(self.CONSOLE_PAGE_VIEWER)
self.widget("details-menu-vm-screenshot").set_sensitive(True)