From e2bf0b6f26a6203288b550217a554651feb5c60b Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Thu, 20 Oct 2011 15:59:54 +1100 Subject: [PATCH] [contact-chooser] Don't reselect the first match if something else is selected This patch isn't quite the behaviour I want, but I think it's better than just re-selecting the first entry every time I type something. --- libempathy-gtk/empathy-contact-chooser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index 2b568fc5..b16540cf 100644 --- a/libempathy-gtk/empathy-contact-chooser.c +++ b/libempathy-gtk/empathy-contact-chooser.c @@ -229,8 +229,11 @@ get_contacts_cb (TpConnection *connection, individual_store_add_individual_and_connect (self->priv->store, individual); - /* Make sure that the first matching item is selected */ - empathy_individual_view_select_first (self->priv->view); + /* if nothing is selected, select the first matching node */ + if (!gtk_tree_selection_get_selected ( + gtk_tree_view_get_selection (GTK_TREE_VIEW (self->priv->view)), + NULL, NULL)) + empathy_individual_view_select_first (self->priv->view); g_clear_object (&persona_new); g_clear_object (&personas); -- 2.39.2