aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/empathy-log-window.html19
-rw-r--r--libempathy-gtk/empathy-log-window.c15
2 files changed, 25 insertions, 9 deletions
diff --git a/data/empathy-log-window.html b/data/empathy-log-window.html
index 839ddee53..794717704 100644
--- a/data/empathy-log-window.html
+++ b/data/empathy-log-window.html
@@ -80,6 +80,25 @@ function toggleExpander(node, open)
nodes[i].style.display = display;
}
+function expandAll()
+{
+ function expandAllRecurse(node)
+ {
+ var nodes = getNodes(node);
+
+ for (var i = 0; i < nodes.length; i++)
+ {
+ toggleExpander(nodes[i], true);
+
+ expandAllRecurse(nodes[i]);
+ }
+ }
+
+ var treeview = document.getElementById('treeview');
+
+ expandAllRecurse(treeview);
+}
+
function insertRow (path, text)
{
var treeview = document.getElementById('treeview');
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index cd1daac22..bb8b1ce42 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -2982,16 +2982,13 @@ log_window_what_setup (EmpathyLogWindow *self)
static void
log_window_maybe_expand_events (void)
{
- // GtkTreeView *view;
- // GtkTreeModel *model;
+ GtkTreeModel *model = GTK_TREE_MODEL (log_window->priv->store_events);
- // FIXME: reimplement
- // view = GTK_TREE_VIEW (log_window->priv->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);
+ /* If there's only one result, expand it */
+ if (gtk_tree_model_iter_n_children (model, NULL) == 1)
+ webkit_web_view_execute_script (
+ WEBKIT_WEB_VIEW (log_window->priv->webview),
+ "javascript:expandAll()");
}
static gboolean