[Xfce4-commits] [apps/mousepad] 02/02: Prevent a weird cycle in GSettings use

noreply at xfce.org noreply at xfce.org
Sun Sep 27 22:22:18 CEST 2015


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit f07cc75f2aa77d14f16b5506321ac6a2413706ba
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Sun Sep 27 12:29:15 2015 -0700

    Prevent a weird cycle in GSettings use
    
    Was causing it to continuously update the "color-scheme" setting,
    resulting in lots of DBus spam and CPU/disk activity. I'm not sure
    why only this setting was causing the issue, and why it still updates
    across all the instances while using the `G_SETTINGS_BIND_GET_NO_CHANGES`
    flag, since it shouldn't (and doesn't if it's used on other settings).
    
    Closes bug #12134
---
 mousepad/mousepad-view.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
index bd0e37c..03f4609 100644
--- a/mousepad/mousepad-view.c
+++ b/mousepad/mousepad-view.c
@@ -324,10 +324,16 @@ mousepad_view_init (MousepadView *view)
   BIND_ (SHOW_RIGHT_MARGIN,      "show-right-margin");
   BIND_ (SMART_HOME_END,         "smart-home-end");
   BIND_ (TAB_WIDTH,              "tab-width");
-  BIND_ (COLOR_SCHEME,           "color-scheme");
   BIND_ (WORD_WRAP,              "word-wrap");
   BIND_ (MATCH_BRACES,           "match-braces");
 
+  /* for color-scheme, use G_SETTINGS_BIND_GET_NO_CHANGES to stop
+   * a cycle that was causing DBus thrashing. See:
+   * https://bugzilla.xfce.org/show_bug.cgi?id=12134 */
+  MOUSEPAD_SETTING_BIND (COLOR_SCHEME, view, "color-scheme",
+                         G_SETTINGS_BIND_DEFAULT |
+                           G_SETTINGS_BIND_GET_NO_CHANGES);
+
   /* override with default font when the setting is enabled */
   MOUSEPAD_SETTING_CONNECT_OBJECT (USE_DEFAULT_FONT,
                                    G_CALLBACK (mousepad_view_use_default_font_setting_changed),

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list