[gnome-boxes] Only make force shutdown button sensitive if vm is running
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Only make force shutdown button sensitive if vm is running
- Date: Fri, 26 Oct 2012 15:00:49 +0000 (UTC)
commit f7a74d88c85152b88beaf0c925c55a8750eb1790
Author: Alexander Larsson <alexl redhat com>
Date: Fri Oct 26 11:27:44 2012 +0200
Only make force shutdown button sensitive if vm is running
https://bugzilla.gnome.org/show_bug.cgi?id=677714
src/properties.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/properties.vala b/src/properties.vala
index 14a0a6e..6889c57 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -143,8 +143,9 @@ private class Boxes.Properties: Boxes.UI {
notebook.remove_page (-1);
var machine = App.app.current_item as Machine;
+ var libvirt_machine = App.app.current_item as LibvirtMachine;
- shutdown_button.sensitive = machine != null && machine is LibvirtMachine;
+ shutdown_button.sensitive = libvirt_machine != null && libvirt_machine.is_running ();
if (machine == null)
return;
@@ -160,7 +161,6 @@ private class Boxes.Properties: Boxes.UI {
PropertiesPage current_page;
- var libvirt_machine = machine as LibvirtMachine;
if (libvirt_machine != null) {
stats_id = libvirt_machine.stats_updated.connect (() => {
cpu.points = libvirt_machine.cpu_stats;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]