From e56b3158f062d3f61d18f4b888035d8a3b2583d1 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Thu, 26 Jul 2007 12:40:12 +0000 Subject: Do not need to call g_source_remove(). If the callback function returns 2007-07-26 Hiroyuki Ikezoe * gui/main.c: Do not need to call g_source_remove(). If the callback function returns FALSE, the event source is automatically removed. svn path=/trunk/; revision=33853 --- calendar/ChangeLog | 5 +++++ calendar/gui/main.c | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0b460de7a2..6512947a85 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2007-07-26 Hiroyuki Ikezoe + + * gui/main.c: Do not need to call g_source_remove(). If the callback + function returns FALSE, the event source is automatically removed. + 2007-07-26 Hiroyuki Ikezoe * gui/alarm-notify/config-data.c, gui/tasks-component.c, diff --git a/calendar/gui/main.c b/calendar/gui/main.c index f20e093045..2b370f579f 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -94,11 +94,6 @@ launch_alarm_daemon_cb (gpointer data) { CORBA_Environment ev; CORBA_Object an; - guint *idle_id = (guint *) data; - - /* remove the idle function */ - g_source_remove (*idle_id); - g_free (idle_id); /* activate the alarm daemon */ CORBA_exception_init (&ev); @@ -126,10 +121,7 @@ launch_alarm_daemon_cb (gpointer data) static void launch_alarm_daemon (void) { - guint *idle_id; - - idle_id = g_new0 (guint, 1); - *idle_id = g_idle_add ((GSourceFunc) launch_alarm_daemon_cb, idle_id); + g_idle_add ((GSourceFunc) launch_alarm_daemon_cb, NULL); } static void -- cgit