diff options
author | Hiroyuki Ikezoe <poincare@ikezoe.net> | 2007-07-26 20:40:12 +0800 |
---|---|---|
committer | Hiroyuki Ikezoe <hiikezoe@src.gnome.org> | 2007-07-26 20:40:12 +0800 |
commit | e56b3158f062d3f61d18f4b888035d8a3b2583d1 (patch) | |
tree | f3f630a2b315a76e9e0157283fe96d3aef56b13a | |
parent | 7193b99f7ae278d58bc06c0322d8c12eddaf2df6 (diff) | |
download | gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar.gz gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar.bz2 gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar.lz gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar.xz gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.tar.zst gsoc2013-evolution-e56b3158f062d3f61d18f4b888035d8a3b2583d1.zip |
Do not need to call g_source_remove(). If the callback function returns
2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net>
* 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
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | 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,5 +1,10 @@ 2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net> + * 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 <poincare@ikezoe.net> + * gui/alarm-notify/config-data.c, gui/tasks-component.c, gui/calendar-component.c, gui/memos-component.c: Plugged memory leaks. 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 |