aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 5ca51772b9..4e92055619 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -67,12 +67,24 @@ create_view (EvolutionShellComponent *shell_component,
return EVOLUTION_SHELL_COMPONENT_OK;
}
+static gint owner_count = 0;
+
static void
owner_set_cb (EvolutionShellComponent *shell_component,
+ Evolution_Shell shell_interface)
+{
+ owner_count ++;
+}
+
+static void
+owner_unset_cb (EvolutionShellComponent *shell_component,
+ Evolution_Shell shell_interface)
EvolutionShellClient shell_client,
void *data)
{
- g_print ("evolution-calendar: Yeeeh! We have an owner!\n"); /* FIXME */
+ owner_count --;
+ if (owner_count <= 0)
+ gtk_main_quit();
}
@@ -88,6 +100,8 @@ factory_fn (BonoboGenericFactory *factory,
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
+ GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
return BONOBO_OBJECT (shell_component);
}