Patch from ChiDeok Hwang to fix memleaks found by Evan Martin.

Sat Nov 18 11:45:09 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
	memleaks found by Evan Martin.
This commit is contained in:
Owen Taylor 2000-11-18 16:48:39 +00:00 committed by Owen Taylor
parent 0204bd1cef
commit 1f74dcee1b
8 changed files with 57 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -1,3 +1,8 @@
Sat Nov 18 11:45:09 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalendar.c: Patch from ChiDeok Hwang to fix
memleaks found by Evan Martin.
Fri Nov 17 20:14:20 2000 Owen Taylor <otaylor@redhat.com>
* Released 1.3.2

View File

@ -262,6 +262,7 @@ typedef void (*GtkCalendarSignalDate) (GtkObject *object, guint arg1, guint arg2
static void gtk_calendar_class_init (GtkCalendarClass *class);
static void gtk_calendar_init (GtkCalendar *calendar);
static void gtk_calendar_destroy (GtkObject *calendar);
static void gtk_calendar_realize (GtkWidget *widget);
static void gtk_calendar_unrealize (GtkWidget *widget);
static void gtk_calendar_draw_focus (GtkWidget *widget);
@ -370,6 +371,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
widget_class->focus_out_event = gtk_calendar_focus_out;
widget_class->style_set = gtk_calendar_style_set;
widget_class->state_changed = gtk_calendar_state_changed;
object_class->destroy = gtk_calendar_destroy;
gtk_calendar_signals[MONTH_CHANGED_SIGNAL] =
gtk_signal_new ("month_changed",
@ -1147,6 +1149,16 @@ gtk_calendar_unrealize (GtkWidget *widget)
gdk_window_destroy (private_data->main_win);
private_data->main_win = NULL;
}
if (private_data->day_name_win)
{
gdk_window_set_user_data (private_data->day_name_win, NULL);
gdk_window_destroy (private_data->day_name_win);
private_data->day_name_win = NULL;
}
if (calendar->xor_gc)
gdk_gc_unref (calendar->xor_gc);
if (calendar->gc)
gdk_gc_unref (calendar->gc);
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
@ -2646,6 +2658,16 @@ gtk_calendar_focus_in (GtkWidget *widget,
return FALSE;
}
static void
gtk_calendar_destroy (GtkObject *object)
{
GtkCalendarPrivateData *private_data;
private_data = GTK_CALENDAR_PRIVATE_DATA (object);
g_free (private_data);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
static gint
gtk_calendar_focus_out (GtkWidget *widget,
GdkEventFocus *event)