virt-manager/0009-details-Explicit-warn-that-format-doesn-t-change-ima.patch
Cole Robinson 8d445c7717 filesystem: Fix target validation when editing device (bz #1089422)
details: Explicit warn that 'format' doesn't change image format (bz #1089457)
snapshots: Fix screenshot with qxl+spice (bz #1089780)
Fix using storage when the directory name contains whitespace (bz #1091384)
packageutils: Fix install when one package is already installed (bz #1090181)
2014-04-29 14:40:46 -04:00

228 lines
17 KiB
Diff

From b52f1f0eb36a347971cb380f13044b549a92b9c4 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 21 Apr 2014 17:04:33 -0400
Subject: [PATCH] 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 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Mon Feb 24 22:09:46 2014 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
@@ -1919,12 +1919,12 @@
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-vcpus-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -2319,12 +2319,12 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
+ <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-vcpupin-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Affinity Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2553,12 +2553,12 @@
<property name="climb_rate">2</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-memory-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Memory Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -2602,12 +2602,12 @@
<property name="climb_rate">2</property>
<property name="numeric">True</property>
<property name="update_policy">if-valid</property>
+ <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
<child internal-child="accessible">
<object class="AtkObject" id="config-maxmem-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Max Memory Select</property>
</object>
</child>
- <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -3517,6 +3517,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
<property name="label" translatable="yes">Storage forma_t:</property>
<property name="use_underline">True</property>
</object>
@@ -3558,25 +3560,6 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="disk-format">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_entry">True</property>
- <signal name="changed" handler="on_disk_format_changed" swapped="no"/>
- <child internal-child="entry">
- <object class="GtkEntry" id="combobox-entry9">
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkComboBox" id="disk-bus">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -3610,6 +3593,77 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="box15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkComboBox" id="disk-format">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_entry">True</property>
+ <signal name="changed" handler="on_disk_format_changed" swapped="no"/>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="combobox-entry9">
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="disk-format-warn">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-dialog-warning</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;small&gt;Changing this will not change the disk image format, it only tells libvirt about the existing image format. &lt;/small&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">30</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
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