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:
|
||||
return
|
||||
|
||||
# Let state handler listener change things if necc.
|
||||
self.set_pause_state(not src.get_active())
|
||||
|
||||
if not self.vm.is_paused():
|
||||
self.emit("action-suspend-domain",
|
||||
self.vm.get_connection().get_uri(),
|
||||
|
@ -1236,8 +1239,6 @@ class vmmDetails(vmmGObjectUI):
|
|||
self.vm.get_connection().get_uri(),
|
||||
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):
|
||||
self.emit("action-run-domain",
|
||||
|
|
|
@ -637,15 +637,15 @@ class vmmManager(vmmGObjectUI):
|
|||
|
||||
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:
|
||||
self.pause_vm(None)
|
||||
else:
|
||||
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):
|
||||
vm = self.current_vm()
|
||||
if vm is not None:
|
||||
|
|
Loading…
Reference in New Issue