aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/calendar-component.c18
-rw-r--r--calendar/gui/component-factory.c18
3 files changed, 42 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2cbf26c8d1..7b1b0fa673 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2001-07-11 JP Rosevear <jpr@ximian.com>
+ * 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
+
+2001-07-11 JP Rosevear <jpr@ximian.com>
+
* gui/dialogs/meeting-page.c: be careful about adding and
stripping MAILTO:'s properly
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);
}
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
index d29f3bbc5d..ebcf207884 100644
--- a/calendar/gui/component-factory.c
+++ b/calendar/gui/component-factory.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);
}