Mercurial > pidgin.yaz
comparison finch/libgnt/gnttree.c @ 16123:bc280c341679
We don't need to do anything about the heights here.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 15 Apr 2007 05:28:29 +0000 |
parents | 1983ecd15174 |
children | 4f6a6443a1e3 |
comparison
equal
deleted
inserted
replaced
16122:bd4a21db0ec9 | 16123:bc280c341679 |
---|---|
1523 } | 1523 } |
1524 | 1524 |
1525 void gnt_tree_adjust_columns(GntTree *tree) | 1525 void gnt_tree_adjust_columns(GntTree *tree) |
1526 { | 1526 { |
1527 GntTreeRow *row = tree->root; | 1527 GntTreeRow *row = tree->root; |
1528 int *widths, i, twidth, height; | 1528 int *widths, i, twidth; |
1529 | 1529 |
1530 widths = g_new0(int, tree->ncol); | 1530 widths = g_new0(int, tree->ncol); |
1531 while (row) { | 1531 while (row) { |
1532 GList *iter; | 1532 GList *iter; |
1533 for (i = 0, iter = row->columns; iter; iter = iter->next, i++) { | 1533 for (i = 0, iter = row->columns; iter; iter = iter->next, i++) { |
1550 if (!tree->columns[i].invisible) | 1550 if (!tree->columns[i].invisible) |
1551 twidth += widths[i] + (tree->show_separator ? 1 : 0) + 1; | 1551 twidth += widths[i] + (tree->show_separator ? 1 : 0) + 1; |
1552 } | 1552 } |
1553 g_free(widths); | 1553 g_free(widths); |
1554 | 1554 |
1555 gnt_widget_get_size(GNT_WIDGET(tree), NULL, &height); | 1555 gnt_widget_set_size(GNT_WIDGET(tree), twidth, -1); |
1556 gnt_widget_set_size(GNT_WIDGET(tree), twidth, height); | |
1557 } | 1556 } |
1558 | 1557 |
1559 void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd) | 1558 void gnt_tree_set_hash_fns(GntTree *tree, gpointer hash, gpointer eq, gpointer kd) |
1560 { | 1559 { |
1561 g_hash_table_foreach_remove(tree->hash, return_true, NULL); | 1560 g_hash_table_foreach_remove(tree->hash, return_true, NULL); |