Mercurial > pidgin
changeset 2264:2993b6091a53
[gaim-migrate @ 2274]
fun.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 10 Sep 2001 23:09:58 +0000 |
parents | 52e4d896b7f1 |
children | 2f03cfd21fc2 |
files | src/conversation.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/conversation.c Mon Sep 10 23:05:48 2001 +0000 +++ b/src/conversation.c Mon Sep 10 23:09:58 2001 +0000 @@ -2596,6 +2596,7 @@ GdkPixbuf *scale; GdkPixmap *pm; GdkBitmap *bm; + int sf = 0; if (!c) return; @@ -2616,10 +2617,11 @@ if (c->anim) { GList *frames = gdk_pixbuf_animation_get_frames(c->anim); GdkPixbuf *buf = gdk_pixbuf_frame_get_pixbuf(frames->data); + sf = SCALE(c->anim); scale = gdk_pixbuf_scale_simple(buf, - MAX(gdk_pixbuf_get_width(buf) * SCALE(c->anim) / + MAX(gdk_pixbuf_get_width(buf) * sf / gdk_pixbuf_animation_get_width(c->anim), 1), - MAX(gdk_pixbuf_get_height(buf) * SCALE(c->anim) / + MAX(gdk_pixbuf_get_height(buf) * sf / gdk_pixbuf_animation_get_height(c->anim), 1), GDK_INTERP_NEAREST); @@ -2629,20 +2631,20 @@ c->icon_timer = gtk_timeout_add(delay * 10, redraw_icon, c); } } else { - int s; c->unanim = gdk_pixbuf_loader_get_pixbuf(load); if (!c->unanim) { gdk_pixbuf_loader_close(load); return; } - s = SCALEBUF(c->unanim); - scale = gdk_pixbuf_scale_simple(c->unanim, s, s, GDK_INTERP_NEAREST); + sf = SCALEBUF(c->unanim); + scale = gdk_pixbuf_scale_simple(c->unanim, sf, sf, GDK_INTERP_NEAREST); } gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 0); gdk_pixbuf_unref(scale); c->icon = gtk_pixmap_new(pm, bm); + gtk_widget_set_usize(c->icon, sf, sf); gtk_box_pack_start(GTK_BOX(c->bbox), c->icon, FALSE, FALSE, 5); gtk_widget_show(c->icon); gdk_pixmap_unref(pm);