changeset 22937:917bc972a141

Translate the description of the plugin in the plugins dialog. Thanks to Bj«Órn Voigt for reporting this.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 14 May 2008 22:26:29 +0000
parents c0fc992da040
children 9809516e0032 6476a8da1937
files pidgin/gtkplugin.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkplugin.c	Wed May 14 11:57:02 2008 +0000
+++ b/pidgin/gtkplugin.c	Wed May 14 22:26:29 2008 +0000
@@ -136,8 +136,8 @@
 		gtk_list_store_append (ls, &iter);
 
 		name = g_markup_escape_text(plug->info->name ? _(plug->info->name) : g_basename(plug->path), -1);
-		version = g_markup_escape_text(plug->info->version, -1);
-		summary = g_markup_escape_text(_(plug->info->summary), -1);
+		version = g_markup_escape_text(purple_plugin_get_version(plug), -1);
+		summary = g_markup_escape_text(purple_plugin_get_summary(plug), -1);
 
 		desc = g_strdup_printf("<b>%s</b> %s\n%s", name,
 				       version,
@@ -285,7 +285,7 @@
 				PurplePlugin *dep_plugin = purple_plugins_find_with_id(dep_name);
 				g_return_if_fail(dep_plugin != NULL);
 
-				g_string_append_printf(tmp, "\n\t%s\n", _(dep_plugin->info->name));
+				g_string_append_printf(tmp, "\n\t%s\n", purple_plugin_get_name(dep_plugin));
 			}
 
 			cb_data = g_new(gpointer, 3);
@@ -344,14 +344,14 @@
 
 	if (plug->error != NULL)
 	{
-		gchar *name = g_markup_escape_text(_(plug->info->name), -1);
+		gchar *name = g_markup_escape_text(purple_plugin_get_name(plug), -1);
 
 		gchar *error = g_markup_escape_text(plug->error, -1);
 		gchar *text;
 
 		text = g_strdup_printf(
 			"<b>%s</b> %s\n<span weight=\"bold\" color=\"red\"%s</span>",
-			plug->info->name, plug->info->version, error);
+			purple_plugin_get_name(plug), purple_plugin_get_version(plug), error);
 		gtk_list_store_set(GTK_LIST_STORE (model), iter,
 				   1, text,
 				   -1);
@@ -414,8 +414,8 @@
 	gtk_tree_model_get_value (model, &iter, 2, &val);
 	plug = g_value_get_pointer(&val);
 
-	name = g_markup_escape_text(_(plug->info->name), -1);
-	version = g_markup_escape_text(plug->info->version, -1);
+	name = g_markup_escape_text(purple_plugin_get_name(plug), -1);
+	version = g_markup_escape_text(purple_plugin_get_version(plug), -1);
 	buf = g_strdup_printf(
 		"<span size=\"larger\" weight=\"bold\">%s</span> "
 		"<span size=\"smaller\">%s</span>",
@@ -423,12 +423,12 @@
 	gtk_label_set_markup(plugin_name, buf);
 	g_free(buf);
 
-	gtk_text_buffer_set_text(plugin_desc, plug->info->description, -1);
-	gtk_label_set_text(plugin_author, plug->info->author);
+	gtk_text_buffer_set_text(plugin_desc, purple_plugin_get_description(plug), -1);
+	gtk_label_set_text(plugin_author, purple_plugin_get_author(plug));
 	gtk_label_set_text(plugin_filename, plug->path);
 
 	g_free(plugin_website_uri);
-	plugin_website_uri = g_strdup(plug->info->homepage);
+	plugin_website_uri = g_strdup(purple_plugin_get_homepage(plug));
 	if (plugin_website_uri)
 	{
 		tmp = g_markup_escape_text(plugin_website_uri, -1);