changeset 11460:d68ca756e983

[gaim-migrate @ 13699] Don't double-up non-aliased users in the tab completion list. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 06 Sep 2005 05:39:53 +0000
parents b8f6f1fd30c0
children 8e749b7c8ccc
files src/gtkconv.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Tue Sep 06 04:42:27 2005 +0000
+++ b/src/gtkconv.c	Tue Sep 06 05:39:53 2005 +0000
@@ -3608,11 +3608,18 @@
 		if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter))
 		{
 			do {
+				char *name;
 				char *alias;
 
-				gtk_tree_model_get(model, &iter, CHAT_USERS_ALIAS_COLUMN, &alias, -1);
-				tab_complete_process_item(&most_matched, entered, &partial, nick_partial,
+				gtk_tree_model_get(model, &iter,
+						   CHAT_USERS_NAME_COLUMN, &name,
+						   CHAT_USERS_ALIAS_COLUMN, &alias,
+						   -1);
+
+				if (strcmp(name, alias))
+					tab_complete_process_item(&most_matched, entered, &partial, nick_partial,
 										  &matches, FALSE, alias);
+				g_free(name);
 				g_free(alias);
 
 				f = gtk_tree_model_iter_next(model, &iter);