diff options
author | TingPing <tngpng@gmail.com> | 2013-03-23 04:28:22 -0300 |
---|---|---|
committer | TingPing <tngpng@gmail.com> | 2013-03-23 04:28:22 -0300 |
commit | 93c79d44637ebfe1061073ef838289b3bf026b37 (patch) | |
tree | cf8e019a293c5a51353e2258e252f473836b0bcb | |
parent | cd1155b83cf6d56f80c2c3862dbded5f6164e3a1 (diff) |
fix tree indentation with icons
-rw-r--r-- | src/fe-gtk/chanview-tree.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fe-gtk/chanview-tree.c b/src/fe-gtk/chanview-tree.c index 216ba89f..2a0bff65 100644 --- a/src/fe-gtk/chanview-tree.c +++ b/src/fe-gtk/chanview-tree.c @@ -75,6 +75,7 @@ cv_tree_init (chanview *cv) { GtkWidget *view, *win; GtkCellRenderer *renderer; + GtkTreeViewColumn *col; int wid1, wid2; static const GtkTargetEntry dnd_src_target[] = { @@ -116,6 +117,7 @@ cv_tree_init (chanview *cv) gtk_container_add (GTK_CONTAINER (win), view); + col = gtk_tree_view_column_new(); /* icon column */ if (cv->use_icons) @@ -123,9 +125,9 @@ cv_tree_init (chanview *cv) renderer = gtk_cell_renderer_pixbuf_new (); if (prefs.hex_gui_compact) g_object_set (G_OBJECT (renderer), "ypad", 0, NULL); - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), - -1, NULL, renderer, - "pixbuf", COL_PIXBUF, NULL); + + gtk_tree_view_column_pack_start(col, renderer, FALSE); + gtk_tree_view_column_set_attributes (col, renderer, "pixbuf", COL_PIXBUF, NULL); } /* main column */ @@ -133,9 +135,9 @@ cv_tree_init (chanview *cv) if (prefs.hex_gui_compact) g_object_set (G_OBJECT (renderer), "ypad", 0, NULL); gtk_cell_renderer_text_set_fixed_height_from_font (GTK_CELL_RENDERER_TEXT (renderer), 1); - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), - -1, NULL, renderer, - "text", COL_NAME, "attributes", COL_ATTR, NULL); + gtk_tree_view_column_pack_start(col, renderer, TRUE); + gtk_tree_view_column_set_attributes (col, renderer, "text", COL_NAME, "attributes", COL_ATTR, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (view))), "changed", G_CALLBACK (cv_tree_sel_cb), cv); |