pidgin/gtkutils.c

branch
soc.2013.gobjectification.plugins
changeset 36625
e6febbd8cbec
parent 36623
caaadef03507
child 36626
18fc361b3704
equal deleted inserted replaced
36624:38043ecaf4a6 36625:e6febbd8cbec
1608 *height = gdk_pixbuf_get_height(buf); 1608 *height = gdk_pixbuf_get_height(buf);
1609 1609
1610 if ((spec == NULL) || !(spec->scale_rules & rules)) 1610 if ((spec == NULL) || !(spec->scale_rules & rules))
1611 return; 1611 return;
1612 1612
1613 purple_buddy_icon_get_scale_size(spec, width, height); 1613 purple_buddy_icon_spec_get_scaled_size(spec, width, height);
1614 1614
1615 /* and now for some arbitrary sanity checks */ 1615 /* and now for some arbitrary sanity checks */
1616 if(*width > 100) 1616 if(*width > 100)
1617 *width = 100; 1617 *width = 100;
1618 if(*height > 100) 1618 if(*height > 100)
2331 /* Make sure the image is the correct dimensions */ 2331 /* Make sure the image is the correct dimensions */
2332 if (spec->scale_rules & PURPLE_ICON_SCALE_SEND && 2332 if (spec->scale_rules & PURPLE_ICON_SCALE_SEND &&
2333 (orig_width < spec->min_width || orig_width > spec->max_width || 2333 (orig_width < spec->min_width || orig_width > spec->max_width ||
2334 orig_height < spec->min_height || orig_height > spec->max_height)) 2334 orig_height < spec->min_height || orig_height > spec->max_height))
2335 { 2335 {
2336 purple_buddy_icon_get_scale_size(spec, &new_width, &new_height); 2336 purple_buddy_icon_spec_get_scaled_size(spec, &new_width, &new_height);
2337 2337
2338 g_object_unref(G_OBJECT(pixbuf)); 2338 g_object_unref(G_OBJECT(pixbuf));
2339 pixbuf = gdk_pixbuf_scale_simple(original, new_width, new_height, GDK_INTERP_HYPER); 2339 pixbuf = gdk_pixbuf_scale_simple(original, new_width, new_height, GDK_INTERP_HYPER);
2340 } 2340 }
2341 2341

mercurial