diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-10-20 12:59:54 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-10-20 13:02:19 +0800 |
commit | e2bf0b6f26a6203288b550217a554651feb5c60b (patch) | |
tree | 5a28bafd2c3efb3fd52559c42c109ce44c9b360f /libempathy-gtk/empathy-contact-chooser.c | |
parent | 9cad8740eb8aec46bc896ccbf53bd8d23d632ac5 (diff) | |
download | gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar.gz gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar.bz2 gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar.lz gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar.xz gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.tar.zst gsoc2013-empathy-e2bf0b6f26a6203288b550217a554651feb5c60b.zip |
[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.
Diffstat (limited to 'libempathy-gtk/empathy-contact-chooser.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-chooser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index 2b568fc58..b16540cf3 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); |