/soc/2013/ankitkv/gobjectification: bfae18433ee8: Replaced prpl ...

Ankit Vani a at nevitus.org
Thu Aug 1 08:44:04 EDT 2013


Changeset: bfae18433ee859cd3ea6a4e20f53b10697264692
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-01 18:13 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/bfae18433ee8

Description:

Replaced prpl argument with PurplePluginProtocolInfo in pidgin_convert_buddy_icon()

diffstat:

 pidgin/gtkutils.c |  6 ++----
 pidgin/gtkutils.h |  4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diffs (50 lines):

diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -2269,9 +2269,8 @@ str_array_match(char **a, char **b)
 }
 
 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 @@ pidgin_convert_buddy_icon(PurplePlugin *
 	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 @@ pidgin_convert_buddy_icon(PurplePlugin *
 	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);
 
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -596,13 +596,13 @@ GtkWidget *pidgin_buddy_icon_chooser_new
 /**
  * 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



More information about the Commits mailing list