mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
move code
This commit is contained in:
@ -663,6 +663,33 @@ sysprof_callgraph_view_real_go_previous (SysprofCallgraphView *self)
|
|||||||
sysprof_callgraph_view_set_node (self, node);
|
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
|
static void
|
||||||
sysprof_callgraph_view_finalize (GObject *object)
|
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
|
static void
|
||||||
sysprof_callgraph_view_class_init (SysprofCallgraphViewClass *klass)
|
sysprof_callgraph_view_class_init (SysprofCallgraphViewClass *klass)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user