From 023a79a90f4778517669bdaf1cbbe90ff0f05f6a Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 1 May 2015 23:15:01 -0300 Subject: [PATCH] source-dialog: bind source::display-name with label::label --- src/gcal-source-dialog.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c index e6b3af9a..7c77be11 100644 --- a/src/gcal-source-dialog.c +++ b/src/gcal-source-dialog.c @@ -590,6 +590,16 @@ is_goa_source (GcalSourceDialog *dialog, return is_goa; } +static void +invalidate_calendar_listbox_sort (GObject *source, + GParamSpec *pspec, + gpointer user_data) +{ + g_return_if_fail (GTK_IS_LIST_BOX (user_data)); + + gtk_list_box_invalidate_sort (GTK_LIST_BOX (user_data)); +} + /** * make_row_from_source: * @@ -632,6 +642,9 @@ make_row_from_source (GcalSourceDialog *dialog, "xalign", 0.0, "hexpand", TRUE, NULL); + g_object_bind_property (source, "display-name", top_label, "label", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + g_signal_connect (source, "notify::display-name", G_CALLBACK (invalidate_calendar_listbox_sort), + priv->calendars_listbox); /* parent source name label */ bottom_label = g_object_new (GTK_TYPE_LABEL,