Replaced prpl argument with PurplePluginProtocolInfo in pidgin_convert_buddy_icon() soc.2013.gobjectification.plugins

Thu, 01 Aug 2013 18:13:26 +0530

author
Ankit Vani <a@nevitus.org>
date
Thu, 01 Aug 2013 18:13:26 +0530
branch
soc.2013.gobjectification.plugins
changeset 36405
bfae18433ee8
parent 36404
7113051701e2
child 36406
8fba0d44840d

Replaced prpl argument with PurplePluginProtocolInfo in pidgin_convert_buddy_icon()

pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.h file | annotate | diff | comparison | revisions
--- a/pidgin/gtkutils.c	Thu Aug 01 18:07:43 2013 +0530
+++ b/pidgin/gtkutils.c	Thu Aug 01 18:13:26 2013 +0530
@@ -2269,9 +2269,8 @@
 }
 
 gpointer
-pidgin_convert_buddy_icon(PurplePlugin *plugin, const char *path, size_t *len)
+pidgin_convert_buddy_icon(PurplePluginProtocolInfo *prpl_info, const char *path, size_t *len)
 {
-	PurplePluginProtocolInfo *prpl_info;
 	PurpleBuddyIconSpec *spec;
 	int orig_width, orig_height, new_width, new_height;
 	GdkPixbufFormat *format;
@@ -2285,7 +2284,6 @@
 	int i;
 	gchar *tmp;
 
-	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
 	spec = &prpl_info->icon_spec;
 	g_return_val_if_fail(spec->format != NULL, NULL);
 
@@ -2432,7 +2430,7 @@
 	g_object_unref(G_OBJECT(original));
 
 	tmp = g_strdup_printf(_("The file '%s' is too large for %s.  Please try a smaller image.\n"),
-			path, plugin->info->name);
+			path, prpl_info->name);
 	purple_notify_error(NULL, _("Icon Error"), _("Could not set icon"), tmp);
 	g_free(tmp);
 
--- a/pidgin/gtkutils.h	Thu Aug 01 18:07:43 2013 +0530
+++ b/pidgin/gtkutils.h	Thu Aug 01 18:13:26 2013 +0530
@@ -596,13 +596,13 @@
 /**
  * Converts a buddy icon to the required size and format
  *
- * @param plugin     The prpl to convert the icon
+ * @param prpl_info  The prpl to convert the icon
  * @param path       The path of a file to convert
  * @param len        If not @c NULL, the length of the returned data will be set here.
  *
  * @return           The converted image data, or @c NULL if an error occurred.
  */
-gpointer pidgin_convert_buddy_icon(PurplePlugin *plugin, const char *path, size_t *len);
+gpointer pidgin_convert_buddy_icon(PurplePluginProtocolInfo *prpl_info, const char *path, size_t *len);
 
 /**
  * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing

mercurial