| 821 if (prpl_info != NULL) { |
821 if (prpl_info != NULL) { |
| 822 proto_name = prpl_info->list_icon(account, NULL); |
822 proto_name = prpl_info->list_icon(account, NULL); |
| 823 g_snprintf(buf, sizeof(buf), "%s.png", proto_name); |
823 g_snprintf(buf, sizeof(buf), "%s.png", proto_name); |
| 824 |
824 |
| 825 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", |
825 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", |
| 826 "default", buf, NULL); |
826 "default", buf, NULL); |
| 827 pixbuf = gdk_pixbuf_new_from_file(filename, NULL); |
827 pixbuf = gdk_pixbuf_new_from_file(filename, NULL); |
| 828 g_free(filename); |
828 g_free(filename); |
| 829 |
829 |
| 830 if (pixbuf != NULL) { |
830 if (pixbuf != NULL) { |
| 831 /* Scale and insert the image */ |
831 /* Scale and insert the image */ |
| 832 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, |
832 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, |
| 833 GDK_INTERP_BILINEAR); |
833 GDK_INTERP_BILINEAR); |
| |
834 |
| |
835 if (!gaim_account_is_connected(account)) |
| |
836 gdk_pixbuf_saturate_and_pixelate(scale, scale, 0.0, FALSE); |
| |
837 |
| 834 image = gtk_image_new_from_pixbuf(scale); |
838 image = gtk_image_new_from_pixbuf(scale); |
| 835 |
839 |
| 836 g_object_unref(G_OBJECT(pixbuf)); |
840 g_object_unref(G_OBJECT(pixbuf)); |
| 837 g_object_unref(G_OBJECT(scale)); |
841 g_object_unref(G_OBJECT(scale)); |
| 838 } |
842 } |