[gnome-shell] st: Notify on BoxLayout property changes



commit 6a19b7c1b0cea3eb78c581e5ed417a0f9e04f9c7
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Jul 7 00:11:02 2013 +0200

    st: Notify on BoxLayout property changes
    
    We didn't do this before, but it might come in handy eventually,
    so add change notifications.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703810

 src/st/st-box-layout.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c
index e333dcd..6281819 100644
--- a/src/st/st-box-layout.c
+++ b/src/st/st-box-layout.c
@@ -545,6 +545,18 @@ st_box_layout_style_changed (StWidget *self)
 }
 
 static void
+layout_notify (GObject    *object,
+               GParamSpec *pspec,
+               gpointer    user_data)
+{
+  GObject *self = user_data;
+  const char *prop_name = g_param_spec_get_name (pspec);
+
+  if (g_object_class_find_property (G_OBJECT_GET_CLASS (self), prop_name))
+    g_object_notify (self, prop_name);
+}
+
+static void
 st_box_layout_class_init (StBoxLayoutClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -602,6 +614,7 @@ st_box_layout_init (StBoxLayout *self)
   layout = clutter_box_layout_new ();
   g_signal_connect_swapped (layout, "layout-changed",
                             G_CALLBACK (clutter_actor_queue_relayout), self);
+  g_signal_connect (layout, "notify", G_CALLBACK (layout_notify), self);
   clutter_actor_set_layout_manager (CLUTTER_ACTOR (self), layout);
 }
 


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