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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux