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 <[EMAIL PROTECTED]>

--- 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
[email protected]
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Reply via email to