aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-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-day-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-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c49
1 files changed, 30 insertions, 19 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 9c29b00356..6764085741 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -465,7 +465,6 @@ static void selection_get (GtkWidget *invisible,
guint info,
guint time_stamp,
EDayView *day_view);
-static void invisible_destroyed (GtkWidget *invisible, EDayView *day_view);
static void e_day_view_queue_layout (EDayView *day_view);
static void e_day_view_cancel_layout (EDayView *day_view);
@@ -843,8 +842,6 @@ e_day_view_init (EDayView *day_view)
G_CALLBACK (selection_clear_event), (gpointer) day_view);
g_signal_connect (day_view->invisible, "selection_received",
G_CALLBACK (selection_received), (gpointer) day_view);
- g_signal_connect_after (day_view->invisible, "destroy",
- G_CALLBACK (invisible_destroyed), (gpointer) day_view);
day_view->clipboard_selection = NULL;
@@ -920,21 +917,41 @@ e_day_view_destroy (GtkObject *object)
day_view->default_category = NULL;
}
- gdk_cursor_destroy (day_view->normal_cursor);
- gdk_cursor_destroy (day_view->move_cursor);
- gdk_cursor_destroy (day_view->resize_width_cursor);
- gdk_cursor_destroy (day_view->resize_height_cursor);
+
+ if (day_view->normal_cursor) {
+ gdk_cursor_unref (day_view->normal_cursor);
+ day_view->normal_cursor = NULL;
+ }
+ if (day_view->move_cursor) {
+ gdk_cursor_unref (day_view->move_cursor);
+ day_view->move_cursor = NULL;
+ }
+ if (day_view->resize_width_cursor) {
+ gdk_cursor_unref (day_view->resize_width_cursor);
+ day_view->resize_width_cursor = NULL;
+ }
+ if (day_view->resize_height_cursor) {
+ gdk_cursor_unref (day_view->resize_height_cursor);
+ day_view->resize_height_cursor = NULL;
+ }
- e_day_view_free_events (day_view);
- g_array_free (day_view->long_events, TRUE);
- day_view->long_events = NULL;
+ if (day_view->long_events) {
+ e_day_view_free_events (day_view);
+ g_array_free (day_view->long_events, TRUE);
+ day_view->long_events = NULL;
+ }
+
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
- g_array_free (day_view->events[day], TRUE);
- day_view->events[day] = NULL;
+ if (day_view->events[day]) {
+ g_array_free (day_view->events[day], TRUE);
+ day_view->events[day] = NULL;
+ }
}
- if (day_view->invisible)
+ if (day_view->invisible) {
gtk_widget_destroy (day_view->invisible);
+ day_view->invisible = NULL;
+ }
if (day_view->clipboard_selection) {
g_free (day_view->clipboard_selection);
day_view->clipboard_selection = NULL;
@@ -7572,12 +7589,6 @@ e_day_view_get_time_string_width (EDayView *day_view)
}
static void
-invisible_destroyed (GtkWidget *invisible, EDayView *day_view)
-{
- day_view->invisible = NULL;
-}
-
-static void
selection_get (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint info,