[Commits] [SCM] claws branch, master, updated. 3.9.3-22-g0c116fe

mones at claws-mail.org mones at claws-mail.org
Wed Feb 12 23:29:33 CET 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  0c116fe9b6290a9e7f7183563385321121694ef6 (commit)
      from  aa6c56b5d0e6f7b3c2a6e1bddb24719896014d01 (commit)


- Log -----------------------------------------------------------------
commit 0c116fe9b6290a9e7f7183563385321121694ef6
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Feb 12 23:22:37 2014 +0100

    Remove unneeded arguments of xface_get_from_header

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 5f477d9..0c95fcc 100644
--- 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
index de01d4f..a961dd8 100644
--- 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
index a520e15..1ea12ba 100644
--- 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
index 930ac66..1f1f094 100644
--- 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
index 36c2737..b5cec77 100644
--- 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
index 91e6c90..3bd2ac0 100644
--- 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
index b7ead66..cac63bf 100644
--- 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

-----------------------------------------------------------------------

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list