aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog14
-rw-r--r--calendar/pcs/Makefile.am5
-rw-r--r--calendar/pcs/cal-factory.c22
-rw-r--r--calendar/pcs/cal-factory.h2
4 files changed, 40 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 71bd524e88..ee1f7f80d9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,17 @@
+2000-04-16 Federico Mena Quintero <federico@helixcode.com>
+
+ * pcs/cal-factory.h (CalFactoryClass): We have a new
+ "last_calendar_gone" signal that Wombat can use to terminate
+ itself properly.
+
+ * pcs/cal-factory.c (cal_factory_class_init): Register the
+ "last_calendar_gone" signal.
+ (backend_destroy_cb): Emit the "last_calendar_gone" signal instead
+ of killing the factory.
+
+ * pcs/Makefile.am: Added $(CORBA_GENERATED) to BUILT_SOURCES.
+ (INCLUDES): Make the log domain be "wombat-pcs".
+
2000-04-17 Seth Alves <alves@hungry.com>
* pcs/cal-backend.c (add_object): removed implicit save, since
diff --git a/calendar/pcs/Makefile.am b/calendar/pcs/Makefile.am
index a13df5b990..16b4f22dbd 100644
--- a/calendar/pcs/Makefile.am
+++ b/calendar/pcs/Makefile.am
@@ -1,5 +1,5 @@
INCLUDES = \
- -DG_LOG_DOMAIN=\"pcs\" \
+ -DG_LOG_DOMAIN=\"wombat-pcs\" \
-I$(top_srcdir) \
-I$(top_srcdir)/calendar \
-I$(top_srcdir)/libical/src/libical \
@@ -35,3 +35,6 @@ libpcs_a_SOURCES = \
icalendar.h \
job.c \
job.h
+
+BUILT_SOURCES = $(CORBA_GENERATED)
+CLEANFILES += $(BUILT_SOURCES)
diff --git a/calendar/pcs/cal-factory.c b/calendar/pcs/cal-factory.c
index a170718678..63f6eb22c6 100644
--- a/calendar/pcs/cal-factory.c
+++ b/calendar/pcs/cal-factory.c
@@ -36,6 +36,12 @@ typedef struct {
+/* Signal IDs */
+enum {
+ LAST_CALENDAR_GONE,
+ LAST_SIGNAL
+};
+
static void cal_factory_class_init (CalFactoryClass *class);
static void cal_factory_init (CalFactory *factory);
static void cal_factory_destroy (GtkObject *object);
@@ -44,6 +50,8 @@ static POA_Evolution_Calendar_CalFactory__vepv cal_factory_vepv;
static BonoboObjectClass *parent_class;
+static guint cal_factory_signals[LAST_SIGNAL];
+
/**
@@ -96,6 +104,16 @@ cal_factory_class_init (CalFactoryClass *class)
parent_class = gtk_type_class (bonobo_object_get_type ());
+ cal_factory_signals[LAST_CALENDAR_GONE] =
+ gtk_signal_new ("last_calendar_gone",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (CalFactoryClass, last_calendar_gone),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ gtk_object_class_add_signals (object_class, cal_factory_signals, LAST_SIGNAL);
+
object_class->destroy = cal_factory_destroy;
init_cal_factory_corba_class ();
@@ -276,10 +294,10 @@ backend_destroy_cb (GtkObject *object, gpointer data)
g_hash_table_remove (priv->backends, orig_uri);
gnome_vfs_uri_unref (orig_uri);
- /* If there are no more backends, then the factory can go away */
+ /* Notify upstream if there are no more backends */
if (g_hash_table_size (priv->backends) == 0)
- bonobo_object_unref (BONOBO_OBJECT (factory));
+ gtk_signal_emit (GTK_OBJECT (factory), cal_factory_signals[LAST_CALENDAR_GONE]);
}
/* Adds a backend to the calendar factory's hash table */
diff --git a/calendar/pcs/cal-factory.h b/calendar/pcs/cal-factory.h
index 9d5fd57e2c..7100a35d69 100644
--- a/calendar/pcs/cal-factory.h
+++ b/calendar/pcs/cal-factory.h
@@ -49,6 +49,8 @@ struct _CalFactory {
struct _CalFactoryClass {
BonoboObjectClass parent_class;
+
+ void (* last_calendar_gone) (CalFactory *factory);
};
GtkType cal_factory_get_type (void);