From: Cole Robinson Date: Mon, 21 Apr 2014 17:04:33 -0400 Subject: [PATCH virt-manager] details: Explicit warn that 'format' doesn't change image format (bz 1089457) (cherry picked from commit 70da20682c9aba1e2bc738b19dfc6bb714d38496) --- ui/details.ui | 104 +++++++++++++++++++++++++++++++++++++------------ virtManager/details.py | 7 +++- 2 files changed, 85 insertions(+), 26 deletions(-) diff --git a/ui/details.ui b/ui/details.ui index 044654d..92de903 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -1,7 +1,7 @@ - + - + 1 @@ -1919,12 +1919,12 @@ 1 True if-valid + Virtual CPU Select - 1 @@ -2319,12 +2319,12 @@ True True + Virtual CPU Affinity Select - False @@ -2553,12 +2553,12 @@ 2 True if-valid + Memory Select - False @@ -2602,12 +2602,12 @@ 2 True if-valid + Max Memory Select - False @@ -3517,6 +3517,8 @@ True False 1 + 0 + 4 Storage forma_t: True @@ -3558,25 +3560,6 @@ - - True - False - True - - - - True - - - - - 1 - 2 - 1 - 1 - - - True False @@ -3610,6 +3593,77 @@ 1 + + + True + False + vertical + 6 + + + True + False + True + + + + True + + + + + False + True + 0 + + + + + True + False + 3 + + + True + False + gtk-dialog-warning + + + False + True + 0 + + + + + True + False + <small>Changing this will not change the disk image format, it only tells libvirt about the existing image format. </small> + True + True + 30 + + + False + False + 1 + + + + + False + True + 1 + + + + + 1 + 2 + 1 + 1 + + False diff --git a/virtManager/details.py b/virtManager/details.py index 10b03ce..1bb57d5 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -625,7 +625,7 @@ class vmmDetails(vmmGObjectUI): "on_disk_cache_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_CACHE), "on_disk_io_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_IO), "on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS), - "on_disk_format_changed": lambda *x: self.enable_apply(x, EDIT_DISK_FORMAT), + "on_disk_format_changed": self.disk_format_changed, "on_disk_serial_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SERIAL), "on_disk_iotune_changed": self.iotune_changed, @@ -1787,6 +1787,10 @@ class vmmDetails(vmmGObjectUI): boot_list.get_selection().emit("changed") self.enable_apply(EDIT_BOOTORDER) + def disk_format_changed(self, ignore): + self.widget("disk-format-warn").show() + self.enable_apply(EDIT_DISK_FORMAT) + # IO Tuning def iotune_changed(self, ignore): iotune_rbs = int(self.get_text("disk-iotune-rbs") or 0) @@ -2682,6 +2686,7 @@ class vmmDetails(vmmGObjectUI): self.widget("disk-format").set_sensitive(show_format) self.widget("disk-format").get_child().set_text(driver_type) + self.widget("disk-format-warn").hide() no_default = not self.is_customize_dialog