From d436118b5f7c5bb7371f5f856b0e54197b60dd1f Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 30 Oct 2003 18:21:47 +0000 Subject: use bonobo_main_quit, not gtk_main_quit. 2003-10-24 Rodrigo Moya * gui/alarm-notify/notify-main.c (client_die_cb): use bonobo_main_quit, not gtk_main_quit. * gui/alarm-notify/alarm-queue.c (free_client_alarms_cb): callback for freeing ClientAlarms stored in the hash table. (alarm_queue_done): call free_client_alarms_cb() for each opened client. svn path=/trunk/; revision=23134 --- calendar/ChangeLog | 10 ++++++++++ calendar/gui/alarm-notify/alarm-queue.c | 13 +++++++++++++ calendar/gui/alarm-notify/notify-main.c | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 2cba6aac9e..1a9af112ec 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +2003-10-24 Rodrigo Moya + + * gui/alarm-notify/notify-main.c (client_die_cb): use + bonobo_main_quit, not gtk_main_quit. + + * gui/alarm-notify/alarm-queue.c (free_client_alarms_cb): callback + for freeing ClientAlarms stored in the hash table. + (alarm_queue_done): call free_client_alarms_cb() for each opened + client. + 2003-10-30 Rodrigo Moya * pcs/cal-backend-file.c (mark_dirty, save_idle): removed, since diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index cee17bd97e..774604c804 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1122,6 +1122,18 @@ alarm_queue_init (void) alarm_queue_inited = TRUE; } +static void +free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data) +{ + CalClient *client = key; + ClientAlarms *ca = value; + + if (ca) { + g_object_unref (ca->client); + g_free (ca); + } +} + /** * alarm_queue_done: * @@ -1137,6 +1149,7 @@ alarm_queue_done (void) /* All clients must be unregistered by now */ g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0); + g_hash_table_foreach (client_alarms_hash, (GHFunc) free_client_alarms_cb, NULL); g_hash_table_destroy (client_alarms_hash); client_alarms_hash = NULL; diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index d58b5f9e4a..bed7de3653 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "alarm.h" #include "alarm-queue.h" #include "alarm-notify.h" @@ -198,6 +197,9 @@ main (int argc, char **argv) alarm_queue_done (); alarm_done (); + if (alarm_notify_service) + bonobo_object_unref (BONOBO_OBJECT (alarm_notify_service)); + gnome_sound_shutdown (); gnome_vfs_shutdown (); -- cgit