diff options
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r-- | calendar/gui/calendar-commands.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 29557e2d68..4b6078df99 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -434,6 +434,13 @@ calendar_control_deactivate (BonoboControl *control) bonobo_ui_component_unset_container (uic); } +/* Removes a calendar from our list of all calendars when it is destroyed. */ +static void +on_calendar_destroyed (GnomeCalendar *gcal) +{ + all_calendars = g_list_remove (all_calendars, gcal); +} + GnomeCalendar * new_calendar (void) { @@ -446,6 +453,9 @@ new_calendar (void) return NULL; } + gtk_signal_connect (GTK_OBJECT (gcal), "destroy", + GTK_SIGNAL_FUNC (on_calendar_destroyed), NULL); + all_calendars = g_list_prepend (all_calendars, gcal); return GNOME_CALENDAR (gcal); |