virt-manager/virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
Charles Arnold 096afbb01d - bnc#892821 - Minor enhancement to virt-manager's operating system
detection
  virtinst-ignore-error-403-on-directories.patch (Leonardo Chiquitto)

- bnc#886311 - Xen Virtual Machine Manager does not display CPU
  usage stats 
- bnc#888289 - After domU shutdown, sometimes virt-manager doesn't
  refresh the domU status.
  virtman-sync-vm-startup-for-cpu-usage.patch

- add patch: virtinst-ppc64le.patch
  initial ppc64le support for virt-install

- bnc#875111 - When kvm guest is in crashed state, virt-manager
  reports guest as still running, no option to shutdown/destroy
  virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
- bnc#892003 - create virtual machine with Virt Manager randomly
  times out with large memory guest
  virtman-increase-setKeepAlive-count.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=194
2014-09-03 21:55:51 +00:00

67 lines
2.8 KiB
Diff

bnc#875111
--- virt-manager-1.0.1/virtManager/manager.py.orig 2014-08-18 17:39:09.506148602 -0600
+++ virt-manager-1.0.1/virtManager/manager.py 2014-08-18 17:39:12.440170326 -0600
@@ -892,7 +892,7 @@ class vmmManager(vmmGObjectUI):
show_pause = bool(vm and vm.is_unpauseable())
else:
show_pause = bool(vm and vm.is_pauseable())
- show_shutdown = bool(vm and vm.is_stoppable())
+ show_shutdown = bool(vm and vm.is_destroyable())
if vm and vm.managedsave_supported:
self.change_run_text(vm.hasSavedImage())
--- virt-manager-1.0.1/virtManager/vmmenu.py.orig 2014-08-18 17:39:04.166109065 -0600
+++ virt-manager-1.0.1/virtManager/vmmenu.py 2014-08-18 17:39:15.265191243 -0600
@@ -24,6 +24,7 @@ from gi.repository import Gtk
from virtManager import config
import platform
+import logging
####################################################################
# Build toolbar new button menu (manager and details toolbar) #
@@ -58,6 +59,7 @@ class _VMMenu(Gtk.Menu):
self._parent = src
self._current_vm_cb = current_vm_cb
self._show_open = show_open
+ self._shutdown = None
self._init_state()
@@ -122,6 +124,7 @@ class VMShutdownMenu(_VMMenu):
name = getattr(child, "vmm_widget_name", None)
if name in statemap:
child.set_sensitive(statemap[name])
+ child.set_visible(statemap[name])
class VMActionMenu(_VMMenu):
@@ -133,7 +136,8 @@ class VMActionMenu(_VMMenu):
self._add_action(_("_Pause"), "suspend", Gtk.STOCK_MEDIA_PAUSE)
self._add_action(_("R_esume"), "resume", Gtk.STOCK_MEDIA_PAUSE)
s = self._add_action(_("_Shut Down"), "shutdown", addcb=False)
- s.set_submenu(VMShutdownMenu(self._parent, self._current_vm_cb))
+ self._shutdown = VMShutdownMenu(self._parent, self._current_vm_cb)
+ s.set_submenu(self._shutdown)
self.add(Gtk.SeparatorMenuItem())
self._add_action(_("Clone..."), "clone", None)
@@ -149,7 +153,7 @@ class VMActionMenu(_VMMenu):
def update_widget_states(self, vm):
statemap = {
"run": bool(vm and vm.is_runable()),
- "shutdown": bool(vm and vm.is_stoppable()),
+ "shutdown": bool(vm and vm.is_destroyable()),
"suspend": bool(vm and vm.is_stoppable()),
"resume": bool(vm and vm.is_paused()),
"migrate": bool(vm and vm.is_stoppable()),
@@ -166,6 +170,8 @@ class VMActionMenu(_VMMenu):
child.update_widget_states(vm)
if name in statemap:
child.set_sensitive(statemap[name])
+ if name == "shutdown" and self._shutdown:
+ self._shutdown.update_widget_states(vm)
if name in vismap:
child.set_visible(vismap[name])