From 6a19b7c1b0cea3eb78c581e5ed417a0f9e04f9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 7 Jul 2013 00:11:02 +0200 Subject: [PATCH] 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 file changed, 13 insertions(+) diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c index e333dcd84..628181918 100644 --- a/src/st/st-box-layout.c +++ b/src/st/st-box-layout.c @@ -544,6 +544,18 @@ st_box_layout_style_changed (StWidget *self) ST_WIDGET_CLASS (st_box_layout_parent_class)->style_changed (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) { @@ -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); }