[evolution-patches] 43029
- From: JP Rosevear <jpr ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 43029
- Date: 15 May 2003 15:31:10 -0400
-JP
--
JP Rosevear <jpr ximian com>
Ximian, Inc.
? 41930.patch
? 43029.patch
? leak.patch
? ref-count.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1764
diff -u -r1.1764 ChangeLog
--- ChangeLog 14 May 2003 18:45:53 -0000 1.1764
+++ ChangeLog 15 May 2003 19:31:35 -0000
@@ -1,3 +1,23 @@
+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
+
2003-05-14 JP Rosevear <jpr ximian com>
* gui/e-tasks.c (e_tasks_destroy): guard against multiple destroys
Index: gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.89
diff -u -r1.89 e-calendar-table.c
--- gui/e-calendar-table.c 14 May 2003 18:45:55 -0000 1.89
+++ gui/e-calendar-table.c 15 May 2003 19:31:36 -0000
@@ -109,8 +109,6 @@
guint info,
guint time_stamp,
ECalendarTable *cal_table);
-static void invisible_destroyed (GtkWidget *invisible,
- ECalendarTable *cal_table);
static struct tm e_calendar_table_get_current_time (ECellDateEdit *ecde,
gpointer data);
static void mark_row_complete_cb (int model_row, gpointer data);
@@ -534,8 +532,6 @@
G_CALLBACK (selection_clear_event), cal_table);
g_signal_connect (cal_table->invisible, "selection_received",
G_CALLBACK (selection_received), cal_table);
- g_signal_connect_after (cal_table->invisible, "destroy",
- G_CALLBACK (invisible_destroyed), cal_table);
cal_table->clipboard_selection = NULL;
}
@@ -588,8 +584,10 @@
cal_table->model = NULL;
}
- if (cal_table->invisible)
+ if (cal_table->invisible) {
gtk_widget_destroy (cal_table->invisible);
+ cal_table->invisible = NULL;
+ }
if (cal_table->clipboard_selection) {
g_free (cal_table->clipboard_selection);
cal_table->clipboard_selection = NULL;
@@ -1172,13 +1170,6 @@
e_table_save_state (e_table_scrolled_get_table(E_TABLE_SCROLLED (cal_table->etable)),
filename);
-}
-
-
-static void
-invisible_destroyed (GtkWidget *invisible, ECalendarTable *cal_table)
-{
- cal_table->invisible = NULL;
}
static void
Index: gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.190
diff -u -r1.190 e-day-view.c
--- gui/e-day-view.c 14 May 2003 18:45:55 -0000 1.190
+++ gui/e-day-view.c 15 May 2003 19:31:38 -0000
@@ -465,7 +465,6 @@
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 @@
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 @@
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);
-
- e_day_view_free_events (day_view);
- g_array_free (day_view->long_events, TRUE);
- day_view->long_events = NULL;
+
+ 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;
+ }
+
+ 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;
@@ -7569,12 +7586,6 @@
day_view->pm_string_width);
return time_width;
-}
-
-static void
-invisible_destroyed (GtkWidget *invisible, EDayView *day_view)
-{
- day_view->invisible = NULL;
}
static void
Index: gui/e-week-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.c,v
retrieving revision 1.160
diff -u -r1.160 e-week-view.c
--- gui/e-week-view.c 14 May 2003 18:45:55 -0000 1.160
+++ gui/e-week-view.c 15 May 2003 19:31:39 -0000
@@ -218,7 +218,6 @@
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 @@
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_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 @@
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;
@@ -4215,12 +4225,6 @@
week_view->pm_string_width);
return time_width;
-}
-
-static void
-invisible_destroyed (GtkWidget *invisible, EWeekView *week_view)
-{
- week_view->invisible = NULL;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]