changeset 23127:3da84b370eda

Remove undocumented and [apparently] unnecessary parameter from purple_smiley_new_from_file.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 28 Apr 2008 06:11:36 +0000
parents 2f4b10ee752b
children ce984959bda0
files libpurple/smiley.c libpurple/smiley.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/smiley.c	Mon Apr 28 00:01:07 2008 +0000
+++ b/libpurple/smiley.c	Mon Apr 28 06:11:36 2008 +0000
@@ -556,18 +556,21 @@
 }
 
 PurpleSmiley *
-purple_smiley_new_from_file(const char *shortcut, const char *filepath, const char *filename)
+purple_smiley_new_from_file(const char *shortcut, const char *filepath)
 {
 	PurpleSmiley *smiley = NULL;
 	guchar *smiley_data;
 	size_t smiley_data_len;
+	char *filename;
 
 	g_return_val_if_fail(shortcut  != NULL,  NULL);
 	g_return_val_if_fail(filepath != NULL,  NULL);
 
+	filename = g_path_get_basename(filepath);
 	if (read_smiley_file(filepath, &smiley_data, &smiley_data_len))
 		smiley = purple_smiley_new_from_stream(shortcut, smiley_data,
 				smiley_data_len, filename);
+	g_free(filename);
 
 	return smiley;
 }
--- a/libpurple/smiley.h	Mon Apr 28 00:01:07 2008 +0000
+++ b/libpurple/smiley.h	Mon Apr 28 06:11:36 2008 +0000
@@ -92,8 +92,7 @@
  * @return The custom smiley structure filled up.
  */
 PurpleSmiley *
-purple_smiley_new_from_file(const char *shortcut, const char *filepath,
-                        const char *filename);
+purple_smiley_new_from_file(const char *shortcut, const char *filepath);
 
 /**
  * Destroy the custom smiley and release the associated resources.