From 1d4d5e7022aeb2a84e0a322344dbbc724bb5bb0a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 20 May 2019 17:45:24 -0700 Subject: [PATCH] move code --- src/libsysprof-ui/sysprof-callgraph-view.c | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/libsysprof-ui/sysprof-callgraph-view.c b/src/libsysprof-ui/sysprof-callgraph-view.c index c9927ee9..51f64f5c 100644 --- a/src/libsysprof-ui/sysprof-callgraph-view.c +++ b/src/libsysprof-ui/sysprof-callgraph-view.c @@ -663,6 +663,33 @@ sysprof_callgraph_view_real_go_previous (SysprofCallgraphView *self) sysprof_callgraph_view_set_node (self, node); } +static void +descendants_view_move_cursor_cb (GtkTreeView *descendants_view, + GtkMovementStep step, + int direction, + gpointer user_data) +{ + if (step == GTK_MOVEMENT_VISUAL_POSITIONS) + { + GtkTreePath *path; + + gtk_tree_view_get_cursor (descendants_view, &path, NULL); + + 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); + } +} + static void sysprof_callgraph_view_finalize (GObject *object) { @@ -714,33 +741,6 @@ sysprof_callgraph_view_set_property (GObject *object, } } -static void -descendants_view_move_cursor_cb (GtkTreeView *descendants_view, - GtkMovementStep step, - int direction, - gpointer user_data) -{ - if (step == GTK_MOVEMENT_VISUAL_POSITIONS) - { - GtkTreePath *path; - - gtk_tree_view_get_cursor (descendants_view, &path, NULL); - - 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); - } -} - static void sysprof_callgraph_view_class_init (SysprofCallgraphViewClass *klass) {