aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-05-15 02:45:55 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-05-15 02:45:55 +0800
commit352d3c7d3b080850f4fc81b502a0f0b0d3c2369d (patch)
treebcf141b2a6e60c5382ab04c1fd439c9319556ad0 /calendar/gui/e-calendar-table.c
parent0203f5de7608f34c6510948b36f522c4c3a87fef (diff)
downloadgsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar.gz
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar.bz2
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar.lz
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar.xz
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.tar.zst
gsoc2013-evolution-352d3c7d3b080850f4fc81b502a0f0b0d3c2369d.zip
guard against multiple destroys
2003-05-14 JP Rosevear <jpr@ximian.com> * gui/e-tasks.c (e_tasks_destroy): guard against multiple destroys * cal-client/cal-client.c (cal_client_finalize): unref the bonobo listener * gui/gnome-cal.c (gnome_calendar_destroy): guard against multiple destroy calls * gui/e-week-view.c (e_week_view_init): connect after destroy (invisible_destroyed): don't unref, its already destroyed * gui/e-day-view.c (e_day_view_init): connect after destroy (invisible_destroyed): don't unref, its already destroyed * gui/e-calendar-table.c (e_calendar_table_class_init): make sure we set the parent class (e_calendar_table_init): connect after the destroy handler runs (e_calendar_table_destroy): guard against multiple destroys (invisible_destroyed): don't unref the invisible, its already being destroyed * gui/calendar-offline-handler.c (backend_cal_set_mode): unref the client, we are done with it now (backend_cal_opened_online): ditto (impl_dispose): unref our main client * gui/calendar-commands.c (control_util_set_folder_bar_label): release/unref the shell view once we are done with it (control_util_show_settings): ditto svn path=/trunk/; revision=21180
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index b3ac35e045..6f31455fb8 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -135,6 +135,7 @@ e_calendar_table_class_init (ECalendarTableClass *class)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
+ parent_class = g_type_class_peek_parent (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
@@ -533,8 +534,8 @@ e_calendar_table_init (ECalendarTable *cal_table)
G_CALLBACK (selection_clear_event), cal_table);
g_signal_connect (cal_table->invisible, "selection_received",
G_CALLBACK (selection_received), cal_table);
- g_signal_connect (cal_table->invisible, "destroy",
- G_CALLBACK (invisible_destroyed), cal_table);
+ g_signal_connect_after (cal_table->invisible, "destroy",
+ G_CALLBACK (invisible_destroyed), cal_table);
cal_table->clipboard_selection = NULL;
}
@@ -582,9 +583,11 @@ e_calendar_table_destroy (GtkObject *object)
cal_table = E_CALENDAR_TABLE (object);
- g_object_unref (cal_table->model);
- cal_table->model = NULL;
-
+ if (cal_table->model) {
+ g_object_unref (cal_table->model);
+ cal_table->model = NULL;
+ }
+
if (cal_table->invisible)
gtk_widget_destroy (cal_table->invisible);
if (cal_table->clipboard_selection) {
@@ -1175,7 +1178,6 @@ e_calendar_table_save_state (ECalendarTable *cal_table,
static void
invisible_destroyed (GtkWidget *invisible, ECalendarTable *cal_table)
{
- g_object_unref (cal_table->invisible);
cal_table->invisible = NULL;
}