details: Disable storage format changer if creating storage from New VM

So users don't think they can choose the new storage format from this
dialog
This commit is contained in:
Cole Robinson
2011-03-09 10:36:21 -05:00
parent 0b9c6fab97
commit 7da8f0a47d

View File

@@ -2114,6 +2114,8 @@ class vmmDetails(vmmGObjectUI):
idx = disk.disk_bus_index
cache = disk.driver_cache
driver_type = disk.driver_type or ""
show_format = (disk.path_exists(disk.conn, disk.path) or not
self.is_customize_dialog)
size = _("Unknown")
if not path:
@@ -2140,6 +2142,8 @@ class vmmDetails(vmmGObjectUI):
self.window.get_widget("disk-shareable").set_active(share)
self.window.get_widget("disk-size").set_text(size)
self.set_combo_label("disk-cache", 0, cache)
self.window.get_widget("disk-format").set_sensitive(show_format)
self.window.get_widget("disk-format").child.set_text(driver_type)
no_default = not self.is_customize_dialog