From: <ma...@us...> - 2006-08-23 04:29:33
|
Revision: 16994 Author: marv_sf Date: 2006-08-22 21:29:16 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16994&view=rev Log Message: ----------- If an emblem is really big, scale it down to something sane. Use a really big emblem (the msn prpl icon) in yahoo. Modified Paths: -------------- trunk/gtk/gtkblist.c trunk/libgaim/protocols/yahoo/yahoo.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-08-23 04:22:04 UTC (rev 16993) +++ trunk/gtk/gtkblist.c 2006-08-23 04:29:16 UTC (rev 16994) @@ -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); } Modified: trunk/libgaim/protocols/yahoo/yahoo.c =================================================================== --- trunk/libgaim/protocols/yahoo/yahoo.c 2006-08-23 04:22:04 UTC (rev 16993) +++ trunk/libgaim/protocols/yahoo/yahoo.c 2006-08-23 04:29:16 UTC (rev 16994) @@ -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]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |