[dconf-editor] Fix updating a key row after resetting the value
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Fix updating a key row after resetting the value
- Date: Wed, 6 Dec 2017 01:34:12 +0000 (UTC)
commit 3176ec0ae666e8b935faa3df16fb597acd737cd2
Author: Davi da Silva Böger <dsboger gmail com>
Date: Tue Dec 5 22:56:52 2017 -0200
Fix updating a key row after resetting the value
Includes a workaround for
https://bugzilla.gnome.org/show_bug.cgi?id=791290
editor/dconf-model.vala | 3 +++
editor/modifications-handler.vala | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala
index 4321ff0..54eee4f 100644
--- a/editor/dconf-model.vala
+++ b/editor/dconf-model.vala
@@ -504,6 +504,9 @@ public class GSettingsKey : Key
public void set_to_default ()
{
settings.reset (name);
+ if (settings.backend.get_type ().name () == "GDelayedSettingsBackend") // Workaround for
https://bugzilla.gnome.org/show_bug.cgi?id=791290
+ settings.backend.changed (full_name, null);
+ // Alternative workaround: value_changed ();
}
public GSettingsKey (string parent_full_name, string name, GLib.Settings settings, string schema_id,
string? schema_path, string summary, string description, string type_string, Variant default_value, string
range_type, Variant range_content)
diff --git a/editor/modifications-handler.vala b/editor/modifications-handler.vala
index 99f32da..a7bf30c 100644
--- a/editor/modifications-handler.vala
+++ b/editor/modifications-handler.vala
@@ -125,7 +125,12 @@ class ModificationsHandler : Object
}
if (key.planned_value == null)
+ {
((!) settings).reset (key.name);
+ if (((!) settings).backend.get_type ().name () == "GDelayedSettingsBackend") //
Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=791290
+ ((!) settings).backend.changed (key.full_name, null);
+ // Alternative workaround: key.value_changed ();
+ }
else
((!) settings).set_value (key.name, (!) key.planned_value);
key.planned_change = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]