[virt-tools-list] [virt-manager PATCH 2/5] details: Disallow removing video device if graphics devices exist

Lin Ma lma at suse.com
Wed Jul 18 10:00:20 UTC 2018


Signed-off-by: Lin Ma <lma at suse.com>
---
 virtManager/details.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtManager/details.py b/virtManager/details.py
index 4b145602..e3edbe86 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -3001,6 +3001,11 @@ class vmmDetails(vmmGObjectUI):
         else:
             self.widget("video-3d").set_active(vid.accel3d)
 
+        can_remove = True
+        if self.vm.xmlobj.devices.graphics:
+            can_remove = False
+        self.widget("config-remove").set_sensitive(can_remove)
+
     def refresh_watchdog_page(self):
         watch = self.get_hw_selection(HW_LIST_COL_DEVICE)
         if not watch:
-- 
2.16.2




More information about the virt-tools-list mailing list