From: <rl...@us...> - 2006-04-25 17:15:10
|
Revision: 16093 Author: rlaager Date: 2006-04-25 10:15:00 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16093&view=rev Log Message: ----------- 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. Modified Paths: -------------- trunk/src/gtkconv.c Modified: trunk/src/gtkconv.c =================================================================== --- trunk/src/gtkconv.c 2006-04-24 20:51:45 UTC (rev 16092) +++ trunk/src/gtkconv.c 2006-04-25 17:15:00 UTC (rev 16093) @@ -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,16 +5861,13 @@ 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)); + g_object_unref(G_OBJECT(scale)); - if (bm) - g_object_unref(G_OBJECT(bm)); - gtk_box_pack_start(GTK_BOX(gtkconv->lower_hbox), gtkconv->u.im->icon_container, FALSE, FALSE, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |