[sysprof] callgraph-view: collapse row with Left Arrow
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] callgraph-view: collapse row with Left Arrow
- Date: Tue, 30 Aug 2016 20:01:24 +0000 (UTC)
commit 69338ee16e11fde06cfe646e4d43e9f06af0cbc4
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 30 13:01:16 2016 -0700
callgraph-view: collapse row with Left Arrow
This makes Left Arrow do the opposite of Right Arrow.
lib/sp-callgraph-view.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/lib/sp-callgraph-view.c b/lib/sp-callgraph-view.c
index 2260d0b..57ea35c 100644
--- a/lib/sp-callgraph-view.c
+++ b/lib/sp-callgraph-view.c
@@ -671,13 +671,22 @@ descendants_view_move_cursor_cb (GtkTreeView *descendants_view,
int direction,
gpointer user_data)
{
- if (step == GTK_MOVEMENT_VISUAL_POSITIONS && direction == 1)
+ if (step == GTK_MOVEMENT_VISUAL_POSITIONS)
{
GtkTreePath *path;
+
gtk_tree_view_get_cursor (descendants_view, &path, NULL);
- gtk_tree_view_expand_row (descendants_view, path, FALSE);
- g_signal_stop_emission_by_name (descendants_view, "move-cursor");
+ if (direction == 1)
+ {
+ gtk_tree_view_expand_row (descendants_view, path, FALSE);
+ g_signal_stop_emission_by_name (descendants_view, "move-cursor");
+ }
+ else if (direction == -1)
+ {
+ gtk_tree_view_collapse_row (descendants_view, path);
+ g_signal_stop_emission_by_name (descendants_view, "move-cursor");
+ }
gtk_tree_path_free (path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]