pidgin.custom_smiley: 29b52264: Remove undocumented and [apparently] unn...

sadrul at pidgin.im sadrul at pidgin.im
Mon Apr 28 02:38:39 EDT 2008


-----------------------------------------------------------------
Revision: 29b52264b7fca69f8bdbddd69a072ac6da9be76d
Ancestor: f93d3f7bb596e47f08e506c37e864747ff4d14fb
Author: sadrul at pidgin.im
Date: 2008-04-28T06:11:36
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/29b52264b7fca69f8bdbddd69a072ac6da9be76d

Modified files:
        libpurple/smiley.c libpurple/smiley.h

ChangeLog: 

Remove undocumented and [apparently] unnecessary parameter from
purple_smiley_new_from_file.

-------------- next part --------------
============================================================
--- libpurple/smiley.c	b907f74fbc1899b5402c6b33c72b12414a23b943
+++ libpurple/smiley.c	e0b362deae69584557dd24fde5fe90a380e04fcd
@@ -556,18 +556,21 @@ PurpleSmiley *
 }
 
 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;
 }
============================================================
--- libpurple/smiley.h	8079fba520a5ea21d5b930092f95e46b99656b4b
+++ libpurple/smiley.h	3a4f1b4b71fdab437064af39648a47a1327087c8
@@ -92,8 +92,7 @@ PurpleSmiley *
  * @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.


More information about the Commits mailing list