aboutsummaryrefslogtreecommitdiffstats
path: root/wombat/wombat.c
diff options
context:
space:
mode:
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);
}