|
@@ -187,6 +187,18 @@ static void perf_gtk__add_callchain(struct rb_root *root, GtkTreeStore *store,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+static void on_row_activated(GtkTreeView *view, GtkTreePath *path,
|
|
|
+ GtkTreeViewColumn *col __maybe_unused,
|
|
|
+ gpointer user_data __maybe_unused)
|
|
|
+{
|
|
|
+ bool expanded = gtk_tree_view_row_expanded(view, path);
|
|
|
+
|
|
|
+ if (expanded)
|
|
|
+ gtk_tree_view_collapse_row(view, path);
|
|
|
+ else
|
|
|
+ gtk_tree_view_expand_row(view, path, FALSE);
|
|
|
+}
|
|
|
+
|
|
|
static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists,
|
|
|
float min_pcnt)
|
|
|
{
|
|
@@ -314,6 +326,8 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ g_signal_connect(view, "row-activated",
|
|
|
+ G_CALLBACK(on_row_activated), NULL);
|
|
|
gtk_container_add(GTK_CONTAINER(window), view);
|
|
|
}
|
|
|
|