From ac4fa265ebf9b7d6159d41111e18775aa74b1475 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 12 Jul 2001 00:02:32 +0000 Subject: fix the calendar not exiting with a gross hack because i don't have time 2001-07-11 JP Rosevear * gui/component-factory.c: fix the calendar not exiting with a gross hack because i don't have time to fix the ref counting right now svn path=/trunk/; revision=11022 --- calendar/gui/calendar-component.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'calendar/gui/calendar-component.c') diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index d29f3bbc5d..ebcf207884 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -288,8 +288,21 @@ owner_set_cb (EvolutionShellComponent *shell_component, tasks_migrate (); migrated = TRUE; } + + shells = g_list_append (shells, shell_component); +} + +static void +owner_unset_cb (EvolutionShellComponent *shell_component, + gpointer user_data) +{ + shells = g_list_remove (shells, shell_component); + + if (g_list_length (shells) == 0) + gtk_main_quit (); } +#if 0 static void destroy_cb (EvolutionShellComponent *shell_component, gpointer user_data) @@ -299,6 +312,7 @@ destroy_cb (EvolutionShellComponent *shell_component, if (g_list_length (shells) == 0) gtk_main_quit (); } +#endif /* The factory function. */ @@ -321,10 +335,14 @@ 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); +#if 0 gtk_signal_connect (GTK_OBJECT (shell_component), "destroy", GTK_SIGNAL_FUNC (destroy_cb), NULL); shells = g_list_append (shells, shell_component); +#endif return BONOBO_OBJECT (shell_component); } -- cgit v1.2.3