[gnome-boxes/gnome-3-32] 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/gnome-3-32] libvirt-machine-properties: Require reboot only when 3D accel changes
- Date: Thu, 6 Jun 2019 13:41:27 +0000 (UTC)
commit 6eb232a901dc3293d8962ba784a61a7be9ccf262
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 b9255eb9..b34b4fbb 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -684,7 +684,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);
@@ -699,5 +698,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]