[gnome-calendar/calendar-editor] source-dialog: bind source::display-name with label::label
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: bind source::display-name with label::label
- Date: Sat, 2 May 2015 02:15:35 +0000 (UTC)
commit 4a5cff87aa2097306fe0d30110c4c478089cde62
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 1 23:15:01 2015 -0300
source-dialog: bind source::display-name with label::label
src/gcal-source-dialog.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 05a5e52..9177720 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]