/pidgin/main: 48f1315f1f58: Fix a warning

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Apr 10 19:05:07 EDT 2014


Changeset: 48f1315f1f58c8b135fe9926b487c0d69b46ee9b
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-11 01:05 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/48f1315f1f58

Description:

Fix a warning

diffstat:

 pidgin/gtkwebviewtoolbar.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (23 lines):

diff --git a/pidgin/gtkwebviewtoolbar.c b/pidgin/gtkwebviewtoolbar.c
--- a/pidgin/gtkwebviewtoolbar.c
+++ b/pidgin/gtkwebviewtoolbar.c
@@ -608,7 +608,7 @@ static void
 do_insert_image_cb(GtkWidget *widget, int response, PidginWebViewToolbar *toolbar)
 {
 	PidginWebViewToolbarPriv *priv = PIDGIN_WEBVIEWTOOLBAR_GET_PRIVATE(toolbar);
-	gchar *filename = NULL, *name, *buf;
+	gchar *filename = NULL, *buf;
 	char *filedata;
 	size_t size;
 	GError *error = NULL;
@@ -632,9 +632,8 @@ do_insert_image_cb(GtkWidget *widget, in
 		return;
 	}
 
-	name = strrchr(filename, G_DIR_SEPARATOR) + 1;
-
 	img = purple_image_new_from_data(filedata, size);
+	purple_image_set_friendly_filename(img, filename);
 
 	if (!img) {
 		buf = g_strdup_printf(_("Failed to store image: %s\n"), filename);



More information about the Commits mailing list