From bc0d5d40ed39c92dcdf62ae891a2e99c25237d74 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 29 Oct 2013 14:04:54 -0400 Subject: Bug 710797 - Name all the timeouts added with g_timeout_add() --- shell/e-shell-view.c | 9 ++++++--- shell/killev.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index b7813eacc6..fe9724c46f 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -299,10 +299,13 @@ shell_view_save_state (EShellView *shell_view, } static gboolean -shell_view_state_timeout_cb (EShellView *shell_view) +shell_view_state_timeout_cb (gpointer user_data) { + EShellView *shell_view; EActivity *activity; + shell_view = E_SHELL_VIEW (user_data); + /* If a save is still in progress, check back later. */ if (shell_view->priv->state_save_activity != NULL) return TRUE; @@ -1697,8 +1700,8 @@ e_shell_view_set_state_dirty (EShellView *shell_view) if (shell_view->priv->state_save_timeout_id > 0) return; - source_id = g_timeout_add_seconds ( - STATE_SAVE_TIMEOUT_SECONDS, (GSourceFunc) + source_id = e_named_timeout_add_seconds ( + STATE_SAVE_TIMEOUT_SECONDS, shell_view_state_timeout_cb, shell_view); shell_view->priv->state_save_timeout_id = source_id; diff --git a/shell/killev.c b/shell/killev.c index 8cd773ef9d..ea4ad2a8ce 100644 --- a/shell/killev.c +++ b/shell/killev.c @@ -54,7 +54,7 @@ file_monitor_changed_cb (GFileMonitor *monitor, } static gboolean -evolution_not_responding_cb (void) +evolution_not_responding_cb (gpointer user_data) { g_print ("No response from Evolution -- killing the process\n"); @@ -149,8 +149,8 @@ main (gint argc, monitor, "changed", G_CALLBACK (file_monitor_changed_cb), NULL); - g_timeout_add_seconds ( - EVOLUTION_SHUTDOWN_TIMEOUT, (GSourceFunc) + e_named_timeout_add_seconds ( + EVOLUTION_SHUTDOWN_TIMEOUT, evolution_not_responding_cb, NULL); /* Start the clock. */ -- cgit v1.2.3