diff options
author | TingPing <tngpng@gmail.com> | 2013-03-18 16:08:53 -0300 |
---|---|---|
committer | TingPing <tngpng@gmail.com> | 2013-03-18 16:08:53 -0300 |
commit | 265207a97a345445bbafefbfa1cd24df6fd443dd (patch) | |
tree | b6df3fc1e6783a05dba55cac92f925aaf68460a5 /src/fe-gtk/chanview-tree.c | |
parent | 20e352217731a13a7674d5a962e6d7e8bef49423 (diff) |
Don't indent channels with server tabs disabled.
Diffstat (limited to 'src/fe-gtk/chanview-tree.c')
-rw-r--r-- | src/fe-gtk/chanview-tree.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fe-gtk/chanview-tree.c b/src/fe-gtk/chanview-tree.c index 4a4f1db2..216ba89f 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; + int wid1, wid2; static const GtkTargetEntry dnd_src_target[] = { {"HEXCHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 } @@ -105,6 +106,14 @@ cv_tree_init (chanview *cv) { gtk_tree_view_set_enable_tree_lines (GTK_TREE_VIEW (view), TRUE); } + + /* Indented channels with no server looks silly, but we still want expanders */ + if (!prefs.hex_gui_tab_server) + { + gtk_widget_style_get (view, "expander-size", &wid1, "horizontal-separator", &wid2, NULL); + gtk_tree_view_set_level_indentation (GTK_TREE_VIEW (view), -wid1 - wid2); + } + gtk_container_add (GTK_CONTAINER (win), view); |