[gnome-boxes] libvirt-machine-props: Add 'Restart' button
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-machine-props: Add 'Restart' button
- Date: Tue, 28 Apr 2015 17:41:36 +0000 (UTC)
commit 4bb6f1c1c737d7aada99862401c2f61e07168189
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Apr 28 15:08:25 2015 +0100
libvirt-machine-props: Add 'Restart' button
Add a way to (attempt to) restart a libvirt box. If restart fails
(timeout), we present user with option to force shutdown.
src/libvirt-machine-properties.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 0cec81c..9544c0a 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -414,12 +414,18 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
machine.window.props_window.show_troubleshoot_log (log);
});
+ button = new Gtk.Button.with_label (_("Restart"));
+ button.clicked.connect (() => {
+ machine.restart ();
+ });
+ grid.attach (button, 1, 0, 1, 1);
+
button = new Gtk.Button.with_label (_("Force Shutdown"));
button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
button.clicked.connect (() => {
machine.force_shutdown ();
});
- grid.attach (button, 1, 0, 1, 1);
+ grid.attach (button, 2, 0, 1, 1);
button.sensitive = machine.is_running ();
var state_notify_id = machine.notify["state"].connect (() => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]