Additional focus improvements

This commit is contained in:
Cole Robinson 2009-12-14 16:48:35 -05:00
parent 985dd91f26
commit 287ad90a90
7 changed files with 10 additions and 0 deletions

View File

@ -311,6 +311,7 @@ class vmmAddHardware(gobject.GObject):
# Hide the "finish" button until the appropriate time
self.window.get_widget("create-finish").hide()
self.window.get_widget("create-forward").show()
self.window.get_widget("create-forward").grab_focus()
self.window.get_widget("create-back").set_sensitive(False)
self.window.get_widget("storage-file-size").set_sensitive(False)
self.window.get_widget("create-help").hide()

View File

@ -173,6 +173,8 @@ class vmmCloneVM(gobject.GObject):
# Populate state
def reset_state(self):
self.window.get_widget("clone-cancel").grab_focus()
# Populate default clone values
self.setup_clone_info()

View File

@ -287,6 +287,7 @@ class vmmCreate(gobject.GObject):
# Name page state
self.window.get_widget("create-vm-name").set_text("")
self.window.get_widget("create-vm-name").grab_focus()
self.window.get_widget("method-local").set_active(True)
self.window.get_widget("create-conn").set_active(-1)
activeconn = self.populate_conn_list(urihint)

View File

@ -124,6 +124,7 @@ class vmmCreateNetwork(gobject.GObject):
# Hide the "finish" button until the appropriate time
self.window.get_widget("create-finish").hide()
self.window.get_widget("create-forward").show()
self.window.get_widget("create-forward").grab_focus()
self.window.get_widget("create-back").set_sensitive(False)
self.window.get_widget("net-name").set_text("")

View File

@ -127,6 +127,7 @@ class vmmCreateVolume(gobject.GObject):
def reset_state(self):
self.window.get_widget("vol-name").set_text(self.default_vol_name())
self.window.get_widget("vol-name").grab_focus()
self.window.get_widget("vol-create").set_sensitive(False)
self.populate_vol_format()
self.populate_vol_suffix()

View File

@ -98,6 +98,8 @@ class vmmDeleteDialog(gobject.GObject):
(_("Delete"), self.vm.get_name()))
self.window.get_widget("delete-main-label").set_markup(title_str)
self.window.get_widget("delete-cancel").grab_focus()
# Disable storage removal by default
self.window.get_widget("delete-remove-storage").set_active(False)
self.window.get_widget("delete-remove-storage").toggled()

View File

@ -121,6 +121,8 @@ class vmmMigrateDialog(gobject.GObject):
(_("Migrate"), self.vm.get_name()))
self.window.get_widget("migrate-main-label").set_markup(title_str)
self.window.get_widget("migrate-cancel").grab_focus()
name = self.vm.get_name()
srchost = self.conn.get_hostname()