- Removed unnedeed calls to vms_in_table[vm.qid].update()
- Fixed unpause case where it was not properly updated
This commit is contained in:
parent
5e6c0539c2
commit
bfc54b779f
@ -542,8 +542,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
self.action_set_keyboard_layout.setEnabled(
|
self.action_set_keyboard_layout.setEnabled(
|
||||||
vm.qid != 0 and
|
vm.qid != 0 and
|
||||||
vm.get_power_state() != "Paused" and vm.is_running())
|
vm.get_power_state() != "Paused" and vm.is_running())
|
||||||
|
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
else:
|
else:
|
||||||
self.action_settings.setEnabled(False)
|
self.action_settings.setEnabled(False)
|
||||||
self.action_removevm.setEnabled(False)
|
self.action_removevm.setEnabled(False)
|
||||||
@ -726,6 +724,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
if vm.get_power_state() in ["Paused", "Suspended"]:
|
if vm.get_power_state() in ["Paused", "Suspended"]:
|
||||||
try:
|
try:
|
||||||
vm.unpause()
|
vm.unpause()
|
||||||
|
self.vms_in_table[vm.qid].update()
|
||||||
except exc.QubesException as ex:
|
except exc.QubesException as ex:
|
||||||
QtGui.QMessageBox.warning(
|
QtGui.QMessageBox.warning(
|
||||||
None, self.tr("Error unpausing Qube!"),
|
None, self.tr("Error unpausing Qube!"),
|
||||||
@ -733,7 +732,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.start_vm(vm)
|
self.start_vm(vm)
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
|
|
||||||
def start_vm(self, vm):
|
def start_vm(self, vm):
|
||||||
if vm.is_running():
|
if vm.is_running():
|
||||||
@ -754,7 +752,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
self.tr("Error starting Qube!"),
|
self.tr("Error starting Qube!"),
|
||||||
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
||||||
|
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def do_start_vm(vm, t_monitor):
|
def do_start_vm(vm, t_monitor):
|
||||||
@ -804,7 +801,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
if reply == QtGui.QMessageBox.Yes:
|
if reply == QtGui.QMessageBox.Yes:
|
||||||
self.shutdown_vm(vm)
|
self.shutdown_vm(vm)
|
||||||
|
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
|
|
||||||
def shutdown_vm(self, vm, shutdown_time=vm_shutdown_timeout,
|
def shutdown_vm(self, vm, shutdown_time=vm_shutdown_timeout,
|
||||||
check_time=vm_restart_check_timeout, and_restart=False):
|
check_time=vm_restart_check_timeout, and_restart=False):
|
||||||
@ -845,8 +841,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
else:
|
else:
|
||||||
self.start_vm(vm)
|
self.start_vm(vm)
|
||||||
|
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
|
|
||||||
# noinspection PyArgumentList
|
# noinspection PyArgumentList
|
||||||
@QtCore.pyqtSlot(name='on_action_killvm_triggered')
|
@QtCore.pyqtSlot(name='on_action_killvm_triggered')
|
||||||
def action_killvm_triggered(self):
|
def action_killvm_triggered(self):
|
||||||
@ -931,7 +925,6 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
self.tr("Error on Qube update!"),
|
self.tr("Error on Qube update!"),
|
||||||
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
self.tr("ERROR: {0}").format(t_monitor.error_msg))
|
||||||
|
|
||||||
self.vms_in_table[vm.qid].update()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def do_update_vm(vm, t_monitor):
|
def do_update_vm(vm, t_monitor):
|
||||||
|
Loading…
Reference in New Issue
Block a user