aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-04-18 03:17:07 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-04-18 03:17:07 +0800
commit0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9 (patch)
tree2c4673df75c8dbe393d8cf508d6c86a4d186d735 /calendar/pcs
parent9d802454e659ed526f4f5c73abad7b227aa20a5f (diff)
downloadgsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar.gz
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar.bz2
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar.lz
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar.xz
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.tar.zst
gsoc2013-evolution-0fb3c90934dc460fb97da23fa7a22a6eb4c34fe9.zip
We have a new "last_calendar_gone" signal that Wombat can use to terminate
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". svn path=/trunk/; revision=2475
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/Makefile.am5
-rw-r--r--calendar/pcs/cal-factory.c22
-rw-r--r--calendar/pcs/cal-factory.h2
3 files changed, 26 insertions, 3 deletions
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);