aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-log-window.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index aa4162448..669e78fbe 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1464,10 +1464,6 @@ log_manager_got_entities_cb (GObject *manager,
}
}
- /* Select 'Anyone' by default */
- if (gtk_tree_model_get_iter_first (model, &iter))
- gtk_tree_selection_select_iter (selection, &iter);
-
/* Unblock signals */
g_signal_handlers_unblock_by_func (selection,
log_window_who_changed_cb,
@@ -1494,6 +1490,24 @@ g_print ("get_entities_for_account\n");
}
static void
+select_first_entity (TplActionChain *chain, gpointer user_data)
+{
+ GtkTreeView *view;
+ GtkTreeModel *model;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+
+ view = GTK_TREE_VIEW (log_window->treeview_who);
+ model = gtk_tree_view_get_model (view);
+ selection = gtk_tree_view_get_selection (view);
+
+ if (gtk_tree_model_get_iter_first (model, &iter))
+ gtk_tree_selection_select_iter (selection, &iter);
+
+ _tpl_action_chain_continue (log_window->chain);
+}
+
+static void
log_window_who_populate (EmpathyLogWindow *window)
{
EmpathyAccountChooser *account_chooser;
@@ -1560,6 +1574,7 @@ log_window_who_populate (EmpathyLogWindow *window)
g_list_free (accounts);
}
+ _tpl_action_chain_append (window->chain, select_first_entity, NULL);
_tpl_action_chain_start (window->chain);
}