aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-log-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-21 01:44:18 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-21 19:39:30 +0800
commitb3c999b6507650423c026cceb641a1a16bbb552f (patch)
tree83477eb8e24c41dc337fbf0c4dc96cfefbb87251 /libempathy-gtk/empathy-log-window.c
parent2117ad312759f5bd1190d20dffb714a34444adb1 (diff)
downloadgsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar.gz
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar.bz2
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar.lz
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar.xz
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.tar.zst
gsoc2013-empathy-b3c999b6507650423c026cceb641a1a16bbb552f.zip
LogWindow: expand the events when there's only one
https://bugzilla.gnome.org/show_bug.cgi?id=652265
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r--libempathy-gtk/empathy-log-window.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 773cfafd6..50c6ab049 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -2419,6 +2419,20 @@ log_window_what_setup (EmpathyLogWindow *window)
}
static void
+log_window_maybe_expand_events (void)
+{
+ GtkTreeView *view;
+ GtkTreeModel *model;
+
+ view = GTK_TREE_VIEW (log_window->treeview_events);
+ model = gtk_tree_view_get_model (view);
+
+ /* If there's only one result, expand it */
+ if (gtk_tree_model_iter_n_children (model, NULL) == 1)
+ gtk_tree_view_expand_all (view);
+}
+
+static void
start_spinner (void)
{
gtk_spinner_start (GTK_SPINNER (log_window->spinner));
@@ -2447,6 +2461,7 @@ static void
show_events (TplActionChain *chain,
gpointer user_data)
{
+ log_window_maybe_expand_events ();
gtk_spinner_stop (GTK_SPINNER (log_window->spinner));
gtk_notebook_set_current_page (GTK_NOTEBOOK (log_window->notebook),
PAGE_EVENTS);