[gaim-migrate @ 15885]

Tue, 14 Mar 2006 07:25:54 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Tue, 14 Mar 2006 07:25:54 +0000
changeset 13510
6b9acc4e1e79
parent 13509
38ebac941c40
child 13511
743387e8099e

[gaim-migrate @ 15885]
SF Patch #1446694 from Sadrul

"When you start editing the alias of a buddy with weird
(non-ascii) characters in it, the text for that node
(and sometimes an adjacent row) get corrupted. This
patch fixes that."

committer: Richard Laager <rlaager@pidgin.im>

src/gtkblist.c file | annotate | diff | comparison | revisions
--- a/src/gtkblist.c	Tue Mar 14 07:15:43 2006 +0000
+++ b/src/gtkblist.c	Tue Mar 14 07:25:54 2006 +0000
@@ -339,6 +339,7 @@
 	GtkTreeIter iter;
 	GtkTreePath *path;
 	const char *text = NULL;
+	char *esc;
 
 	if (!(get_iter_from_node(node, &iter))) {
 		/* This is either a bug, or the buddy is in a collapsed contact */
@@ -365,7 +366,9 @@
 		g_return_if_reached();
 	}
 
-	gtk_tree_store_set(gtkblist->treemodel, &iter, NAME_COLUMN, text, -1);
+	esc = g_markup_escape_text(text, -1);
+	gtk_tree_store_set(gtkblist->treemodel, &iter, NAME_COLUMN, esc, -1);
+	g_free(esc);
 
 	path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter);
 	g_object_set(G_OBJECT(gtkblist->text_rend), "editable", TRUE, NULL);

mercurial