| 2418 PURPLE_ICON_SCALE_DISPLAY, &scale_width, &scale_height); |
2418 PURPLE_ICON_SCALE_DISPLAY, &scale_width, &scale_height); |
| 2419 |
2419 |
| 2420 /* this code is ugly, and scares me */ |
2420 /* this code is ugly, and scares me */ |
| 2421 scale = gdk_pixbuf_scale_simple(buf, 32, 32, |
2421 scale = gdk_pixbuf_scale_simple(buf, 32, 32, |
| 2422 GDK_INTERP_BILINEAR); |
2422 GDK_INTERP_BILINEAR); |
| |
2423 if (pidgin_gdk_pixbuf_is_opaque(scale)) |
| |
2424 pidgin_gdk_pixbuf_make_round(scale); |
| 2423 |
2425 |
| 2424 gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->u.im->icon), scale); |
2426 gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->u.im->icon), scale); |
| 2425 g_object_unref(G_OBJECT(scale)); |
2427 g_object_unref(G_OBJECT(scale)); |
| 2426 gtk_widget_queue_draw(gtkconv->u.im->icon); |
2428 gtk_widget_queue_draw(gtkconv->u.im->icon); |
| 2427 |
2429 |
| 6453 start_anim(NULL, gtkconv); |
6455 start_anim(NULL, gtkconv); |
| 6454 } |
6456 } |
| 6455 |
6457 |
| 6456 scale = gdk_pixbuf_scale_simple(buf, 32, 32, |
6458 scale = gdk_pixbuf_scale_simple(buf, 32, 32, |
| 6457 GDK_INTERP_BILINEAR); |
6459 GDK_INTERP_BILINEAR); |
| 6458 |
6460 if (pidgin_gdk_pixbuf_is_opaque(scale)) |
| |
6461 pidgin_gdk_pixbuf_make_round(scale); |
| 6459 gtkconv->u.im->icon_container = gtk_vbox_new(FALSE, 0); |
6462 gtkconv->u.im->icon_container = gtk_vbox_new(FALSE, 0); |
| 6460 |
6463 |
| 6461 event = gtk_event_box_new(); |
6464 event = gtk_event_box_new(); |
| 6462 gtk_container_add(GTK_CONTAINER(gtkconv->u.im->icon_container), event); |
6465 gtk_container_add(GTK_CONTAINER(gtkconv->u.im->icon_container), event); |
| 6463 g_signal_connect(G_OBJECT(event), "button-press-event", |
6466 g_signal_connect(G_OBJECT(event), "button-press-event", |
| 6464 G_CALLBACK(icon_menu), gtkconv); |
6467 G_CALLBACK(icon_menu), gtkconv); |
| 6465 gtk_widget_show(event); |
6468 gtk_widget_show(event); |
| 6466 |
6469 |
| 6467 gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale); |
6470 gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale); |
| 6468 gtkconv->auto_resize = TRUE; |
6471 gtkconv->auto_resize = TRUE; |
| 6469 /* Reset the size request to allow the buddy icon to resize */ |
|
| 6470 g_idle_add(reset_auto_resize_cb, gtkconv); |
|
| 6471 gtk_container_add(GTK_CONTAINER(event), gtkconv->u.im->icon); |
6472 gtk_container_add(GTK_CONTAINER(event), gtkconv->u.im->icon); |
| 6472 gtk_widget_show(gtkconv->u.im->icon); |
6473 gtk_widget_show(gtkconv->u.im->icon); |
| 6473 |
6474 |
| 6474 g_object_unref(G_OBJECT(scale)); |
6475 g_object_unref(G_OBJECT(scale)); |
| 6475 |
6476 |