talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 0c116fe9b6290a9e7f7183563385321121694ef6
parent aa6c56b5d0e6f7b3c2a6e1bddb24719896014d01
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed, 12 Feb 2014 23:22:37 +0100

Remove unneeded arguments of xface_get_from_header

Diffstat:
Msrc/gtk/gtkutils.c | 7+------
Msrc/gtk/gtkutils.h | 3+--
Msrc/headerview.c | 2+-
Msrc/messageview.c | 4+---
Msrc/prefs_customheader.c | 6+-----
Msrc/summaryview.c | 4+---
Msrc/textview.c | 8++------
7 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c @@ -1090,18 +1090,13 @@ gboolean get_tag_range(GtkTextIter *iter, } #if HAVE_LIBCOMPFACE -GtkWidget *xface_get_from_header(const gchar *o_xface, GdkColor *background, - GdkWindow *window) +GtkWidget *xface_get_from_header(const gchar *o_xface) { static gchar *xpm_xface[XPM_XFACE_HEIGHT]; static gboolean xpm_xface_init = TRUE; gchar xface[2048]; strncpy(xface, o_xface, sizeof(xface)); - if (!window) { - g_warning("no window\n"); - return NULL; - } if (uncompface(xface) < 0) { g_warning("uncompface failed\n"); return NULL; diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h @@ -161,8 +161,7 @@ GtkWidget *gtkut_get_browse_directory_btn(const gchar *label); GtkWidget *gtkut_get_replace_btn(const gchar *label); GtkWidget *gtkut_get_options_frame(GtkWidget *box, GtkWidget **frame, const gchar *frame_label); #if HAVE_LIBCOMPFACE -GtkWidget *xface_get_from_header(const gchar *o_xface, GdkColor *background, - GdkWindow *window); +GtkWidget *xface_get_from_header(const gchar *o_xface); #endif gboolean get_tag_range(GtkTextIter *iter, GtkTextTag *tag, diff --git a/src/headerview.c b/src/headerview.c @@ -271,7 +271,7 @@ static gint headerview_show_xface(HeaderView *headerview, MsgInfo *msginfo) headerview->image = NULL; } - image = xface_get_from_header(xface, &hbox->style->white, hbox->window); + image = xface_get_from_header(xface); if (image) { gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); diff --git a/src/messageview.c b/src/messageview.c @@ -2844,9 +2844,7 @@ static void add_address_cb(GtkAction *action, gpointer data) else { gchar *xface = procmsg_msginfo_get_avatar(full_msginfo, AVATAR_XFACE); if (xface) { - image = xface_get_from_header(xface, - &(gtk_widget_get_style(messageview->mainwin->summaryview->ctree)->white), - gtk_widget_get_window(messageview->window)); + image = xface_get_from_header(xface); } } #endif diff --git a/src/prefs_customheader.c b/src/prefs_customheader.c @@ -923,11 +923,7 @@ static gboolean prefs_custom_header_selected(GtkTreeSelection *selector, } #if HAVE_LIBCOMPFACE else if (!strcmp2("X-Face", ch->name)) { - GdkColor color; - color.pixel = 0; - preview = GTK_IMAGE(xface_get_from_header(ch->value, - &color, - mainwindow_get_mainwindow()->window->window)); + preview = GTK_IMAGE(xface_get_from_header(ch->value)); pixbuf = gtk_image_get_pixbuf(preview); gtk_image_set_from_pixbuf (GTK_IMAGE(customhdr.preview), pixbuf); gtk_widget_show(customhdr.preview); diff --git a/src/summaryview.c b/src/summaryview.c @@ -4704,9 +4704,7 @@ void summary_add_address(SummaryView *summaryview) else { gchar *xface = procmsg_msginfo_get_avatar(full_msginfo, AVATAR_XFACE); if (xface) { - image = xface_get_from_header(xface, - &summaryview->ctree->style->white, - summaryview->mainwin->window->window); + image = xface_get_from_header(xface); } } #endif diff --git a/src/textview.c b/src/textview.c @@ -2064,9 +2064,7 @@ static void textview_show_xface(TextView *textview) window = mainwindow_get_mainwindow() ? mainwindow_get_mainwindow()->window->window : textview->text->window; - textview->image = xface_get_from_header(xface, - &textview->text->style->white, - window); + textview->image = xface_get_from_header(xface); cm_return_if_fail(textview->image != NULL); gtk_widget_show(textview->image); @@ -3206,9 +3204,7 @@ static void add_uri_to_addrbook_cb (GtkAction *action, TextView *textview) textview->messageview->msginfo, AVATAR_XFACE); if (xface) { - image = xface_get_from_header(xface, - &textview->text->style->white, - mainwindow_get_mainwindow()->window->window); + image = xface_get_from_header(xface); } } #endif