/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
#include "codeconv.h"
#include "gtkutils.h"
#include "utils.h"
-#include "base64.h"
#include "headers.h"
#include "addrindex.h"
#include "hooks.h"
gtk_label_set_selectable(GTK_LABEL(subject_body_label), TRUE);
gtk_label_set_selectable(GTK_LABEL(tags_body_label), TRUE);
- gtkut_widget_set_can_focus(from_body_label, FALSE);
- gtkut_widget_set_can_focus(to_body_label, FALSE);
- gtkut_widget_set_can_focus(ng_body_label, FALSE);
- gtkut_widget_set_can_focus(subject_body_label, FALSE);
- gtkut_widget_set_can_focus(tags_body_label, FALSE);
+ gtk_widget_set_can_focus(from_body_label, FALSE);
+ gtk_widget_set_can_focus(to_body_label, FALSE);
+ gtk_widget_set_can_focus(ng_body_label, FALSE);
+ gtk_widget_set_can_focus(subject_body_label, FALSE);
+ gtk_widget_set_can_focus(tags_body_label, FALSE);
gtk_box_pack_start(GTK_BOX(hbox1), from_header_label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox1), from_body_label, FALSE, FALSE, 0);
{
AvatarRender *avatarr = avatars_avatarrender_new(msginfo);
GtkWidget *hbox = headerview->hbox;
- GtkWidget *image;
hooks_invoke(AVATAR_IMAGE_RENDER_HOOKLIST, avatarr);
avatarr->image = NULL; /* avoid destroying */
avatars_avatarrender_free(avatarr);
- headerview_save_contact_pic(headerview, msginfo);
+ if (prefs_common.save_xface)
+ headerview_save_contact_pic(headerview, msginfo);
return 0;
}
static void headerview_save_contact_pic (HeaderView *headerview, MsgInfo *msginfo)
{
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
gchar *filename = NULL;
GError *error = NULL;
GdkPixbuf *picture = NULL;
if (!is_file_exist(filename)) {
gdk_pixbuf_save(picture, filename, "png", &error, NULL);
if (error) {
- g_warning(_("Failed to save image: \n%s"),
+ g_warning("Failed to save image: %s",
error->message);
g_error_free(error);
}
static gint headerview_show_contact_pic (HeaderView *headerview, MsgInfo *msginfo)
{
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
GtkWidget *hbox = headerview->hbox;
GtkWidget *image;
gchar *filename = NULL;
g_free(filename);
if (error) {
- debug_print("Failed to import image: \n%s",
+ debug_print("Failed to import image: %s\n",
error->message);
g_error_free(error);
return -1;