Commit 56984ab2 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Don't crash when the properties window is destroyed.

2001-06-05  Alex Larsson  <alexl@redhat.com>

	* tests/testgtk.c (destroy_properties):
	Don't crash when the properties window is destroyed.

	* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
	Use with_mnemonics to handle the case of stock items with
	underscores in them.
parent e426751e
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
2001-06-05 Alex Larsson <alexl@redhat.com>
* tests/testgtk.c (destroy_properties):
Don't crash when the properties window is destroyed.
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
Use with_mnemonics to handle the case of stock items with
underscores in them.
2001-06-05 Havoc Pennington <hp@redhat.com>
* gtk/gtktextiter.c (gtk_text_iter_order): rename from
......
......@@ -399,7 +399,7 @@ gtk_image_menu_item_new_from_stock (const gchar *stock_id,
if (gtk_stock_lookup (stock_id, &stock_item))
{
item = gtk_image_menu_item_new_with_label (stock_item.label);
item = gtk_image_menu_item_new_with_mnemonic (stock_item.label);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
......
......@@ -9265,15 +9265,26 @@ struct PropertiesData {
};
static void
destroy_properties (GtkWidget *widget,
destroy_properties (GtkWidget *widget,
struct PropertiesData *data)
{
*data->window = NULL;
if (data->window)
{
*data->window = NULL;
data->window = NULL;
}
if (data->cursor)
gdk_cursor_destroy (data->cursor);
gtk_signal_disconnect (widget, data->handler);
{
gdk_cursor_destroy (data->cursor);
data->cursor = NULL;
}
if (data->handler)
{
gtk_signal_disconnect (widget, data->handler);
data->handler = 0;
}
g_free (data);
}
......@@ -9345,9 +9356,9 @@ create_properties (void)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
data->handler = gtk_signal_connect_object (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(destroy_properties),
data);
data->handler = gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(destroy_properties),
data);
gtk_window_set_title (GTK_WINDOW (window), "test properties");
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
......@@ -10761,6 +10772,5 @@ main (int argc, char *argv[])
g_main_iteration (FALSE);
#endif
}
return 0;
}
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