Don't indent channels with server tabs disabled.

This commit is contained in:
TingPing 2013-03-18 16:08:53 -03:00
parent 20e3522177
commit 265207a97a
1 changed files with 9 additions and 0 deletions

View File

@ -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 }
@ -106,6 +107,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);
/* icon column */