pidgin: cc014c55: Translate the description of the plugin ...

sadrul at pidgin.im sadrul at pidgin.im
Wed May 14 18:30:50 EDT 2008


-----------------------------------------------------------------
Revision: cc014c552dd4b9b46387ed7e621e2205db68b354
Ancestor: 3d0b8b3516bb5291c7ffde68712148c4efff27e7
Author: sadrul at pidgin.im
Date: 2008-05-14T22:26:29
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc014c552dd4b9b46387ed7e621e2205db68b354

Modified files:
        pidgin/gtkplugin.c

ChangeLog: 

Translate the description of the plugin in the plugins dialog. Thanks to
Björn Voigt for reporting this.

-------------- next part --------------
============================================================
--- pidgin/gtkplugin.c	1d01462c18e11c5f8a544be227592eff8b2f7ac9
+++ pidgin/gtkplugin.c	6540b8f60da9524b968506364c8ad459f9edc577
@@ -136,8 +136,8 @@ update_plugin_list(void *data)
 		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 @@ static void plugin_toggled(GtkCellRender
 				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 @@ static void plugin_toggled_stage_two(Pur
 
 	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 @@ static void prefs_plugin_sel (GtkTreeSel
 	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 @@ static void prefs_plugin_sel (GtkTreeSel
 	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);


More information about the Commits mailing list