[dconf-editor] Manually clear() VariantDict.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Manually clear() VariantDict.
- Date: Tue, 31 Jul 2018 16:50:20 +0000 (UTC)
commit b68f08bf2bb1a7ec455cf6e8c2d94ef0448091e9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Jul 31 18:49:43 2018 +0200
Manually clear() VariantDict.
editor/modifications-handler.vala | 1 +
editor/modifications-revealer.vala | 3 +++
editor/registry-info.vala | 5 +++++
editor/registry-list.vala | 6 ++++++
4 files changed, 15 insertions(+)
---
diff --git a/editor/modifications-handler.vala b/editor/modifications-handler.vala
index fcc0588..fe9a6bf 100644
--- a/editor/modifications-handler.vala
+++ b/editor/modifications-handler.vala
@@ -160,6 +160,7 @@ class ModificationsHandler : Object
Variant key_value;
if (!properties.lookup ("key-value", "v", out key_value))
assert_not_reached ();
+ properties.clear ();
return key_value;
}
diff --git a/editor/modifications-revealer.vala b/editor/modifications-revealer.vala
index 30ec296..086b209 100644
--- a/editor/modifications-revealer.vala
+++ b/editor/modifications-revealer.vala
@@ -118,6 +118,7 @@ class ModificationsRevealer : Revealer
assert_not_reached ();
if (!properties.lookup ("schema-id", "s", out schema_id))
assert_not_reached ();
+ properties.clear ();
if (!is_key_default)
modifications_handler.add_delayed_setting (full_name, null, true, schema_id);
@@ -201,6 +202,8 @@ class ModificationsRevealer : Revealer
if (!properties.lookup ("key-value", "v", out key_value))
assert_not_reached ();
+ properties.clear ();
+
DelayedSettingView view = new DelayedSettingView (((SimpleSettingObject) object).name,
full_name,
context,
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
index 4d2d2c4..89b695d 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -272,6 +272,8 @@ class RegistryInfo : Grid, BrowsableView
}
one_choice_warning_revealer.set_reveal_child (is_key_editor_child_single);
+ properties.clear ();
+
if (has_schema && error_hard_conflicting_key)
return;
@@ -325,6 +327,7 @@ class RegistryInfo : Grid, BrowsableView
Variant key_value;
if (!local_properties.lookup ("key-value", "v", out key_value))
assert_not_reached ();
+ local_properties.clear ();
if (custom_value_switch.get_active ())
{
model.set_key_to_default (full_name, context);
@@ -345,6 +348,7 @@ class RegistryInfo : Grid, BrowsableView
bool is_key_default;
if (!local_properties.lookup ("is-default", "b", out is_key_default))
assert_not_reached ();
+ local_properties.clear ();
custom_value_switch.set_active (is_key_default);
SignalHandler.unblock (custom_value_switch, switch_active_handler);
});
@@ -368,6 +372,7 @@ class RegistryInfo : Grid, BrowsableView
Variant key_value;
if (!local_properties.lookup ("key-value", "v", out key_value))
assert_not_reached ();
+ local_properties.clear ();
key_editor_child.reload (key_value);
//if (type_code == "<flags>") let's try to live without this...
// key.planned_value = key.value;
diff --git a/editor/registry-list.vala b/editor/registry-list.vala
index 0239ca1..17f66c5 100644
--- a/editor/registry-list.vala
+++ b/editor/registry-list.vala
@@ -355,6 +355,8 @@ private abstract class RegistryList : Grid, BrowsableView
search_mode_non_local_result);
}
+ properties.clear ();
+
KeyListBoxRow key_row = (KeyListBoxRow) row;
key_row.small_keys_list_rows = _small_keys_list_rows;
@@ -481,6 +483,7 @@ private abstract class RegistryList : Grid, BrowsableView
assert_not_reached ();
if (!properties.lookup ("hard-conflict", "b", out error_hard_conflicting_key))
assert_not_reached ();
+ properties.clear ();
update_gsettings_row ((!) row,
type_code,
@@ -625,6 +628,7 @@ private abstract class RegistryList : Grid, BrowsableView
{
popover.new_gaction ("detail", "ui.open-object(" + variant_ss.print (false) + ")");
popover.new_gaction ("copy", "app.copy(" + get_copy_text_variant (row).print (false) + ")");
+ properties.clear ();
return true; // anything else is value-related, so we are done
}
@@ -706,6 +710,7 @@ private abstract class RegistryList : Grid, BrowsableView
popover.new_section ();
popover.new_gaction ("default1", "bro.set-to-default(" + variant_ss.print (false) + ")");
}
+ properties.clear ();
return true;
}
@@ -745,6 +750,7 @@ private abstract class RegistryList : Grid, BrowsableView
Variant key_value;
if (!properties.lookup ("key-value", "v", out key_value))
assert_not_reached ();
+ properties.clear ();
GLib.Action action = popover.create_buttons_list (true, delayed_apply_menu, planned_change,
row.type_string, null,
planned_change ? planned_value : key_value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]