Re: [evolution-patches] Session manage evolution-wombat
- From: Rodrigo Moya <rodrigo ximian com>
- To: Jeremy Katz <katzj redhat com>
- Cc: Evolution Patches <evolution-patches ximian com>
- Subject: Re: [evolution-patches] Session manage evolution-wombat
- Date: Thu, 30 Oct 2003 00:50:55 +0100
On Sun, 2003-10-26 at 22:44, Jeremy Katz wrote:
> On Fri, 2003-10-24 at 14:44, Jeremy Katz wrote:
> > alarm-notify exits, but wombat remains running (and thus, so does
> > b-a-s).
>
> And checking, all of the PAS and PCS backends are still active even
> after the display is gone. I notice that there's nothing explicitly
> removing references to the calendar backends when the alarm-notify dies
> -- should that be happening?
>
no, this might be the cause, at least for the calendar part. Please test
attached patch, which I think should be enough to not keep PCS backends
around.
I suppose the PAS backends might be active because of the PCS ones,
since the local calendar backend uses the default addressbook.
So, let's see if this fixes it.
cheers
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1802.2.35
diff -u -p -r1.1802.2.35 ChangeLog
--- ChangeLog 8 Oct 2003 09:32:06 -0000 1.1802.2.35
+++ ChangeLog 30 Oct 2003 00:08:00 -0000
@@ -1,3 +1,13 @@
+2003-10-24 Rodrigo Moya <rodrigo ximian com>
+
+ * 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-08 Harry Lu <harry lu sun com>
* gui/dialogs/alarm-options.glade: Make repeat-quantity and
Index: gui/alarm-notify/alarm-queue.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-queue.c,v
retrieving revision 1.40
diff -u -p -r1.40 alarm-queue.c
--- gui/alarm-notify/alarm-queue.c 13 May 2003 22:59:06 -0000 1.40
+++ gui/alarm-notify/alarm-queue.c 30 Oct 2003 00:08:00 -0000
@@ -986,6 +986,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:
*
@@ -1001,6 +1013,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;
Index: gui/alarm-notify/notify-main.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/notify-main.c,v
retrieving revision 1.25.4.2
diff -u -p -r1.25.4.2 notify-main.c
--- gui/alarm-notify/notify-main.c 22 Aug 2003 15:23:35 -0000 1.25.4.2
+++ gui/alarm-notify/notify-main.c 30 Oct 2003 00:08:00 -0000
@@ -34,7 +34,6 @@
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo-activation/bonobo-activation.h>
-#include <gtk/gtkmain.h>
#include "alarm.h"
#include "alarm-queue.h"
#include "alarm-notify.h"
@@ -55,7 +54,7 @@ static AlarmNotify *alarm_notify_service
static void
client_die_cb (GnomeClient *client)
{
- gtk_main_quit ();
+ bonobo_main_quit ();
}
/* Sees if a session manager is present. If so, it tells the SM how to restart
@@ -193,10 +192,11 @@ main (int argc, char **argv)
bonobo_object_unref (BONOBO_OBJECT (factory));
factory = NULL;
- /* FIXME: free the alarm_notify_service */
-
alarm_queue_done ();
alarm_done ();
+
+ if (alarm_notify_service)
+ bonobo_object_unref (BONOBO_OBJECT (alarm_notify_service));
gnome_sound_shutdown ();
gnome_vfs_shutdown ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]