virtManager: show the state reason in the VM overview

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1073766

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2014-03-18 15:13:57 +01:00
parent ef2206a8f5
commit f8e1a68889

View File

@ -1343,7 +1343,12 @@ class vmmDetails(vmmGObjectUI):
if not run:
self.activate_default_console_page()
self.widget("overview-status-text").set_text(self.vm.run_status())
reason = self.vm.run_status_reason()
if reason:
status = "%s (%s)" % (self.vm.run_status(), reason)
else:
status = self.vm.run_status()
self.widget("overview-status-text").set_text(status)
self.widget("overview-status-icon").set_from_icon_name(
self.vm.run_status_icon_name(), Gtk.IconSize.BUTTON)