diff options
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r-- | calendar/gui/e-tasks.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 92917d6d55..237f90959e 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -37,6 +37,10 @@ #include "e-tasks.h" +/* A list of all of the ETasks widgets in use. We use this to update the + user preference settings. This will change when we switch to GConf. */ +static GList *all_tasks = NULL; + /* Private part of the GnomeCalendar structure */ struct _ETasksPrivate { @@ -160,6 +164,7 @@ setup_widgets (ETasks *tasks) gtk_table_attach (GTK_TABLE (tasks), priv->tasks_view, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_show (priv->tasks_view); + calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->tasks_view)); gtk_signal_connect (GTK_OBJECT (E_CALENDAR_TABLE (priv->tasks_view)->model), "categories-changed", @@ -212,6 +217,8 @@ e_tasks_new (void) return NULL; } + all_tasks = g_list_prepend (all_tasks, tasks); + return GTK_WIDGET (tasks); } @@ -246,6 +253,8 @@ e_tasks_destroy (GtkObject *object) g_free (priv); tasks->priv = NULL; + all_tasks = g_list_remove (all_tasks, tasks); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -565,3 +574,20 @@ e_tasks_setup_menus (ETasks *tasks, gtk_object_sink (GTK_OBJECT (collection)); } + + +/* This updates all the preference settings for all the ETasks widgets in use. + */ +void +e_tasks_update_all_config_settings () +{ + ETasks *tasks; + ETasksPrivate *priv; + GList *elem; + + for (elem = all_tasks; elem; elem = elem->next) { + tasks = E_TASKS (elem->data); + priv = tasks->priv; + calendar_config_configure_e_calendar (E_CALENDAR_TABLE (priv->tasks_view)); + } +} |