Mercurial > pidgin
comparison src/gtkconv.c @ 11625:42d9a9203767
[gaim-migrate @ 13900]
patch by sadrul to improve the send to menu's icons.
I had to manually apply this because patch kept failing 1 out of 1 hunks,
and faceprint wasn't here to help.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Sat, 08 Oct 2005 17:24:07 +0000 |
parents | fbc4eeab2227 |
children | 516cefa2d27d |
comparison
equal
deleted
inserted
replaced
11624:45d54425dc65 | 11625:42d9a9203767 |
---|---|
2634 GaimAccount *account; | 2634 GaimAccount *account; |
2635 GtkWidget *box; | 2635 GtkWidget *box; |
2636 GtkWidget *label; | 2636 GtkWidget *label; |
2637 GtkWidget *image; | 2637 GtkWidget *image; |
2638 GtkWidget *menuitem; | 2638 GtkWidget *menuitem; |
2639 GdkPixbuf *pixbuf, *scale; | 2639 GdkPixbuf *pixbuf; |
2640 gchar *text; | 2640 gchar *text; |
2641 | 2641 |
2642 | 2642 |
2643 account = bud->account; | 2643 account = bud->account; |
2644 | 2644 |
2645 /* Create a pixmap for the protocol icon. */ | 2645 /* Create a pixmap for the protocol icon. */ |
2646 pixbuf = gaim_gtk_create_prpl_icon(account); | 2646 pixbuf = gaim_gtk_blist_get_status_icon((GaimBlistNode*)bud, GAIM_STATUS_ICON_SMALL); |
2647 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); | |
2648 | |
2649 /* Now convert it to GtkImage */ | 2647 /* Now convert it to GtkImage */ |
2650 if (pixbuf == NULL) | 2648 if (pixbuf == NULL) |
2651 image = gtk_image_new(); | 2649 image = gtk_image_new(); |
2652 else | 2650 else |
2653 image = gtk_image_new_from_pixbuf(scale); | 2651 image = gtk_image_new_from_pixbuf(pixbuf); |
2654 | 2652 |
2655 gtk_size_group_add_widget(sg, image); | 2653 gtk_size_group_add_widget(sg, image); |
2656 | 2654 |
2657 g_object_unref(G_OBJECT(scale)); | |
2658 g_object_unref(G_OBJECT(pixbuf)); | 2655 g_object_unref(G_OBJECT(pixbuf)); |
2659 | 2656 |
2660 /* Make our menu item */ | 2657 /* Make our menu item */ |
2661 text = g_strdup_printf("%s (%s)", gaim_buddy_get_name(bud), gaim_account_get_username(bud->account)); | 2658 text = g_strdup_printf("%s (%s)", gaim_buddy_get_name(bud), gaim_account_get_username(bud->account)); |
2662 menuitem = gtk_radio_menu_item_new_with_label(*group, text); | 2659 menuitem = gtk_radio_menu_item_new_with_label(*group, text); |