From fc237f0a9bfd2fb0edacf1abca0ca80a164619b1 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 12 Nov 2016 14:22:12 -0800 Subject: [PATCH] callgraph-view: ensure expand is set for function label Using the .ui file to create the name cell does not allow us to set the expand property (it defaults to FALSE and cannot be changed). So instead, we just add the cell manually like we do for the tag cell. --- lib/resources/ui/sp-callgraph-view.ui | 8 -------- lib/sp-callgraph-view.c | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/resources/ui/sp-callgraph-view.ui b/lib/resources/ui/sp-callgraph-view.ui index 2bce8d37..67cb120d 100644 --- a/lib/resources/ui/sp-callgraph-view.ui +++ b/lib/resources/ui/sp-callgraph-view.ui @@ -146,14 +146,6 @@ fixed 0 Descendants - - - middle - - - 0 - - diff --git a/lib/sp-callgraph-view.c b/lib/sp-callgraph-view.c index 9158d3ce..a960e144 100644 --- a/lib/sp-callgraph-view.c +++ b/lib/sp-callgraph-view.c @@ -796,6 +796,12 @@ sp_callgraph_view_init (SpCallgraphView *self) G_CALLBACK (descendants_view_move_cursor_cb), NULL); + cell = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, + "ellipsize", PANGO_ELLIPSIZE_MIDDLE, + "xalign", 0.0f, + NULL); + gtk_tree_view_column_pack_start (priv->descendants_name_column, cell, TRUE); + gtk_tree_view_column_add_attribute (priv->descendants_name_column, cell, "text", 0); cell = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, "foreground", "#666666",