File virtman-prevent-double-click-starting-vm-twice.patch of Package virt-manager.2133

Reference: bnc#874594
When the 'Power on virtual machine' button is double clicked,
virt-manager issues two start commands to start the VM which
results in a failure. There is code elsewhere to desensitize the
button but this patch does it earlier.
Index: virt-manager-1.2.1/virtManager/details.py
===================================================================
--- virt-manager-1.2.1.orig/virtManager/details.py
+++ virt-manager-1.2.1/virtManager/details.py
@@ -1465,6 +1465,9 @@ class vmmDetails(vmmGObjectUI):
         self.widget("details-menu-usb-redirection").set_sensitive(can_usb)
 
     def control_vm_run(self, src_ignore):
+        # De-sensitize widget so a double click on the icon won't attempt to
+        # start the VM twice
+        self.widget("control-run").set_sensitive(False)
         self.emit("action-run-domain",
                   self.vm.conn.get_uri(), self.vm.get_connkey())
 
openSUSE Build Service is sponsored by