Commit 141af56c authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Bug 546756 – gnome-panel crashed with SIGSEGV in

2008-08-07  Michael Natterer  <mitch@imendio.com>

	Bug 546756 – gnome-panel crashed with SIGSEGV in
	g_type_check_instance_cast()

	* gtk/gtkimagemenuitem.c: add GtkObject::destroy() implementation
	and remove the image now that it's an internal child and isn't
	destroyed by gtk_container_destroy() any longer. Thanks to tml for
	helping bisecting this down.


svn path=/trunk/; revision=21034
parent 0acb5856
2008-08-07 Michael Natterer <mitch@imendio.com>
Bug 546756 – gnome-panel crashed with SIGSEGV in
g_type_check_instance_cast()
* gtk/gtkimagemenuitem.c: add GtkObject::destroy() implementation
and remove the image now that it's an internal child and isn't
destroyed by gtk_container_destroy() any longer. Thanks to tml for
helping bisecting this down.
2008-08-07 Sven Neumann <sven@gimp.org>
Bug 546771 - Add writable property "visited" to GtkLinkButton
......
......@@ -37,6 +37,7 @@
#include "gtkprivate.h"
#include "gtkalias.h"
static void gtk_image_menu_item_destroy (GtkObject *object);
static void gtk_image_menu_item_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_image_menu_item_size_allocate (GtkWidget *widget,
......@@ -73,16 +74,14 @@ G_DEFINE_TYPE (GtkImageMenuItem, gtk_image_menu_item, GTK_TYPE_MENU_ITEM)
static void
gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass)
{
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkMenuItemClass *menu_item_class;
GtkContainerClass *container_class;
gobject_class = (GObjectClass*) klass;
widget_class = (GtkWidgetClass*) klass;
menu_item_class = (GtkMenuItemClass*) klass;
container_class = (GtkContainerClass*) klass;
GObjectClass *gobject_class = (GObjectClass*) klass;
GtkObjectClass *object_class = (GtkObjectClass*) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
GtkMenuItemClass *menu_item_class = (GtkMenuItemClass*) klass;
GtkContainerClass *container_class = (GtkContainerClass*) klass;
object_class->destroy = gtk_image_menu_item_destroy;
widget_class->screen_changed = gtk_image_menu_item_screen_changed;
widget_class->size_request = gtk_image_menu_item_size_request;
widget_class->size_allocate = gtk_image_menu_item_size_allocate;
......@@ -172,6 +171,18 @@ show_image (GtkImageMenuItem *image_menu_item)
return show;
}
static void
gtk_image_menu_item_destroy (GtkObject *object)
{
GtkImageMenuItem *image_menu_item = GTK_IMAGE_MENU_ITEM (object);
if (image_menu_item->image)
gtk_container_remove (GTK_CONTAINER (image_menu_item),
image_menu_item->image);
GTK_OBJECT_CLASS (gtk_image_menu_item_parent_class)->destroy (object);
}
static void
gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item,
gint *requisition)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment