# HG changeset patch # User Christian Hammond # Date 1047086485 0 # Node ID ada933d434cbb46afd1650998e2e472e62c52597 # Parent d715736164aecdebffda86191006ec6c66eda342 [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. committer: Tailor Script diff -r d715736164ae -r ada933d434cb src/stock.c --- 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)); }