[dconf-editor] Do not suggest to reload view after key is edited.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Do not suggest to reload view after key is edited.
- Date: Tue, 31 Jul 2018 16:30:48 +0000 (UTC)
commit 733d7e6e69f0c3fe9f7d6330e0749bc7a37bf476
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Jul 31 18:29:34 2018 +0200
Do not suggest to reload view after key is edited.
Regressions from 36785e633d and 98f70fd96d.
editor/browser-view.vala | 11 ++++++++---
editor/dconf-model.vala | 8 ++------
editor/registry-info.vala | 9 +++++++--
3 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/editor/browser-view.vala b/editor/browser-view.vala
index bcc352e..85b908f 100644
--- a/editor/browser-view.vala
+++ b/editor/browser-view.vala
@@ -239,9 +239,14 @@ class BrowserView : Grid
}
else if (type == ViewType.OBJECT)
{
- if (model.key_exists (path, last_context)
- && !current_child.check_reload_object (model.get_key_properties (path, last_context, {})))
- return false;
+ if (model.key_exists (path, last_context))
+ {
+ VariantDict properties = new VariantDict (model.get_key_properties (path, last_context, {}));
+ properties.remove ("is-default");
+ properties.remove ("key-value");
+ if (!current_child.check_reload_object (properties.end ()))
+ return false;
+ }
if (show_infobar)
{
info_bar.show_warning ("hard-reload-object");
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala
index 8651e06..7c16408 100644
--- a/editor/dconf-model.vala
+++ b/editor/dconf-model.vala
@@ -466,13 +466,9 @@ public class SettingsModel : Object
private void add_watched_key (Key key)
{
if (key is GSettingsKey)
- key.key_value_changed_handler = key.value_changed.connect (() => {
- push_gsettings_key_value ((GSettingsKey) key);
- });
+ key.key_value_changed_handler = key.value_changed.connect (() => push_gsettings_key_value
((GSettingsKey) key));
else if (key is DConfKey)
- key.key_value_changed_handler = key.value_changed.connect (() => {
- push_dconf_key_value (key.full_name, client);
- });
+ key.key_value_changed_handler = key.value_changed.connect (() => push_dconf_key_value
(key.full_name, client));
else assert_not_reached ();
watched_keys.append (key);
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
index 493b7d4..4d2d2c4 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -70,13 +70,18 @@ class RegistryInfo : Grid, BrowsableView
{
full_name = _full_name;
context = _context;
- current_key_info = _current_key_info;
+
+ VariantDict properties = new VariantDict (_current_key_info);
+ properties.remove ("is-default");
+ properties.remove ("key-value");
+ current_key_info = properties.end ();
+ properties.clear ();
SettingsModel model = modifications_handler.model;
clean (); // for when switching between two keys, for example with a search (maybe also bookmarks)
- VariantDict properties = new VariantDict (_current_key_info);
+ properties = new VariantDict (_current_key_info);
bool has_schema;
if (!properties.lookup ("has-schema", "b", out has_schema))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]