Mercurial > pidgin.yaz
changeset 14304:d86ad60af057
[gaim-migrate @ 16994]
If an emblem is really big, scale it down to something sane.
Use a really big emblem (the msn prpl icon) in yahoo.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 23 Aug 2006 04:29:16 +0000 |
parents | d9aa45c10588 |
children | fd46a9845fc2 |
files | gtk/gtkblist.c libgaim/protocols/yahoo/yahoo.c |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/gtkblist.c Wed Aug 23 04:22:04 2006 +0000 +++ b/gtk/gtkblist.c Wed Aug 23 04:29:16 2006 +0000 @@ -3014,19 +3014,27 @@ g_free(filename); if(emblem) { if(i == 0 && size == GAIM_STATUS_ICON_SMALL) { + double scale_factor = 0.6; + if(gdk_pixbuf_get_width(emblem) > 20) + scale_factor = 9.0 / gdk_pixbuf_get_width(emblem); + gdk_pixbuf_composite(emblem, scale, 5, 5, 10, 10, 5, 5, - .6, .6, + scale_factor, scale_factor, GDK_INTERP_BILINEAR, 255); } else { + double scale_factor = 1.0; + if(gdk_pixbuf_get_width(emblem) > 20) + scale_factor = 15.0 / gdk_pixbuf_get_width(emblem); + gdk_pixbuf_composite(emblem, scale, emblems[i].x, emblems[i].y, 15, 15, emblems[i].x, emblems[i].y, - 1, 1, + scale_factor, scale_factor, GDK_INTERP_BILINEAR, 255); }
--- a/libgaim/protocols/yahoo/yahoo.c Wed Aug 23 04:22:04 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo.c Wed Aug 23 04:29:16 2006 +0000 @@ -300,7 +300,8 @@ if (strtol(pair->value, NULL, 10) == 0) { if (f) f->status = YAHOO_STATUS_OFFLINE; - gaim_prpl_got_user_status(account, name, "offline", NULL); + if (name) + gaim_prpl_got_user_status(account, name, "offline", NULL); break; } break; @@ -2786,6 +2787,8 @@ emblems[i++] = "wireless"; if (yahoo_friend_get_game(f)) emblems[i++] = "game"; + if (f->protocol == 2) + emblems[i] = "msn"; } *se = emblems[0]; *sw = emblems[1];