aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-11 17:06:51 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 01:45:59 +0800
commit61b92614a738e8fefc9376aa66fe14b00167e30c (patch)
tree043a839c19c09af5c55f725f38fd475a9e2fc425
parent3a19d359f1cae8b2b4e6b4c31aaa193bd31a8720 (diff)
downloadgsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar.gz
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar.bz2
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar.lz
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar.xz
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.tar.zst
gsoc2013-empathy-61b92614a738e8fefc9376aa66fe14b00167e30c.zip
LogWindow: select 'Anyone' when searching
-rw-r--r--libempathy-gtk/empathy-log-window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index c2a9c7897..f80dfbd46 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1627,6 +1627,7 @@ populate_entities_from_search_hits (void)
TpAccount *account;
GtkTreeView *view;
GtkTreeModel *model;
+ GtkTreeSelection *selection;
GtkTreeIter iter;
GtkListStore *store;
GList *l;
@@ -1634,6 +1635,7 @@ populate_entities_from_search_hits (void)
view = GTK_TREE_VIEW (log_window->priv->treeview_who);
model = gtk_tree_view_get_model (view);
store = GTK_LIST_STORE (model);
+ selection = gtk_tree_view_get_selection (view);
gtk_list_store_clear (store);
@@ -1694,7 +1696,9 @@ populate_entities_from_search_hits (void)
-1);
}
- /* FIXME: select old entity if still available */
+ /* Select 'Anyone' */
+ if (gtk_tree_model_get_iter_first (model, &iter))
+ gtk_tree_selection_select_iter (selection, &iter);
}
static void
@@ -1721,14 +1725,14 @@ log_manager_searched_new_cb (GObject *manager,
tp_clear_pointer (&log_window->priv->hits, tpl_log_manager_search_free);
log_window->priv->hits = hits;
- populate_entities_from_search_hits ();
-
view = GTK_TREE_VIEW (log_window->priv->treeview_when);
selection = gtk_tree_view_get_selection (view);
g_signal_handlers_unblock_by_func (selection,
log_window_when_changed_cb,
log_window);
+
+ populate_entities_from_search_hits ();
}
static void