From 6e72a236dcb592a942881e118d6a71888ea1581b Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Mon, 4 May 2009 10:10:55 +0530 Subject: ** BUGFIX: 573830 - g_timeout_add_seconds should be preferred to g_timeout_add According to https://wiki.ubuntu.com/SavingTheWorld (and of course according to the gtk docs) using g_timeout_add_seconds is preferred over g_timeout_add if a timeout in seconds is desired. --- calendar/gui/alarm-notify/alarm-queue.c | 2 +- calendar/gui/alarm-notify/alarm.c | 2 +- calendar/gui/e-meeting-time-sel.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 1ec93f8df1..f3167d813c 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1864,7 +1864,7 @@ alarm_queue_init (gpointer data) } /* install timeout handler (every 30 mins) for not missing the midnight refresh */ - g_timeout_add (1800000, (GSourceFunc) check_midnight_refresh, NULL); + g_timeout_add_seconds (1800, (GSourceFunc) check_midnight_refresh, NULL); #ifdef HAVE_LIBNOTIFY notify_init("Evolution Alarms"); diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index bf96f1f664..5dca49ae25 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -153,7 +153,7 @@ setup_timeout (void) g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now); g_message (" %s", ctime (&ar->trigger)); g_message (" %s", ctime (&now)); - timeout_id = g_timeout_add (diff * 1000, alarm_ready_cb, NULL); + timeout_id = g_timeout_add_seconds (diff, alarm_ready_cb, NULL); } diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index a106a46d49..25c8a86b97 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -2918,7 +2918,7 @@ row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data) } -#define REFRESH_PAUSE 5000 +#define REFRESH_PAUSE 5 static gboolean free_busy_timeout_refresh (gpointer data) @@ -2952,7 +2952,7 @@ free_busy_template_changed_cb (GConfClient *client, g_source_remove (mts->fb_refresh_not); } - mts->fb_refresh_not = g_timeout_add (REFRESH_PAUSE, + mts->fb_refresh_not = g_timeout_add_seconds (REFRESH_PAUSE, free_busy_timeout_refresh, data); } -- cgit v1.2.3