mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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.
This commit is contained in:
parent
e426751e74
commit
56984ab277
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -1,3 +1,12 @@
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user