#include "edittags.h"
#include "manual.h"
#include "manage_window.h"
+#include "avatars.h"
#define SUMMARY_COL_MARK_WIDTH 10
#define SUMMARY_COL_STATUS_WIDTH 13
{
MsgInfo *msginfo, *full_msginfo;
gchar *from;
- GtkWidget *image = NULL;
GdkPixbuf *picture = NULL;
+ AvatarRender *avatarr;
msginfo = gtk_cmctree_node_get_row_data(GTK_CMCTREE(summaryview->ctree),
summaryview->selected);
extract_address(from);
full_msginfo = procmsg_msginfo_get_full_info(msginfo);
- if (full_msginfo &&
- full_msginfo->extradata &&
- full_msginfo->extradata->face) {
- image = face_get_from_header(full_msginfo->extradata->face);
- }
-#if HAVE_LIBCOMPFACE
- else if (full_msginfo &&
- full_msginfo->extradata &&
- full_msginfo->extradata->xface) {
- image = xface_get_from_header(full_msginfo->extradata->xface,
- &summaryview->ctree->style->white,
- summaryview->mainwin->window->window);
- }
-#endif
+
+ avatarr = avatars_avatarrender_new(full_msginfo);
+ hooks_invoke(AVATAR_IMAGE_RENDER_HOOKLIST, avatarr);
+
procmsg_msginfo_free(full_msginfo);
- if (image)
- picture = gtk_image_get_pixbuf(GTK_IMAGE(image));
+
+ if (avatarr->image)
+ picture = gtk_image_get_pixbuf(GTK_IMAGE(avatarr->image));
#ifndef USE_NEW_ADDRBOOK
addressbook_add_contact(msginfo->fromname, from, NULL, picture);
debug_print( "addressbook_add_contact - added\n" );
}
#endif
- if (image)
- gtk_widget_destroy(image);
+ avatars_avatarrender_free(avatarr);
}
void summary_select_all(SummaryView *summaryview)