mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-27 14:03:57 +03:00
More pause button state fixes
Make sure we reset the pause button state _before_ we invoke the operation, otherwise we might overwrite the already updated state
This commit is contained in:
parent
6590233b7e
commit
7e211aa151
@ -1227,6 +1227,9 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
if self.ignorePause:
|
if self.ignorePause:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Let state handler listener change things if necc.
|
||||||
|
self.set_pause_state(not src.get_active())
|
||||||
|
|
||||||
if not self.vm.is_paused():
|
if not self.vm.is_paused():
|
||||||
self.emit("action-suspend-domain",
|
self.emit("action-suspend-domain",
|
||||||
self.vm.get_connection().get_uri(),
|
self.vm.get_connection().get_uri(),
|
||||||
@ -1236,8 +1239,6 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
self.vm.get_connection().get_uri(),
|
self.vm.get_connection().get_uri(),
|
||||||
self.vm.get_uuid())
|
self.vm.get_uuid())
|
||||||
|
|
||||||
# Let state handler listener change things if necc.
|
|
||||||
self.set_pause_state(not src.get_active())
|
|
||||||
|
|
||||||
def control_vm_run(self, src_ignore):
|
def control_vm_run(self, src_ignore):
|
||||||
self.emit("action-run-domain",
|
self.emit("action-run-domain",
|
||||||
|
@ -637,15 +637,15 @@ class vmmManager(vmmGObjectUI):
|
|||||||
|
|
||||||
do_pause = src.get_active()
|
do_pause = src.get_active()
|
||||||
|
|
||||||
|
# Set button state back to original value: just let the status
|
||||||
|
# update function fix things for us
|
||||||
|
self.set_pause_state(not do_pause)
|
||||||
|
|
||||||
if do_pause:
|
if do_pause:
|
||||||
self.pause_vm(None)
|
self.pause_vm(None)
|
||||||
else:
|
else:
|
||||||
self.resume_vm(None)
|
self.resume_vm(None)
|
||||||
|
|
||||||
# Set button state back to original value: just let the status
|
|
||||||
# update function fix things for us
|
|
||||||
self.set_pause_state(not do_pause)
|
|
||||||
|
|
||||||
def start_vm(self, ignore):
|
def start_vm(self, ignore):
|
||||||
vm = self.current_vm()
|
vm = self.current_vm()
|
||||||
if vm is not None:
|
if vm is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user