Set finalize handler; (gtk_calendar_finalize): Rename gtk_calendar_destroy

2002-02-10  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
	(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
	since ::destroy can be called multiple times, resulting in double-freeing memory.
This commit is contained in:
Anders Carlsson 2002-02-10 14:33:06 +00:00 committed by Anders Carlsson
parent 6d33d1c7e3
commit 3619eade7c
8 changed files with 52 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -1,3 +1,9 @@
2002-02-10 Anders Carlsson <andersca@gnu.org>
* gtk/gtkcalendar.c (gtk_calendar_class_init): Set finalize handler;
(gtk_calendar_finalize): Rename gtk_calendar_destroy to gtk_calendar_finalize
since ::destroy can be called multiple times, resulting in double-freeing memory.
2002-02-10 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkgeometry-win32.c : don't reduce the scroll

View File

@ -258,7 +258,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_finalize (GObject *calendar);
static void gtk_calendar_realize (GtkWidget *widget);
static void gtk_calendar_unrealize (GtkWidget *widget);
static void gtk_calendar_size_request (GtkWidget *widget,
@ -334,15 +334,17 @@ gtk_calendar_get_type (void)
static void
gtk_calendar_class_init (GtkCalendarClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
object_class->destroy = gtk_calendar_destroy;
gobject_class->finalize = gtk_calendar_finalize;
widget_class->realize = gtk_calendar_realize;
widget_class->unrealize = gtk_calendar_unrealize;
@ -2495,13 +2497,15 @@ gtk_calendar_state_changed (GtkWidget *widget,
}
static void
gtk_calendar_destroy (GtkObject *object)
gtk_calendar_finalize (GObject *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);
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static gboolean