[PATCH][virt-manager] fix Delete button visibility

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

 



fix Delete button visibility

change Delete button visibility if selected vm is started/stopped, in the same way it's changed upon row selection

Signed-off-by: Alan Pevec <apevec@xxxxxxxxxx>

--- a/src/virtManager/manager.py        Thu Apr 03 19:12:20 2008 -0400
+++ b/src/virtManager/manager.py        Tue Apr 08 13:11:13 2008 +0200
@@ -475,8 +475,16 @@ class vmmManager(gobject.GObject):
                    del self.rows[vm.get_uuid()]
                break

-        if missing and wanted:
-            self._append_vm(model, vm, vm.get_connection())
+        if wanted:
+            if missing:
+                self._append_vm(model, vm, vm.get_connection())
+            elif vm.get_uuid() == self.current_vmuuid():
+                if vm.is_active():
+                    self.window.get_widget("vm-delete").set_sensitive(False)
+                else:
+                    self.window.get_widget("vm-delete").set_sensitive(True)
+
+


    def vm_resources_sampled(self, vm):

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

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux