mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
callgraph view: Expand cursor row on Right
This commit is contained in:
@ -666,6 +666,24 @@ sp_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 && direction == 1)
|
||||||
|
{
|
||||||
|
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");
|
||||||
|
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sp_callgraph_view_class_init (SpCallgraphViewClass *klass)
|
sp_callgraph_view_class_init (SpCallgraphViewClass *klass)
|
||||||
{
|
{
|
||||||
@ -738,6 +756,12 @@ sp_callgraph_view_init (SpCallgraphView *self)
|
|||||||
self,
|
self,
|
||||||
G_CONNECT_SWAPPED);
|
G_CONNECT_SWAPPED);
|
||||||
|
|
||||||
|
g_signal_connect (priv->descendants_view,
|
||||||
|
"move-cursor",
|
||||||
|
G_CALLBACK (descendants_view_move_cursor_cb),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
|
||||||
cell = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
|
cell = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
|
||||||
"foreground", "#666666",
|
"foreground", "#666666",
|
||||||
"scale", PANGO_SCALE_SMALL,
|
"scale", PANGO_SCALE_SMALL,
|
||||||
|
|||||||
Reference in New Issue
Block a user