On Jun 12, 2011, at 2:53 PM, Krzysztof KosiĆski wrote:
2011/6/12 Alex Valavanis <valavanisalex@...400...>:
Hi Josh,
The small icons that appear in the handle of our docked dialogs are all rendered in this manner as far as I can tell. At the moment, upstream gdl only allows dialogs to be created either with no icon in the handle at all [gdl_dock_item_new()] or with a stock icon in the handle [gdl_dock_item_new_with_stock()]. We have added a new option [gdl_dock_item_new_with_pixbuf_icon()] that allows a pixbuf icon to be used in the handle.
I think the best solution would be to expose the GtkImage widget that displays the dock icon as a property, so that we can use gtk_image_set_from_pixbuf or gtk_image_set_from_icon_name on it.
That might not be the best.
Among other things you end up with a single-sized bitmap that is used regardless of situation and user preferences. It is much more flexible to use a custom stock icon. Since Inkscape hooks itself in as a provider of stock icons, it can supply any as needed, and with dynamic sizing.
Work-arounds include rendering and grabbing a pixmap early in the process, but that has led to many bugs, including some significant crashing in many apps (not just Inkscape). But that a proper solution fixes crashing without need for work-around code, and also provides proper dynamic sizing, makes it a much better choice.
Regardless, gtk_image_set_from_pixbuf should be avoided.