gtk/gtkconv.c

changeset 15284
98e8f9912107
parent 15270
711cc759e980
child 15295
9a8b415c2086
equal deleted inserted replaced
15283:efefd3bf8b81 15284:98e8f9912107
2306 g_idle_add(reset_auto_resize_cb, gtkconv); 2306 g_idle_add(reset_auto_resize_cb, gtkconv);
2307 2307
2308 gdk_pixbuf_animation_iter_advance(gtkconv->u.im->iter, NULL); 2308 gdk_pixbuf_animation_iter_advance(gtkconv->u.im->iter, NULL);
2309 buf = gdk_pixbuf_animation_iter_get_pixbuf(gtkconv->u.im->iter); 2309 buf = gdk_pixbuf_animation_iter_get_pixbuf(gtkconv->u.im->iter);
2310 2310
2311 gaim_gtk_buddy_icon_get_scale_size(buf, prpl_info ? &prpl_info->icon_spec : 2311 if (prpl_info && prpl_info->icon_spec.scale_rules & GAIM_ICON_SCALE_DISPLAY)
2312 NULL, &scale_width, &scale_height); 2312 gaim_gtk_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec,
2313 &scale_width, &scale_height);
2313 2314
2314 /* this code is ugly, and scares me */ 2315 /* this code is ugly, and scares me */
2315 scale = gdk_pixbuf_scale_simple(buf, 2316 scale = gdk_pixbuf_scale_simple(buf,
2316 MAX(gdk_pixbuf_get_width(buf) * scale_width / 2317 MAX(gdk_pixbuf_get_width(buf) * scale_width /
2317 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1), 2318 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1),
6022 buf = gdk_pixbuf_animation_iter_get_pixbuf(gtkconv->u.im->iter); 6023 buf = gdk_pixbuf_animation_iter_get_pixbuf(gtkconv->u.im->iter);
6023 if (gtkconv->u.im->animate) 6024 if (gtkconv->u.im->animate)
6024 start_anim(NULL, gtkconv); 6025 start_anim(NULL, gtkconv);
6025 } 6026 }
6026 6027
6027 gaim_gtk_buddy_icon_get_scale_size(buf, prpl_info ? &prpl_info->icon_spec : 6028 if (prpl_info && prpl_info->icon_spec.scale_rules & GAIM_ICON_SCALE_DISPLAY)
6028 NULL, &scale_width, &scale_height); 6029 gaim_gtk_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec,
6030 &scale_width, &scale_height);
6029 scale = gdk_pixbuf_scale_simple(buf, 6031 scale = gdk_pixbuf_scale_simple(buf,
6030 MAX(gdk_pixbuf_get_width(buf) * scale_width / 6032 MAX(gdk_pixbuf_get_width(buf) * scale_width /
6031 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1), 6033 gdk_pixbuf_animation_get_width(gtkconv->u.im->anim), 1),
6032 MAX(gdk_pixbuf_get_height(buf) * scale_height / 6034 MAX(gdk_pixbuf_get_height(buf) * scale_height /
6033 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1), 6035 gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1),

mercurial