aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-05-16 22:36:56 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-05-16 22:36:56 +0800
commit58c259ace11ebb84e898749e9b47c32e59e206cf (patch)
treea6e6180e30ecf13d6e345e4b83ec1ea4a319c04a /calendar/gui/e-week-view.c
parent89140b1640d11748535776c84ab2df4b21052c68 (diff)
downloadgsoc2013-evolution-58c259ace11ebb84e898749e9b47c32e59e206cf.tar.gz
gsoc2013-evolution-58c259ace11ebb84e898749e9b47c32e59e206cf.tar.zst
gsoc2013-evolution-58c259ace11ebb84e898749e9b47c32e59e206cf.zip
Fixes #43029
2003-05-15 JP Rosevear <jpr@ximian.com> Fixes #43029 * gui/e-week-view.c (e_week_view_init): don't listen for destroy signal (e_week_view_destroy): check for NULL and make invisible NULL after we destroy it, unref cursors and NULL them out as well, guard against freeing events multiple times * gui/e-day-view.c (e_day_view_destroy): check for NULL and make invisible NULL after we destroy it, unref cursors and NULL them out as well, guard against freeing events multiple times (e_day_view_init): don't listen for destroy signal * gui/e-calendar-table.c (e_calendar_table_init): don't listen for destroy signal (e_calendar_table_destroy): check for NULL and make invisible NULL after we destroy it svn path=/trunk/; revision=21208
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 2ca52c8ca7..2e83b2c6c7 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -218,7 +218,6 @@ static gboolean e_week_view_remove_event_cb (EWeekView *week_view,
gpointer data);
static gboolean e_week_view_recalc_display_start_day (EWeekView *week_view);
-static void invisible_destroyed (GtkWidget *invisible, EWeekView *week_view);
static void selection_get (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint info,
@@ -434,8 +433,6 @@ e_week_view_init (EWeekView *week_view)
G_CALLBACK (selection_clear_event), (gpointer) week_view);
g_signal_connect (week_view->invisible, "selection_received",
G_CALLBACK (selection_received), (gpointer) week_view);
- g_signal_connect_after (week_view->invisible, "destroy",
- G_CALLBACK (invisible_destroyed), (gpointer) week_view);
week_view->clipboard_selection = NULL;
@@ -469,10 +466,12 @@ e_week_view_destroy (GtkObject *object)
e_week_view_cancel_layout (week_view);
- e_week_view_free_events (week_view);
- g_array_free (week_view->events, TRUE);
- week_view->events = NULL;
-
+ if (week_view->events) {
+ e_week_view_free_events (week_view);
+ g_array_free (week_view->events, TRUE);
+ week_view->events = NULL;
+ }
+
if (week_view->client) {
g_signal_handlers_disconnect_matched (week_view->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, week_view);
g_object_unref (week_view->client);
@@ -501,12 +500,23 @@ e_week_view_destroy (GtkObject *object)
week_view->default_category = NULL;
}
- gdk_cursor_destroy (week_view->normal_cursor);
- gdk_cursor_destroy (week_view->move_cursor);
- gdk_cursor_destroy (week_view->resize_width_cursor);
-
- if (week_view->invisible)
+ if (week_view->normal_cursor) {
+ gdk_cursor_unref (week_view->normal_cursor);
+ week_view->normal_cursor = NULL;
+ }
+ if (week_view->move_cursor) {
+ gdk_cursor_unref (week_view->move_cursor);
+ week_view->move_cursor = NULL;
+ }
+ if (week_view->resize_width_cursor) {
+ gdk_cursor_unref (week_view->resize_width_cursor);
+ week_view->resize_width_cursor = NULL;
+ }
+
+ if (week_view->invisible) {
gtk_widget_destroy (week_view->invisible);
+ week_view->invisible = NULL;
+ }
if (week_view->clipboard_selection) {
g_free (week_view->clipboard_selection);
week_view->clipboard_selection = NULL;
@@ -4218,12 +4228,6 @@ e_week_view_get_time_string_width (EWeekView *week_view)
}
static void
-invisible_destroyed (GtkWidget *invisible, EWeekView *week_view)
-{
- week_view->invisible = NULL;
-}
-
-static void
selection_get (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint info,