aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
authorSam Yang <sam.yang@sun.com>2006-03-03 21:24:39 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-03-03 21:24:39 +0800
commit592f7b147ef9546ddea75d7fe71a6950180eceff (patch)
treec65e391b1660a6393a1fbb578a44fb62615330f5 /calendar/gui/e-tasks.c
parentc7ce7a09d004d290b291ba26310260d27806e6c7 (diff)
downloadgsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar.gz
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar.bz2
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar.lz
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar.xz
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.tar.zst
gsoc2013-evolution-592f7b147ef9546ddea75d7fe71a6950180eceff.zip
Fixes #324560 Request notification of changes to show_task_preview.
2006-03-03 Sam Yang <sam.yang@sun.com> Fixes #324560 * gui/calendar-config.[ch]: (calendar_config_add_notification_preview_state): Request notification of changes to show_task_preview. * gui/e-tasks.c: (config_preview_state_changed_cb): Callback function. (setup_config): Send notification request and store connection ID. svn path=/trunk/; revision=31631
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 0b10001fc0..77056b7860 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -377,6 +377,21 @@ view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, ETa
}
static void
+config_preview_state_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
+{
+ gboolean state;
+ GConfValue *value;
+ ETasks *tasks = (ETasks *)data;
+
+ g_return_if_fail (gconf_entry_get_key (entry) != NULL);
+ g_return_if_fail ((value = gconf_entry_get_value (entry)) != NULL);
+
+ state = gconf_value_get_bool (value);
+ e_tasks_show_preview (tasks, state);
+ bonobo_ui_component_set_prop (E_SEARCH_BAR (tasks->priv->search_bar)->ui_component, "/commands/ViewPreview", "state", state ? "1" : "0", NULL);
+}
+
+static void
setup_config (ETasks *tasks)
{
ETasksPrivate *priv;
@@ -401,6 +416,9 @@ setup_config (ETasks *tasks)
not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
tasks);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
+
+ not = calendar_config_add_notification_preview_state (config_preview_state_changed_cb, tasks);
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
}
static void