- icons[n].image_on = gtk_image_new_from_pixbuf(find_image(icons[n].icon_on));
- gtk_widget_set_style(icons[n].image_on, tool_style);
+ if(icons[n].stock) {
+ /* We'll use the stock icons for this one */
+ gtk_button_set_use_stock(GTK_BUTTON(icons[n].button), TRUE);
+ icons[n].image_on = gtk_image_new_from_stock(icons[n].icon_on,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ if(icons[n].icon_off)
+ icons[n].image_off = gtk_image_new_from_stock(icons[n].icon_off,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ } else {
+ /* Create the 'on' image */
+ icons[n].image_on = gtk_image_new_from_pixbuf(find_image(icons[n].icon_on));
+ gtk_widget_set_style(icons[n].image_on, tool_style);
+ /* If it's a toggle icon, create the 'off' half too */
+ if(icons[n].icon_off) {
+ icons[n].image_off = gtk_image_new_from_pixbuf(find_image(icons[n].icon_off));
+ gtk_widget_set_style(icons[n].image_off, tool_style);
+ }
+ }