diff --git a/ui/addhardware.ui b/ui/addhardware.ui index f45c0006..b4f7bca9 100644 --- a/ui/addhardware.ui +++ b/ui/addhardware.ui @@ -169,6 +169,7 @@ True False start + Device Type Field diff --git a/ui/addstorage.ui b/ui/addstorage.ui index 425d3459..a73eac13 100644 --- a/ui/addstorage.ui +++ b/ui/addstorage.ui @@ -10,12 +10,13 @@ True False - 4 + 6 - + True False - 6 + vertical + 3 True @@ -24,6 +25,7 @@ 0 True True + config-storage-select True @@ -31,49 +33,60 @@ C_reate a disk image on the computer's hard drive True True - config-storage-create - False + True True 0 - - - False - False - 0 - - - - - True - False - 6 - 22 - + True False - 4 + 22 - + True False - 6 + 4 - + True - True - 5 - 0.0 - 1 - adjustment1 - 1 - 1 + False + 6 + + + True + True + 5 + 0.0 + 1 + adjustment1 + 1 + 1 + + + False + False + 0 + + + + + True + False + _GB + True + + + False + True + 1 + + False @@ -82,92 +95,78 @@ - + True False - _GB - True - config-storage-size + 0 + <span color='#484848'>Free Space</span> + True False - True + False 1 - - - False - False - 0 - - - - - True - False - 0 - <span color='#484848'>Free Space</span> - True - - - False - False - 1 - - - - - True - False - 6 - - _Allocate entire disk now - True - True - False - True - 0 - True - - - False - True - 0 - - - - + True False - Fully allocating storage may take longer now, but the OS install phase will be quicker. + 6 + + + _Allocate entire disk now + True + True + False + True + 0 + True + + + False + True + 0 + + + + + True + False + Fully allocating storage may take longer now, but the OS install phase will be quicker. Skipping allocation can also cause space issues on the host machine, if the maximum image size exceeds available storage space. Tip: Storage format qcow2 and qed do not support full allocation. - gtk-info + gtk-info + + + False + True + 1 + + False - True - 1 + False + 2 - - False - False - 2 - + + False + False + 1 + - False - False - 1 + True + True + 0 @@ -181,7 +180,6 @@ Tip: Storage format qcow2 and qed do not support full allocation. False 0 True - config-storage-create diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 18f2aef9..1e915057 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -98,6 +98,7 @@ class vmmAddHardware(vmmGObjectUI): "on_hw_list_changed": self.hw_selected, "on_config_storage_bustype_changed": self.populate_disk_device, + "on_config_storage_devtype_changed": self.change_storage_devtype, "on_mac_address_clicked" : self.change_macaddr_use, @@ -766,7 +767,6 @@ class vmmAddHardware(vmmGObjectUI): if len(model) > 0: widget.set_active(0) - def populate_disk_device(self, src): ignore = src @@ -797,7 +797,6 @@ class vmmAddHardware(vmmGObjectUI): if len(model) > 0: devlist.set_active(0) - def populate_input_model(self, model): model.clear() model.append([_("EvTouch USB Graphics Tablet"), "tablet", "usb"]) @@ -1096,6 +1095,14 @@ class vmmAddHardware(vmmGObjectUI): act = src.get_active() self.populate_disk_format_combo_wrapper(not act) + def change_storage_devtype(self, ignore): + devtype = self.get_config_disk_device() + allow_create = devtype not in ["cdrom", "floppy"] + self.addstorage.widget("config-storage-create-box").set_sensitive( + allow_create) + if not allow_create: + self.addstorage.widget("config-storage-select").set_active(True) + # Network listeners def change_macaddr_use(self, ignore=None): if self.widget("mac-address").get_active(): diff --git a/virtManager/addstorage.py b/virtManager/addstorage.py index 2d15a57e..9204ee47 100644 --- a/virtManager/addstorage.py +++ b/virtManager/addstorage.py @@ -191,6 +191,7 @@ class vmmAddStorage(vmmGObjectUI): self.widget("config-storage-size").set_value(8) self.widget("config-storage-entry").set_text("") self.widget("config-storage-nosparse").set_active(True) + self.widget("config-storage-create-box").set_sensitive(True) fmt = self.conn.get_default_storage_format() can_alloc = fmt in ["raw"]