diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-06-10 21:38:56 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-06-10 21:38:56 +0800 |
commit | 94abb0c23b768030c5f3c4e69a884d66d86a2665 (patch) | |
tree | 4eeb06ac4e5029f24a53ef39d5962238b345407c /lib/egg/eggtoolbutton.c | |
parent | d6e5066235fa4127797b066c77af130ad229c671 (diff) | |
download | gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar.gz gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar.bz2 gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar.lz gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar.xz gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.tar.zst gsoc2013-epiphany-94abb0c23b768030c5f3c4e69a884d66d86a2665.zip |
Update
2003-06-10 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/egg/eggtoolbar.c:
* lib/egg/eggtoolbutton.c:
Update
Diffstat (limited to 'lib/egg/eggtoolbutton.c')
-rw-r--r-- | lib/egg/eggtoolbutton.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/egg/eggtoolbutton.c b/lib/egg/eggtoolbutton.c index 1e17a89dc..ec2fb3a4d 100644 --- a/lib/egg/eggtoolbutton.c +++ b/lib/egg/eggtoolbutton.c @@ -367,30 +367,30 @@ egg_tool_button_construct_contents (EggToolItem *tool_item) } else if (button->icon_widget) { - if (GTK_IS_IMAGE (button->icon_widget)) + icon = button->icon_widget; + + if (GTK_IS_IMAGE (icon)) { - GtkImage *image = GTK_IMAGE (button->icon_widget); + GtkImage *image = GTK_IMAGE (icon); GtkImageType storage_type = gtk_image_get_storage_type (image); - /* FIXME: this seems a bit dubious. We are changing a widget that the - * user passed in. It's probably better to create a new image instead. - */ - if (storage_type == GTK_IMAGE_STOCK) { gchar *stock_id; gtk_image_get_stock (image, &stock_id, NULL); - gtk_image_set_from_stock (image, stock_id, icon_size); + + icon = gtk_image_new_from_stock (stock_id, icon_size); + gtk_widget_show (icon); } else if (storage_type == GTK_IMAGE_ICON_SET) { GtkIconSet *icon_set; gtk_image_get_icon_set (image, &icon_set, NULL); - gtk_image_set_from_icon_set (image, icon_set, icon_size); + + icon = gtk_image_new_from_icon_set (icon_set, icon_size); + gtk_widget_show (icon); } } - - icon = button->icon_widget; } else if (button->stock_id) { |