1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 11:12:19 -05:00

fix tree indentation with icons

This commit is contained in:
TingPing 2013-03-23 04:28:22 -03:00
parent cd1155b83c
commit 93c79d4463

View File

@ -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);