diff options
author | Rodney Dawes <dobey@novell.com> | 2004-06-23 11:42:05 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-06-23 11:42:05 +0800 |
commit | a62fe63cc0754bb9a9ff8173aa6ab9f0a2fcdef5 (patch) | |
tree | 317b7cf6ac0dbf26c0a2d8b2184c26e7ff0171b9 /calendar/gui/calendar-component.c | |
parent | 360db2d0ee48ca66fb012c440b98861232622b0e (diff) | |
download | gsoc2013-evolution-a62fe63cc0754bb9a9ff8173aa6ab9f0a2fcdef5.tar.gz gsoc2013-evolution-a62fe63cc0754bb9a9ff8173aa6ab9f0a2fcdef5.tar.zst gsoc2013-evolution-a62fe63cc0754bb9a9ff8173aa6ab9f0a2fcdef5.zip |
Add these two callbacks so that we can update the selection in the
2004-06-22 Rodney Dawes <dobey@novell.com>
* gui/calendar-component.c (config_calendars_selection_changed_cb):
(config_primary_calendar_selection_changed_cb):
Add these two callbacks so that we can update the selection in the
calendar when the gconf key changes, like we do for tasks
(create_component_view): Register the two callbacks that we created
for updating the selection in the view, and their notification IDs
svn path=/trunk/; revision=26470
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r-- | calendar/gui/calendar-component.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 8769016978..74852b18a3 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -571,6 +571,12 @@ config_primary_selection_changed_cb (GConfClient *client, guint id, GConfEntry * } static void +config_calendars_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) +{ + update_selection (data); +} + +static void config_tasks_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) { update_task_selection (data); @@ -578,6 +584,12 @@ config_tasks_selection_changed_cb (GConfClient *client, guint id, GConfEntry *en static void +config_primary_calendar_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) +{ + update_primary_selection (data); +} + +static void config_primary_tasks_selection_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data) { update_primary_task_selection (data); @@ -1114,6 +1126,15 @@ create_component_view (CalendarComponent *calendar_component) update_task_selection (component_view); update_primary_task_selection (component_view); + /* If the calendar selection changes elsewhere, update it */ + not = calendar_config_add_notification_calendars_selected (config_calendars_selection_changed_cb, + component_view); + component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not)); + + not = calendar_config_add_notification_primary_calendar (config_primary_calendar_selection_changed_cb, + component_view); + component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not)); + /* If the task selection changes elsewhere, update it */ not = calendar_config_add_notification_tasks_selected (config_tasks_selection_changed_cb, component_view); |