Reputation: 372
I was having temporary difficulties setting the icon of a window in my C program to a stock icon, and I almost asked how to do it, but then I created the GdkPixbuf I needed like this:
gtk_widget_render_icon(GTK_WIDGET(window),GTK_STOCK_CONVERT,-1,NULL)
The last argument is described by the documentation as "render detail to pass to theme engine. [allow-none]" (here). Since I have no idea what an appropriate value for that might be, I set it to NULL and hoped it would work. It did work, but now I want to know why.
What is this value supposed to be? Is there any possible repercussion if I leave it as NULL?
Upvotes: 2
Views: 239
Reputation: 57890
From the documentation you linked to:
detail
should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code.
The way I interpret that is that you might set it to "Wutaz-window-icon"
and then if theme writers needed to write a special case for your application, they could match that string.
However, the point is moot; as @MrEricSir points out, the function is deprecated.
Upvotes: 1