Remove unneeded arguments of xface_get_from_header

This commit is contained in:
Ricardo Mones 2014-02-12 23:22:37 +01:00
parent aa6c56b5d0
commit 0c116fe9b6
7 changed files with 8 additions and 26 deletions

View file

@ -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;

View file

@ -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,

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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