aboutsummaryrefslogtreecommitdiffstats
path: root/wombat/wombat.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-05-01 12:22:17 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-05-01 12:22:17 +0800
commitc94793983e7e5b95403a29d3a1fe79955c8e33a2 (patch)
tree14d0a324fa9ee7186334e5fb5f9143cc561ab6cd /wombat/wombat.c
parentd936a5c38a6125548ec44eac981a26d42ce72413 (diff)
downloadgsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar.gz
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar.bz2
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar.lz
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar.xz
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.tar.zst
gsoc2013-evolution-c94793983e7e5b95403a29d3a1fe79955c8e33a2.zip
Connect to the "last_book_gone" signal of the book factory.
2000-04-30 Federico Mena Quintero <federico@helixcode.com> * wombat.c (setup_pas): Connect to the "last_book_gone" signal of the book factory. (last_book_gone_cb): Handle the "last_book_gone" signal. (termination_handler): Check if the book factory has zero running backends. svn path=/trunk/; revision=2706
Diffstat (limited to 'wombat/wombat.c')
-rw-r--r--wombat/wombat.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/wombat/wombat.c b/wombat/wombat.c
index 43ee72d886..79af7f057f 100644
--- a/wombat/wombat.c
+++ b/wombat/wombat.c
@@ -40,7 +40,8 @@ termination_handler (gpointer data)
{
/* FIXME: add the test for the PAS as well */
- if (cal_factory_get_n_backends (cal_factory) == 0)
+ if (cal_factory_get_n_backends (cal_factory) == 0
+ && pas_book_factory_get_n_backends (pas_book_factory) == 0)
gtk_main_quit ();
termination_handler_id = 0;
@@ -60,6 +61,12 @@ queue_termination (void)
static void
+last_book_gone_cb (PASBookFactory *factory, gpointer data)
+{
+ queue_termination ();
+}
+
+static void
setup_pas (int argc, char **argv)
{
pas_book_factory = pas_book_factory_new ();
@@ -72,6 +79,11 @@ setup_pas (int argc, char **argv)
pas_book_factory, "ldap", pas_backend_ldap_new);
#endif
+ gtk_signal_connect (GTK_OBJECT (pas_book_factory),
+ "last_book_gone",
+ GTK_SIGNAL_FUNC (last_book_gone_cb),
+ NULL);
+
pas_book_factory_activate (pas_book_factory);
}