[dconf-editor] Do not unnecessarily notify for properties.



commit 4f860de789b24e247dab7654f880e67156d7960d
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Dec 7 16:33:19 2018 +0100

    Do not unnecessarily notify for properties.

 editor/about-list.vala             |  2 +-
 editor/adaptative-window.vala      |  8 ++--
 editor/bookmarks-controller.vala   |  4 +-
 editor/bookmarks-list.vala         |  2 +-
 editor/bookmarks.vala              |  2 +-
 editor/browser-headerbar.vala      |  6 +--
 editor/browser-stack.vala          |  4 +-
 editor/browser-view.vala           | 30 ++++++------
 editor/browser-window.vala         |  8 ++--
 editor/dconf-headerbar.vala        |  2 +-
 editor/dconf-model.vala            |  4 +-
 editor/dconf-view.vala             | 95 +++++++++++---------------------------
 editor/delayed-setting-view.vala   |  4 +-
 editor/key-list-box-row.vala       | 18 ++++----
 editor/large-pathbar.vala          |  8 ++--
 editor/modifications-handler.vala  |  8 ++--
 editor/modifications-revealer.vala |  2 +-
 editor/night-light-monitor.vala    |  8 ++--
 editor/overlayed-list.vala         | 12 ++---
 editor/pathentry.vala              |  4 +-
 editor/pathwidget.vala             | 10 ++--
 editor/registry-info.vala          |  6 +--
 editor/registry-list.vala          |  8 ++--
 editor/registry-placeholder.vala   |  6 +--
 editor/registry-search.vala        |  2 +-
 editor/registry-view.vala          |  2 +-
 editor/setting-object.vala         | 28 +++++------
 editor/source-manager.vala         |  2 +-
 28 files changed, 127 insertions(+), 168 deletions(-)
---
diff --git a/editor/about-list.vala b/editor/about-list.vala
index caa09e5..7164d82 100644
--- a/editor/about-list.vala
+++ b/editor/about-list.vala
@@ -117,7 +117,7 @@ private class AboutList : OverlayedList
 
 private class AboutListItem : OverlayedListRow
 {
-    public string? copy_text { internal get; construct; default = null; }
+    [CCode (notify = false)] public string? copy_text { internal get; construct; default = null; }
 
     internal override string? get_copy_text ()
     {
diff --git a/editor/adaptative-window.vala b/editor/adaptative-window.vala
index 1556236..2082ce0 100644
--- a/editor/adaptative-window.vala
+++ b/editor/adaptative-window.vala
@@ -132,7 +132,7 @@ private abstract class AdaptativeHeaderBar : HeaderBar
 
 private abstract class AdaptativeWindow : ApplicationWindow
 {
-    public AdaptativeHeaderBar adaptative_headerbar { protected get; protected construct; }
+    [CCode (notify = false)] public AdaptativeHeaderBar adaptative_headerbar { protected get; protected 
construct; }
 
     private StyleContext context;
 
@@ -346,9 +346,9 @@ private abstract class AdaptativeWindow : ApplicationWindow
     \*/
 
     // for construct only
-    public bool initial_night_time           { private get; protected construct; }
-    public bool initial_dark_theme           { private get; protected construct; }
-    public bool initial_automatic_night_mode { private get; protected construct; }
+    [CCode (notify = false)] public bool initial_night_time           { private get; protected construct; }
+    [CCode (notify = false)] public bool initial_dark_theme           { private get; protected construct; }
+    [CCode (notify = false)] public bool initial_automatic_night_mode { private get; protected construct; }
 
     private void init_night_mode ()
     {
diff --git a/editor/bookmarks-controller.vala b/editor/bookmarks-controller.vala
index b818bad..5455df3 100644
--- a/editor/bookmarks-controller.vala
+++ b/editor/bookmarks-controller.vala
@@ -24,14 +24,14 @@ private class BookmarksController : Grid
     [GtkChild] private Image small_rows_icon;
 
     [GtkChild] private Button rows_size_button;
-    public bool show_rows_size_button { private get; construct; default = false; }
+    [CCode (notify = false)] public bool show_rows_size_button { private get; construct; default = false; }
 
     [GtkChild] private Button trash_bookmark_button;
     [GtkChild] private Button move_top_button;
     [GtkChild] private Button move_up_button;
     [GtkChild] private Button move_down_button;
     [GtkChild] private Button move_bottom_button;
-    public string controller_action_prefix
+    [CCode (notify = false)] public string controller_action_prefix
     {
         construct
         {
diff --git a/editor/bookmarks-list.vala b/editor/bookmarks-list.vala
index fae0831..37cc215 100644
--- a/editor/bookmarks-list.vala
+++ b/editor/bookmarks-list.vala
@@ -499,7 +499,7 @@ private class Bookmark : OverlayedListRow
 {
     [GtkChild] private Label bookmark_label;
 
-    public string bookmark_name { internal get; internal construct; }
+    [CCode (notify = false)] public string bookmark_name { internal get; internal construct; }
 
     construct
     {
diff --git a/editor/bookmarks.vala b/editor/bookmarks.vala
index 97f820f..4ef3594 100644
--- a/editor/bookmarks.vala
+++ b/editor/bookmarks.vala
@@ -45,7 +45,7 @@ private class Bookmarks : MenuButton
 
     private string schema_id = "ca.desrt.dconf-editor.Bookmarks";   // TODO move in a library
     GLib.Settings settings;
-    public string schema_path
+    [CCode (notify = false)] public string schema_path
     {
         construct
         {
diff --git a/editor/browser-headerbar.vala b/editor/browser-headerbar.vala
index e4f3918..3f0cc11 100644
--- a/editor/browser-headerbar.vala
+++ b/editor/browser-headerbar.vala
@@ -62,9 +62,9 @@ private abstract class BrowserHeaderBar : AdaptativeHeaderBar, AdaptativeWidget
     protected virtual void disable_popovers_changed () {}
     protected abstract void update_modifications_button ();
 
-    internal bool search_mode_enabled   { get { return path_widget.search_mode_enabled; }}
-    internal bool entry_has_focus       { get { return path_widget.entry_has_focus; }}
-    internal string text                { get { return path_widget.text; }}
+    [CCode (notify = false)] internal bool search_mode_enabled   { get { return 
path_widget.search_mode_enabled; }}
+    [CCode (notify = false)] internal bool entry_has_focus       { get { return path_widget.entry_has_focus; 
}}
+    [CCode (notify = false)] internal string text                { get { return path_widget.text; }}
 
     internal string get_complete_path ()    { return path_widget.get_complete_path (); }
     internal void get_fallback_path_and_complete_path (out string fallback_path, out string complete_path)
diff --git a/editor/browser-stack.vala b/editor/browser-stack.vala
index da76593..8a8951f 100644
--- a/editor/browser-stack.vala
+++ b/editor/browser-stack.vala
@@ -25,7 +25,7 @@ private class BrowserStack : Grid, AdaptativeWidget
     [GtkChild] private RegistryInfo object_view;
     [GtkChild] private RegistrySearch search_view;
 
-    internal ViewType current_view { get; private set; default = ViewType.FOLDER; }
+    [CCode (notify = false)] internal ViewType current_view { get; private set; default = ViewType.FOLDER; }
 
     private void set_window_size (AdaptativeWidget.WindowSize new_size)
     {
@@ -33,7 +33,7 @@ private class BrowserStack : Grid, AdaptativeWidget
         search_view.set_window_size (new_size);
     }
 
-    internal ModificationsHandler modifications_handler
+    [CCode (notify = false)] internal ModificationsHandler modifications_handler
     {
         set
         {
diff --git a/editor/browser-view.vala b/editor/browser-view.vala
index 572e338..0226c53 100644
--- a/editor/browser-view.vala
+++ b/editor/browser-view.vala
@@ -19,16 +19,16 @@ using Gtk;
 
 private class SimpleSettingObject : Object
 {
-    public bool is_pinned           { internal get; internal construct; }
+    [CCode (notify = false)] public bool is_pinned           { internal get; internal construct; }
 
-    public bool is_config           { internal get; private construct; }
-    public bool is_search           { internal get; internal construct; }
+    [CCode (notify = false)] public bool is_config           { internal get; private construct; }
+    [CCode (notify = false)] public bool is_search           { internal get; internal construct; }
 
-    public uint16 context_id        { internal get; internal construct; }
-    public string name              { internal get; internal construct; }
-    public string full_name         { internal get; internal construct; }
+    [CCode (notify = false)] public uint16 context_id        { internal get; internal construct; }
+    [CCode (notify = false)] public string name              { internal get; internal construct; }
+    [CCode (notify = false)] public string full_name         { internal get; internal construct; }
 
-    public string casefolded_name   { internal get; private construct; }
+    [CCode (notify = false)] public string casefolded_name   { internal get; private construct; }
 
     construct
     {
@@ -51,7 +51,7 @@ private class SimpleSettingObject : Object
 [GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/browser-view.ui")]
 private class BrowserView : Stack, AdaptativeWidget
 {
-    internal uint16 last_context_id { get; private set; default = ModelUtils.undefined_context_id; }
+    [CCode (notify = false)] internal uint16 last_context_id { get; private set; default = 
ModelUtils.undefined_context_id; }
 
     [GtkChild] private BrowserInfoBar info_bar;
     [GtkChild] private BrowserStack current_child;
@@ -72,7 +72,7 @@ private class BrowserView : Stack, AdaptativeWidget
     }
 
     private ModificationsHandler _modifications_handler;
-    internal ModificationsHandler modifications_handler
+    [CCode (notify = false)] internal ModificationsHandler modifications_handler
     {
         private get { return _modifications_handler; }
         set {
@@ -252,7 +252,7 @@ private class BrowserView : Stack, AdaptativeWidget
     * * modifications
     \*/
 
-    internal bool in_window_modifications           { internal get; private set; default = false; }
+    [CCode (notify = false)] internal bool in_window_modifications           { internal get; private set; 
default = false; }
 
     private bool modifications_list_created = false;
     private ModificationsList modifications_list;
@@ -309,8 +309,8 @@ private class BrowserView : Stack, AdaptativeWidget
     * * bookmarks
     \*/
 
-    internal bool in_window_bookmarks           { internal get; private set; default = false; }
-    internal bool in_window_bookmarks_edit_mode { internal get; private set; default = false; }
+    [CCode (notify = false)] internal bool in_window_bookmarks           { internal get; private set; 
default = false; }
+    [CCode (notify = false)] internal bool in_window_bookmarks_edit_mode { internal get; private set; 
default = false; }
 
     [GtkChild] private BookmarksList bookmarks_list;
     [GtkChild] private Grid          current_child_grid;
@@ -513,7 +513,7 @@ private class BrowserView : Stack, AdaptativeWidget
         current_child.row_grab_focus ();
     }
 
-    internal ViewType current_view { get { return current_child.current_view; }}
+    [CCode (notify = false)] internal ViewType current_view { get { return current_child.current_view; }}
 
     // popovers invalidation and toggles hiding/revealing
     internal void discard_row_popover () { current_child.discard_row_popover (); }
@@ -588,10 +588,10 @@ private class BrowserView : Stack, AdaptativeWidget
 
 private class SortingOptions : Object
 {
-    public SettingsModel model { private get; construct; }
+    [CCode (notify = false)] public SettingsModel model { private get; construct; }
     private GLib.Settings settings = new GLib.Settings ("ca.desrt.dconf-editor.Settings");
 
-    internal bool case_sensitive { get; set; default = false; }
+    [CCode (notify = true)] internal bool case_sensitive { get; set; default = false; }
 
     construct
     {
diff --git a/editor/browser-window.vala b/editor/browser-window.vala
index f3e7493..16a5793 100644
--- a/editor/browser-window.vala
+++ b/editor/browser-window.vala
@@ -743,7 +743,7 @@ private abstract class BrowserWindow : AdaptativeWindow, AdaptativeWidget
     }
 
     // in-window about
-    protected bool in_window_about { protected get; private set; default = false; }
+    [CCode (notify = false)] protected bool in_window_about { protected get; private set; default = false; }
 
     private void toggle_in_window_about ()
     {
@@ -853,9 +853,9 @@ private abstract class BrowserWindow : AdaptativeWindow, AdaptativeWidget
     * * mouse callback
     \*/
 
-    protected bool mouse_use_extra_buttons  { private get; protected set; default = true; }
-    protected int  mouse_back_button        { private get; protected set; default = 8; }
-    protected int  mouse_forward_button     { private get; protected set; default = 9; }
+    [CCode (notify = false)] protected bool mouse_use_extra_buttons  { private get; protected set; default = 
true; }
+    [CCode (notify = false)] protected int  mouse_back_button        { private get; protected set; default = 
8; }
+    [CCode (notify = false)] protected int  mouse_forward_button     { private get; protected set; default = 
9; }
 
     private void bind_mouse_config ()
     {
diff --git a/editor/dconf-headerbar.vala b/editor/dconf-headerbar.vala
index d05a81c..7c4a503 100644
--- a/editor/dconf-headerbar.vala
+++ b/editor/dconf-headerbar.vala
@@ -22,7 +22,7 @@ private class DConfHeaderBar : BrowserHeaderBar
     private Bookmarks bookmarks_button;
 
     private bool _delay_mode = false;
-    internal bool delay_mode
+    [CCode (notify = false)] internal bool delay_mode
     {
         private  get { return _delay_mode; }
         internal set
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala
index 9b1b34d..4904d37 100644
--- a/editor/dconf-model.vala
+++ b/editor/dconf-model.vala
@@ -18,14 +18,14 @@
 private abstract class SettingsModelCore : Object
 {
     private SourceManager source_manager = new SourceManager ();
-    internal bool refresh_source { get; set; default = true; }
+    [CCode (notify = false)] internal bool refresh_source { private get; internal set; default = true; }
 
     private DConf.Client client = new DConf.Client ();
     private string? last_change_tag = null;
     protected bool copy_action = false;
     private bool gsettings_change = false;
 
-    internal bool use_shortpaths { private get; set; default = false; }
+    [CCode (notify = false)] internal bool use_shortpaths { private get; internal set; default = false; }
 
     internal signal void paths_changed (GenericSet<string> modified_path_specs, bool internal_changes);
     private bool paths_has_changed = false;
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index 295c1df..8a5b8fa 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -27,6 +27,25 @@ private interface KeyEditorChild : Widget
     internal abstract void reload (Variant gvariant);
 
     protected const string out_of_range_text = _("Given value is out of range.");
+
+    /*\
+    * * for entries and textviews
+    \*/
+
+    protected static void set_lock_on (Object buffer, ulong deleted_text_handler, ulong 
inserted_text_handler)
+        requires (deleted_text_handler != 0)
+        requires (inserted_text_handler != 0)
+    {
+        SignalHandler.block (buffer, deleted_text_handler);
+        SignalHandler.block (buffer, inserted_text_handler);
+    }
+    protected static void set_lock_off (Object buffer, ulong deleted_text_handler, ulong 
inserted_text_handler)
+        requires (deleted_text_handler != 0)
+        requires (inserted_text_handler != 0)
+    {
+        SignalHandler.unblock (buffer, deleted_text_handler);
+        SignalHandler.unblock (buffer, inserted_text_handler);
+    }
 }
 
 private class KeyEditorChildSingle : Label, KeyEditorChild
@@ -307,28 +326,13 @@ private abstract class KeyEditorChildNumberCustom : Entry, KeyEditorChild
         return variant;
     }
 
-    private void set_lock (bool state)
-        requires (deleted_text_handler != 0 && inserted_text_handler != 0)
-    {
-        if (state)
-        {
-            SignalHandler.block (buffer, deleted_text_handler);
-            SignalHandler.block (buffer, inserted_text_handler);
-        }
-        else
-        {
-            SignalHandler.unblock (buffer, deleted_text_handler);
-            SignalHandler.unblock (buffer, inserted_text_handler);
-        }
-    }
-
     internal void reload (Variant gvariant)
     {
-        set_lock (true);
+        KeyEditorChild.set_lock_on (buffer, deleted_text_handler, inserted_text_handler);
         this.text = gvariant.print (false);
         if (!test_value ())
             assert_not_reached ();
-        set_lock (false);
+        KeyEditorChild.set_lock_off (buffer, deleted_text_handler, inserted_text_handler);
     }
 
     protected abstract bool test_value ();
@@ -658,26 +662,11 @@ private class KeyEditorChildNumberInt : SpinButton, KeyEditorChild
         return variant;
     }
 
-    private void set_lock (bool state)
-        requires (deleted_text_handler != 0 && inserted_text_handler != 0)
-    {
-        if (state)
-        {
-            SignalHandler.block (buffer, deleted_text_handler);
-            SignalHandler.block (buffer, inserted_text_handler);
-        }
-        else
-        {
-            SignalHandler.unblock (buffer, deleted_text_handler);
-            SignalHandler.unblock (buffer, inserted_text_handler);
-        }
-    }
-
     internal void reload (Variant gvariant)       // TODO "key_editor_child_number_int_real_reload: 
assertion 'gvariant != NULL' failed" two times when ghosting a key
     {
-        set_lock (true);
+        KeyEditorChild.set_lock_on (buffer, deleted_text_handler, inserted_text_handler);
         this.set_value (get_variant_as_double (gvariant));
-        set_lock (false);
+        KeyEditorChild.set_lock_off (buffer, deleted_text_handler, inserted_text_handler);
     }
 
     private bool value_has_error = false;
@@ -864,28 +853,13 @@ private class KeyEditorChildArray : Grid, KeyEditorChild
         return variant;
     }
 
-    private void set_lock (bool state)
-        requires (deleted_text_handler != 0 && inserted_text_handler != 0)
-    {
-        if (state)
-        {
-            SignalHandler.block (text_view.buffer, deleted_text_handler);
-            SignalHandler.block (text_view.buffer, inserted_text_handler);
-        }
-        else
-        {
-            SignalHandler.unblock (text_view.buffer, deleted_text_handler);
-            SignalHandler.unblock (text_view.buffer, inserted_text_handler);
-        }
-    }
-
     internal void reload (Variant gvariant)
     {
-        set_lock (true);
+        KeyEditorChild.set_lock_on (text_view.buffer, deleted_text_handler, inserted_text_handler);
         text_view.buffer.text = gvariant.print (false);
         if (!test_value ())
             assert_not_reached ();
-        set_lock (false);
+        KeyEditorChild.set_lock_off (text_view.buffer, deleted_text_handler, inserted_text_handler);
     }
 }
 
@@ -965,27 +939,12 @@ private class KeyEditorChildDefault : Entry, KeyEditorChild
         return variant;
     }
 
-    private void set_lock (bool state)
-        requires (deleted_text_handler != 0 && inserted_text_handler != 0)
-    {
-        if (state)
-        {
-            SignalHandler.block (buffer, deleted_text_handler);
-            SignalHandler.block (buffer, inserted_text_handler);
-        }
-        else
-        {
-            SignalHandler.unblock (buffer, deleted_text_handler);
-            SignalHandler.unblock (buffer, inserted_text_handler);
-        }
-    }
-
     internal void reload (Variant gvariant)
     {
-        set_lock (true);
+        KeyEditorChild.set_lock_on (buffer, deleted_text_handler, inserted_text_handler);
         this.text = is_string ? gvariant.get_string () : gvariant.print (false);
         if (!test_value ())
             assert_not_reached ();
-        set_lock (false);
+        KeyEditorChild.set_lock_off (buffer, deleted_text_handler, inserted_text_handler);
     }
 }
diff --git a/editor/delayed-setting-view.vala b/editor/delayed-setting-view.vala
index f0f5ba4..ef5fd5a 100644
--- a/editor/delayed-setting-view.vala
+++ b/editor/delayed-setting-view.vala
@@ -27,8 +27,8 @@ private class DelayedSettingView : OverlayedListRow
     [GtkChild] private Label planned_value_default;
     [GtkChild] private Button cancel_change_button;
 
-    public string full_name     { internal get; internal construct; }
-    public uint16 context_id    { internal get; internal construct; }
+    [CCode (notify = false)] public string full_name     { internal get; internal construct; }
+    [CCode (notify = false)] public uint16 context_id    { internal get; internal construct; }
 
     internal DelayedSettingView (string name, string _full_name, uint16 _context_id, bool 
has_schema_and_is_default, Variant key_value, string? cool_planned_value, string? cool_default_value)
     {
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index b5aca8d..6bc1a80 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -75,10 +75,10 @@ private class ListBoxRowHeader : Grid
 
 private abstract class ClickableListBoxRow : EventBox
 {
-    public bool search_result_mode  { internal get; protected construct; default = false; }
+    [CCode (notify = false)] public bool search_result_mode  { internal get; protected construct; default = 
false; }
 
-    public string full_name         { internal get; protected construct; }
-    public uint16 context_id        { internal get; protected construct; }
+    [CCode (notify = false)] public string full_name         { internal get; protected construct; }
+    [CCode (notify = false)] public uint16 context_id        { internal get; protected construct; }
 
     /*\
     * * right click popover stuff
@@ -123,7 +123,7 @@ private class FolderListBoxRow : ClickableListBoxRow
 {
     [GtkChild] private Label folder_name_label;
 
-    public bool path_search { internal get; internal construct; }
+    [CCode (notify = false)] public bool path_search { internal get; internal construct; }
 
     internal FolderListBoxRow (string label, string path, bool path_search, bool search_result_mode)
     {
@@ -166,12 +166,12 @@ private class KeyListBoxRow : ClickableListBoxRow, AdaptativeWidget
     [GtkChild] private Label key_info_label;
     private Switch? boolean_switch = null;
 
-    public string key_name    { internal get; internal construct; }
-    public string type_string { internal get; internal construct; }
-    public bool has_schema    { internal get; internal construct; }
+    [CCode (notify = false)] public string key_name    { internal get; internal construct; }
+    [CCode (notify = false)] public string type_string { internal get; internal construct; }
+    [CCode (notify = false)] public bool has_schema    { internal get; internal construct; }
 
     private bool _delay_mode = false;
-    internal bool delay_mode
+    [CCode (notify = false)] internal bool delay_mode
     {
         private get
         {
@@ -185,7 +185,7 @@ private class KeyListBoxRow : ClickableListBoxRow, AdaptativeWidget
         }
     }
 
-    internal bool small_keys_list_rows
+    [CCode (notify = false)] internal bool small_keys_list_rows
     {
         set
         {
diff --git a/editor/large-pathbar.vala b/editor/large-pathbar.vala
index 48ea4c2..1e7d21d 100644
--- a/editor/large-pathbar.vala
+++ b/editor/large-pathbar.vala
@@ -331,11 +331,11 @@ private class InvisibleButton : Button
 [GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/large-pathbar-item.ui")]
 private class LargePathbarItem : Button
 {
-    public bool is_active { internal get; internal set; default = false; }
+    [CCode (notify = false)] public bool is_active { internal get; internal set; default = false; }
 
-    public string alternative_action { internal get; internal construct; }
-    public string default_action     { internal get; internal construct; }
-    public string text_string        { internal get; internal construct; }
+    [CCode (notify = false)] public string alternative_action { internal get; internal construct; }
+    [CCode (notify = false)] public string default_action     { internal get; internal construct; }
+    [CCode (notify = false)] public string text_string        { internal get; internal construct; }
  
     [GtkChild] private Label text_label;
     private Popover? popover = null;
diff --git a/editor/modifications-handler.vala b/editor/modifications-handler.vala
index e71e1cf..576cd1a 100644
--- a/editor/modifications-handler.vala
+++ b/editor/modifications-handler.vala
@@ -30,21 +30,21 @@ internal enum ModificationsMode {
 
 private class ModificationsHandler : Object
 {
-    internal ModificationsMode mode { get; set; default=ModificationsMode.NONE; }
+    [CCode (notify = false)] internal ModificationsMode mode { internal get; private set; default = 
ModificationsMode.NONE; }
 
     private HashTable<string, Variant?> keys_awaiting_hashtable = new HashTable<string, Variant?> (str_hash, 
str_equal);
 
     private GenericSet<string> dconf_changes_set = new GenericSet<string> (str_hash, str_equal);
     private HashTable<string, uint16> gsettings_changes_set = new HashTable<string, uint16> (str_hash, 
str_equal);
-    internal uint dconf_changes_count { get { return dconf_changes_set.length; }}
-    internal uint gsettings_changes_count { get { return gsettings_changes_set.length; }}
+    [CCode (notify = false)] internal uint dconf_changes_count     { internal get { return 
dconf_changes_set.length; }}
+    [CCode (notify = false)] internal uint gsettings_changes_count { internal get { return 
gsettings_changes_set.length; }}
 
     public SettingsModel model { internal get; internal construct; }
 
     internal signal void leave_delay_mode ();
     internal signal void delayed_changes_changed ();
 
-    internal Behaviour behaviour { get; set; }
+    [CCode (notify = false)] internal Behaviour behaviour { internal get; internal set; }
 
     internal ModificationsHandler (SettingsModel model)
     {
diff --git a/editor/modifications-revealer.vala b/editor/modifications-revealer.vala
index 77ff19b..8f72c0d 100644
--- a/editor/modifications-revealer.vala
+++ b/editor/modifications-revealer.vala
@@ -21,7 +21,7 @@ using Gtk;
 private class ModificationsRevealer : Revealer, AdaptativeWidget
 {
     private ModificationsHandler _modifications_handler;
-    internal ModificationsHandler modifications_handler
+    [CCode (notify = false)] internal ModificationsHandler modifications_handler
     {
         private get { return _modifications_handler; }
         set
diff --git a/editor/night-light-monitor.vala b/editor/night-light-monitor.vala
index 565e113..95a3e4d 100644
--- a/editor/night-light-monitor.vala
+++ b/editor/night-light-monitor.vala
@@ -44,7 +44,7 @@ private class NightLightMonitor : Object
     * * Public interface
     \*/
 
-    public string schema_path { private get; internal construct; }
+    [CCode (notify = false)] public string schema_path { private get; internal construct; }
 
     public enum NightTime {
         UNKNOWN,
@@ -56,9 +56,9 @@ private class NightLightMonitor : Object
             return state == NightTime.NIGHT;
         }
     }
-    public NightTime  night_time            { internal get; private construct set; default = 
NightTime.UNKNOWN; }
-    public bool       dark_theme            { internal get; private construct set; default = false; }
-    public bool       automatic_night_mode  { internal get; private construct set; default = false; }
+    [CCode (notify = true)] public NightTime  night_time            { internal get; private construct set; 
default = NightTime.UNKNOWN; }
+    [CCode (notify = true)] public bool       dark_theme            { internal get; private construct set; 
default = false; }
+    [CCode (notify = true)] public bool       automatic_night_mode  { internal get; private construct set; 
default = false; }
 
     internal NightLightMonitor (string _schema_path)
     {
diff --git a/editor/overlayed-list.vala b/editor/overlayed-list.vala
index 7492f42..9515e8c 100644
--- a/editor/overlayed-list.vala
+++ b/editor/overlayed-list.vala
@@ -47,7 +47,7 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     [GtkChild] private ModelButton enter_edit_mode_button;
     [GtkChild] private ModelButton leave_edit_mode_button;
-    public string edit_mode_action_prefix
+    [CCode (notify = false)] public string edit_mode_action_prefix
     {
         construct
         {
@@ -56,10 +56,10 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
             leave_edit_mode_button.set_detailed_action_name (value + ".set-edit-mode(false)");
         }
     }
-    public string first_mode_name   { protected set { leave_edit_mode_button.text = value; }}
-    public string second_mode_name  { protected set { enter_edit_mode_button.text = value; }}
+    [CCode (notify = false)] public string first_mode_name   { protected set { leave_edit_mode_button.text = 
value; }}
+    [CCode (notify = false)] public string second_mode_name  { protected set { enter_edit_mode_button.text = 
value; }}
 
-    public bool needs_shadows
+    [CCode (notify = false)] public bool needs_shadows
     {
         construct
         {
@@ -72,7 +72,7 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     protected string placeholder_icon;
     protected string placeholder_text;
-    public bool big_placeholder { private get; internal construct; }
+    [CCode (notify = false)] public bool big_placeholder { private get; internal construct; }
     protected void add_placeholder ()
     {
         RegistryPlaceholder placeholder = new RegistryPlaceholder (placeholder_icon, placeholder_text, 
big_placeholder);
@@ -328,7 +328,7 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
 
     protected ulong content_changed_handler = 0;
 
-    protected uint n_items { protected get; private set; default = 0; }
+    [CCode (notify = false)] protected uint n_items { protected get; private set; default = 0; }
     private bool is_editable = false;
 
     protected void change_editability (bool new_value)
diff --git a/editor/pathentry.vala b/editor/pathentry.vala
index 7b63470..fe8c0a5 100644
--- a/editor/pathentry.vala
+++ b/editor/pathentry.vala
@@ -27,8 +27,8 @@ private class PathEntry : Box, AdaptativeWidget
 
     private string current_path = "";
 
-    internal string text { get { return search_entry.text; }}
-    internal bool entry_has_focus { get { return search_entry.has_focus; }}
+    [CCode (notify = false)] internal string text { get { return search_entry.text; }}
+    [CCode (notify = false)] internal bool entry_has_focus { get { return search_entry.has_focus; }}
 
     private ulong can_reload_handler = 0;
     private bool thin_window = false;
diff --git a/editor/pathwidget.vala b/editor/pathwidget.vala
index 7b17001..b6c1912 100644
--- a/editor/pathwidget.vala
+++ b/editor/pathwidget.vala
@@ -65,7 +65,7 @@ private class PathWidget : Box, AdaptativeWidget
     * * search mode
     \*/
 
-    internal bool search_mode_enabled { get; private set; default = false; }
+    [CCode (notify = false)] internal bool search_mode_enabled { internal get; private set; default = false; 
}
 
     private void enter_search_mode ()
     {
@@ -151,10 +151,10 @@ private class PathWidget : Box, AdaptativeWidget
     }
 
     /* path entry */
-    internal string text                   { get { return searchentry.text; }}
-    internal bool entry_has_focus          { get { return searchentry.entry_has_focus; }}
-    internal void entry_grab_focus ()                   { searchentry.entry_grab_focus (); }
-    internal void entry_grab_focus_without_selecting () { searchentry.entry_grab_focus_without_selecting (); 
}
+    [CCode (notify = false)] internal string text           { get { return searchentry.text; }}
+    [CCode (notify = false)] internal bool entry_has_focus  { get { return searchentry.entry_has_focus; }}
+    internal void entry_grab_focus ()                       { searchentry.entry_grab_focus (); }
+    internal void entry_grab_focus_without_selecting ()     { searchentry.entry_grab_focus_without_selecting 
(); }
 
     internal bool handle_event (Gdk.EventKey event)
     {
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
index 3c3995c..06b31b5 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -32,11 +32,11 @@ private class RegistryInfo : Grid, BrowsableView
 
     private Label current_value_label;
 
-    internal ModificationsHandler modifications_handler { private get; set; }
+    [CCode (notify = false)] internal ModificationsHandler modifications_handler { private get; set; }
 
     private uint current_key_info_hash = 0;
-    internal string full_name   { get; private set; default = ""; }
-    internal uint16 context_id  { get; private set; default = ModelUtils.undefined_context_id; }
+    [CCode (notify = false)] internal string full_name   { get; private set; default = ""; }
+    [CCode (notify = false)] internal uint16 context_id  { get; private set; default = 
ModelUtils.undefined_context_id; }
 
     /*\
     * * Cleaning
diff --git a/editor/registry-list.vala b/editor/registry-list.vala
index ac59737..6ea47fc 100644
--- a/editor/registry-list.vala
+++ b/editor/registry-list.vala
@@ -24,7 +24,7 @@ private abstract class RegistryList : Grid, BrowsableView, AdaptativeWidget
     [GtkChild] private ScrolledWindow scrolled;
     private Adjustment adjustment;
 
-    protected bool search_mode { private get; set; }
+    [CCode (notify = false)] protected bool search_mode { private get; protected set; }
     protected string? current_path_if_search_mode = null;   // TODO only used in search mode
     protected bool search_is_path_search = false;           // TODO only used in search mode
 
@@ -32,10 +32,10 @@ private abstract class RegistryList : Grid, BrowsableView, AdaptativeWidget
 
     private GLib.ListStore rows_possibly_with_popover = new GLib.ListStore (typeof (ClickableListBoxRow));
 
-    internal ModificationsHandler modifications_handler { protected get; set; }
+    [CCode (notify = false)] internal ModificationsHandler modifications_handler { protected get; set; }
 
     [GtkChild] private RegistryPlaceholder placeholder;
-    public abstract string placeholder_label { protected get; }
+    [CCode (notify = false)] public abstract string placeholder_label { protected get; }
 
     construct
     {
@@ -46,7 +46,7 @@ private abstract class RegistryList : Grid, BrowsableView, AdaptativeWidget
     }
 
     private bool _small_keys_list_rows;
-    internal bool small_keys_list_rows
+    [CCode (notify = false)] internal bool small_keys_list_rows
     {
         set
         {
diff --git a/editor/registry-placeholder.vala b/editor/registry-placeholder.vala
index 6e9f06d..f2a0d4b 100644
--- a/editor/registry-placeholder.vala
+++ b/editor/registry-placeholder.vala
@@ -23,9 +23,9 @@ private class RegistryPlaceholder : Grid
     [GtkChild] private Label placeholder_label;
     [GtkChild] private Image placeholder_image;
 
-    public string label     { internal construct set { placeholder_label.label = value; }}
-    public string icon_name { private get; internal construct; }
-    public bool big
+    [CCode (notify = false)] public string label     { internal construct set { placeholder_label.label = 
value; }}
+    [CCode (notify = false)] public string icon_name { private get; internal construct; }
+    [CCode (notify = false)] public bool big
     {
         internal construct set
         {
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 38b96e5..01d481e 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -22,7 +22,7 @@ private class RegistrySearch : RegistryList
     private string [] bookmarks;
     private SortingOptions sorting_options;
 
-    public override string placeholder_label { protected get { return _("No matches"); }}
+    [CCode (notify = false)] public override string placeholder_label { protected get { return _("No 
matches"); }}
 
     construct
     {
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index fdca82f..b8e36a1 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -19,7 +19,7 @@ using Gtk;
 
 private class RegistryView : RegistryList
 {
-    public override string placeholder_label { protected get { return _("No keys in this path"); }}
+    [CCode (notify = false)] public override string placeholder_label { protected get { return _("No keys in 
this path"); }}
 
     construct
     {
diff --git a/editor/setting-object.vala b/editor/setting-object.vala
index 61bbbee..4dab657 100644
--- a/editor/setting-object.vala
+++ b/editor/setting-object.vala
@@ -17,8 +17,8 @@
 
 private abstract class SettingObject : Object
 {
-    public string name          { internal get; protected construct; }
-    public string full_name     { internal get; protected construct; }
+    [CCode (notify = false)] public string name          { internal get; protected construct; }
+    [CCode (notify = false)] public string full_name     { internal get; protected construct; }
 }
 
 private class Directory : SettingObject
@@ -31,10 +31,10 @@ private class Directory : SettingObject
 
 private abstract class Key : SettingObject
 {
-    internal string type_string { get; protected set; default = "*"; }
+    [CCode (notify = false)] internal string type_string { get; protected set; default = "*"; }
 
-    internal uint key_hash { internal get; private set; default = 0; }
-    internal Variant? all_fixed_properties { internal get; private set; default = null; }
+    [CCode (notify = false)] internal uint key_hash { internal get; private set; default = 0; }
+    [CCode (notify = false)] internal Variant? all_fixed_properties { internal get; private set; default = 
null; }
     internal static void generate_key_fixed_properties (Key key)
         requires (key.key_hash == 0)
         requires (key.all_fixed_properties == null)
@@ -277,17 +277,17 @@ private class GSettingsKey : Key
 {
     internal KeyConflict key_conflict = KeyConflict.NONE;
 
-    public string? schema_path      { private get; internal construct; }
-    public string summary           { private get; internal construct; }
-    public string description       { private get; internal construct; }
-    public string schema_id        { internal get; internal construct; }
-    public Variant default_value   { internal get; internal construct; }
-    public RangeType range_type    { internal get; internal construct; }
-    public Variant range_content   { internal get; internal construct; }
+    [CCode (notify = false)] public string? schema_path      { private get; internal construct; }
+    [CCode (notify = false)] public string summary           { private get; internal construct; }
+    [CCode (notify = false)] public string description       { private get; internal construct; }
+    [CCode (notify = false)] public string schema_id        { internal get; internal construct; }
+    [CCode (notify = false)] public Variant default_value   { internal get; internal construct; }
+    [CCode (notify = false)] public RangeType range_type    { internal get; internal construct; }
+    [CCode (notify = false)] public Variant range_content   { internal get; internal construct; }
 
-    public GLib.Settings settings  { internal get; internal construct; }
+    [CCode (notify = false)] public GLib.Settings settings  { internal get; internal construct; }
 
-    internal string descriptor {
+    [CCode (notify = false)] internal string descriptor {
         owned get {
             string parent_path;
             if (full_name.length < 2)
diff --git a/editor/source-manager.vala b/editor/source-manager.vala
index 273f6a4..27b2b17 100644
--- a/editor/source-manager.vala
+++ b/editor/source-manager.vala
@@ -17,7 +17,7 @@
 
 private class SourceManager : Object
 {
-    internal SchemaPathTree cached_schemas { get; private set; default = new SchemaPathTree ("/"); } // 
prefix tree for quick lookup and diff'ing on changes
+    [CCode (notify = false)] internal SchemaPathTree cached_schemas { internal get; private set; default = 
new SchemaPathTree ("/"); } // prefix tree for quick lookup and diff'ing on changes
 
     /*\
     * * Schema source



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]