[gtk+] shortcuts: Avoid excessive property notification



commit 530aa3cced1e64d68e13c00300c46536576aa747
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 19 18:05:35 2015 -0500

    shortcuts: Avoid excessive property notification
    
    Notifying needlessly causes unnecessary work, and causes our
    testsuite to fail.

 gtk/gtkshortcutsshortcut.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkshortcutsshortcut.c b/gtk/gtkshortcutsshortcut.c
index 2885391..8cc10d2 100644
--- a/gtk/gtkshortcutsshortcut.c
+++ b/gtk/gtkshortcutsshortcut.c
@@ -137,6 +137,8 @@ gtk_shortcuts_shortcut_set_direction (GtkShortcutsShortcut *self,
   self->direction = direction;
 
   update_visible (self);
+
+  g_object_notify (G_OBJECT (self), "direction");
 }
 
 static void
@@ -299,7 +301,7 @@ gtk_shortcuts_shortcut_class_init (GtkShortcutsShortcutClass *klass)
                        P_("Direction"),
                        GTK_TYPE_TEXT_DIRECTION,
                        GTK_TEXT_DIR_NONE,
-                       (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+                       (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
 
   g_object_class_install_properties (object_class, LAST_PROP, properties);
 }


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