Mercurial > pidgin
diff src/gtkconv.c @ 13690:6a86f4ec744e
[gaim-migrate @ 16093]
SF Patch #1472156 from miguelrp
"Current betas of gaim render the buddy icon to a pifmap
with a 1-bit alpha mask before displaying them in the
conversation window.
This patch eliminates the transformation from a pixbuf
to a pixmap and, at the same time, preserves the full
alpha contents of the original buddy icon."
Perhaps I'm missing something, but the conversion doesn't seem necessary.
Icons still display properly for me.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 25 Apr 2006 17:15:00 +0000 |
parents | b76c6de0c3b5 |
children | 4cf1db3ffada |
line wrap: on
line diff
--- a/src/gtkconv.c Mon Apr 24 20:51:45 2006 +0000 +++ b/src/gtkconv.c Tue Apr 25 17:15:00 2006 +0000 @@ -2275,8 +2275,6 @@ GdkPixbuf *buf; GdkPixbuf *scale; - GdkPixmap *pm; - GdkBitmap *bm; gint delay; int scale_width, scale_height; @@ -2299,15 +2297,10 @@ gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1), GDK_INTERP_BILINEAR); - gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->u.im->icon), scale); g_object_unref(G_OBJECT(scale)); - gtk_image_set_from_pixmap(GTK_IMAGE(gtkconv->u.im->icon), pm, bm); - g_object_unref(G_OBJECT(pm)); gtk_widget_queue_draw(gtkconv->u.im->icon); - if (bm) - g_object_unref(G_OBJECT(bm)); - delay = gdk_pixbuf_animation_iter_get_delay_time(gtkconv->u.im->iter); if (delay < 100) @@ -5758,8 +5751,6 @@ GtkWidget *event; GtkWidget *frame; GdkPixbuf *scale; - GdkPixmap *pm; - GdkBitmap *bm; int scale_width, scale_height; GaimAccount *account; @@ -5857,14 +5848,10 @@ gdk_pixbuf_animation_get_height(gtkconv->u.im->anim), 1), GDK_INTERP_BILINEAR); - gdk_pixbuf_render_pixmap_and_mask(scale, &pm, &bm, 100); - g_object_unref(G_OBJECT(scale)); - gtkconv->u.im->icon_container = gtk_vbox_new(FALSE, 0); frame = gtk_frame_new(NULL); - gtk_frame_set_shadow_type(GTK_FRAME(frame), - (bm ? GTK_SHADOW_NONE : GTK_SHADOW_IN)); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_NONE); gtk_box_pack_start(GTK_BOX(gtkconv->u.im->icon_container), frame, FALSE, FALSE, 0); @@ -5874,15 +5861,12 @@ G_CALLBACK(icon_menu), gtkconv); gtk_widget_show(event); - gtkconv->u.im->icon = gtk_image_new_from_pixmap(pm, bm); + gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale); gtk_widget_set_size_request(gtkconv->u.im->icon, scale_width, scale_height); gtk_container_add(GTK_CONTAINER(event), gtkconv->u.im->icon); gtk_widget_show(gtkconv->u.im->icon); - g_object_unref(G_OBJECT(pm)); - - if (bm) - g_object_unref(G_OBJECT(bm)); + g_object_unref(G_OBJECT(scale)); gtk_box_pack_start(GTK_BOX(gtkconv->lower_hbox), gtkconv->u.im->icon_container, FALSE, FALSE, 0);