[empathy: 4/7] LogWindow: expand the events when there's only one
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 4/7] LogWindow: expand the events when there's only one
- Date: Tue, 21 Jun 2011 11:55:16 +0000 (UTC)
commit b3c999b6507650423c026cceb641a1a16bbb552f
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Mon Jun 20 18:44:18 2011 +0100
LogWindow: expand the events when there's only one
https://bugzilla.gnome.org/show_bug.cgi?id=652265
libempathy-gtk/empathy-log-window.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 773cfaf..50c6ab0 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]