[gnome-boxes/reboot-required-only-when-changed] libvirt-machine-properties: Require reboot only when 3D accel changes
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/reboot-required-only-when-changed] libvirt-machine-properties: Require reboot only when 3D accel changes
- Date: Fri, 24 May 2019 12:25:04 +0000 (UTC)
commit 276c495377b79ec93e41cc8c4b1fdd90c6d43971
Author: Felipe Borges <felipeborges gnome org>
Date: Fri May 24 14:22:32 2019 +0200
libvirt-machine-properties: Require reboot only when 3D accel changes
When the 3D acceleration is enabled/disabled and the VM is on, we
need to recommend a reboot.
src/libvirt-machine-properties.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index c039bb79..59673d23 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -686,7 +686,6 @@ private void add_3d_acceleration_property (ref List<Boxes.Property> list) {
var toggle = new Gtk.Switch ();
toggle.halign = Gtk.Align.START;
var property = add_property (ref list, _("3D Acceleration"), toggle);
- property.reboot_required = true;
machine.bind_property ("acceleration-3d", toggle, "active",
BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
@@ -701,5 +700,10 @@ private void add_3d_acceleration_property (ref List<Boxes.Property> list) {
warning (error.message);
}
});
+
+ toggle.notify["active"].connect (() => {
+ property.reboot_required = machine.is_on;
+ });
+
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]