Sat, 08 Mar 2003 01:21:25 +0000
[gaim-migrate @ 4981]
Our stock icons based off global stock icons should now use the stock icons
setup by the theme stock icons stock... icons.
| src/stock.c | file | annotate | diff | comparison | revisions |
--- a/src/stock.c Sat Mar 08 01:04:14 2003 +0000 +++ b/src/stock.c Sat Mar 08 01:21:25 2003 +0000 @@ -89,21 +89,27 @@ { GtkIconFactory *icon_factory; int i; + GtkWidget *win; /* Setup the icon factory. */ icon_factory = gtk_icon_factory_new(); gtk_icon_factory_add_default(icon_factory); + /* Er, yeah, a hack, but it works. :) */ + win = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_widget_realize(win); + for (i = 0; i < stock_icon_count; i++) { GdkPixbuf *pixbuf; GtkIconSet *iconset; gchar *filename; if (stock_icons[i].dir == NULL) { + /* GTK+ Stock icon */ - - iconset = gtk_icon_factory_lookup_default(stock_icons[i].filename); + iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(win), + stock_icons[i].filename); } else { filename = find_file(stock_icons[i].dir, stock_icons[i].filename); @@ -123,5 +129,7 @@ gtk_icon_set_unref(iconset); } + gtk_widget_destroy(win); + g_object_unref(G_OBJECT(icon_factory)); }