Re: using personal icons in the GtkScaleButton



Hi.

There are two distinct stock things in GTK+: stock items[1] and stock
icons[2]. Connection between them is purely conventional by virtue of
using the same ID for both stock item and icon, but nothing is
preventing you from having only item or only icon. It's developer's
responsibility to provide this pair of application needs it.

In your code, gtk_button_new_from_stock() expects to find both item
and icon. Since stock item with ID "my-item" is not found, your string
is treated as label.

I'm almost sure that if you were to use gtk_image_new_from_icon_name()
in place of gtk_button_new_from_stock(), things would work properly,
because image is not interested in stock item at all - it just needs
image.

Scale button is similarly to GtkImage only interested in icons, so I'm
not sure why would this call cause segfault. Do you have a minimal
compilable application that demonstrates this problem?

Tadej

[1] http://library.gnome.org/devel/gtk/stable/gtk-Stock-Items.html
[2] http://library.gnome.org/devel/gtk/stable/gtk-Themeable-Stock-Images.html

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]