Mercurial > pidgin.yaz
diff src/gtkblist.c @ 10483:748aa3c6de36
[gaim-migrate @ 11773]
scaling for the buddy icons in the tooltips, and whatever else decided to sneak in on this commit
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 08 Jan 2005 07:25:37 +0000 |
parents | 1ac8f10ce68d |
children | ec82cbb21fe8 |
line wrap: on
line diff
--- a/src/gtkblist.c Fri Jan 07 22:44:01 2005 +0000 +++ b/src/gtkblist.c Sat Jan 08 07:25:37 2005 +0000 @@ -2066,7 +2066,7 @@ static GdkPixbuf *gaim_gtk_blist_get_buddy_icon(GaimBlistNode *node, gboolean scaled, gboolean greyed) { - GdkPixbuf *buf, *ret; + GdkPixbuf *buf, *ret = NULL; GdkPixbufLoader *loader; GaimBuddyIcon *icon; const char *data; @@ -2111,13 +2111,22 @@ if (scaled) { ret = gdk_pixbuf_scale_simple(buf,30,30, GDK_INTERP_BILINEAR); g_object_unref(G_OBJECT(buf)); - } else - ret = buf; - - return ret; + } else { + GaimAccount *account = gaim_buddy_get_account(buddy); + int scale_width, scale_height; + GaimPluginProtocolInfo *prpl_info = NULL; + + if(account && account->gc) + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl); + + gaim_gtk_buddy_icon_get_scale_size(buf, prpl_info ? &prpl_info->icon_spec : NULL, &scale_width, &scale_height); + + ret = gdk_pixbuf_scale_simple(buf,scale_width,scale_height, GDK_INTERP_BILINEAR); + g_object_unref(G_OBJECT(buf)); + } } - return NULL; + return ret; } static void gaim_gtk_blist_paint_tip(GtkWidget *widget, GdkEventExpose *event, GaimBlistNode *node)