5 Oct 2004 jamesh   » (Master)

More Icon Theme stuff

In an email, Jonathan pointed out that simply using gtk_icon_theme_load_icon() by itself is not optimal either. If the user changes their icon theme, you should reload the icon in case it has changed in the new theme.

This is quite easy to handle correctly though, using the "changed" signal of GtkIconTheme:

GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
g_signal_connect (icon_theme, "changed", G_CALLBACK (callback), NULL);

Now callback() will be called when the icon theme changes, at which point you can reload the icon.

What would be nice would be a GtkImage constructor that let you pass in an icon name plus desired size, and handled theme changes for you. Maybe I'll do a patch for this ...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!