aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-01 10:53:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-02-20 23:04:25 +0800
commit23f5773903d64a554d977ae7d0ebbaca73528f1f (patch)
tree104e1a59da8bf96b004bce204b79f47bbe0a6d13 /modules/calendar/e-task-shell-view-private.c
parent49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff)
downloadgsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/calendar/e-task-shell-view-private.c')
-rw-r--r--modules/calendar/e-task-shell-view-private.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 916494757d..560ce01940 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -47,9 +47,8 @@ task_shell_view_model_row_appended_cb (ETaskShellView *task_shell_view,
}
static gboolean
-task_shell_view_process_completed_tasks (gpointer user_data)
+task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view)
{
- ETaskShellView *task_shell_view = user_data;
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
ETaskTable *task_table;
@@ -77,11 +76,18 @@ task_shell_view_process_completed_tasks (gpointer user_data)
static void
task_shell_view_schedule_process_completed_tasks (ETaskShellView *task_shell_view)
{
- if (task_shell_view->priv->update_completed_timeout)
- g_source_remove (task_shell_view->priv->update_completed_timeout);
+ guint source_id;
- task_shell_view->priv->update_completed_timeout =
- g_timeout_add_seconds (1, task_shell_view_process_completed_tasks, task_shell_view);
+ source_id = task_shell_view->priv->update_completed_timeout;
+
+ if (source_id > 0)
+ g_source_remove (source_id);
+
+ source_id = g_timeout_add_seconds (
+ 1, (GSourceFunc) task_shell_view_process_completed_tasks,
+ task_shell_view);
+
+ task_shell_view->priv->update_completed_timeout = source_id;
}
static void