Mercurial > pidgin.yaz
changeset 4670:ada933d434cb
[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 <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 08 Mar 2003 01:21:25 +0000 |
parents | d715736164ae |
children | ac9756f48544 |
files | src/stock.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)); }