summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-06-09 18:55:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-06-09 18:55:19 -0400
commit5fcf9ae09e8ce43f5c51a1b1ed4402ae30b9e1f0 (patch)
tree5f781f6f3c4ada56a76e2ff904ecac08abde1536 /gtk/gtktreeviewcolumn.c
parent1208f2bde04face0b25fb31bbce3c85d3fb66f2e (diff)
downloadgtk+-5fcf9ae09e8ce43f5c51a1b1ed4402ae30b9e1f0.tar.gz
Don't size-allocate invisible headers
We don't ignore their size requests when determining the column width, so allocating them is bound to spew tons of annoying underallocation warnings.
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r--gtk/gtktreeviewcolumn.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index cb04b1b280..bd8cebe18e 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -2117,12 +2117,15 @@ _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column,
gtk_cell_area_context_allocate (priv->cell_area_context, priv->width - priv->padding, -1);
- allocation.x = x_offset;
- allocation.y = 0;
- allocation.width = width;
- allocation.height = _gtk_tree_view_get_header_height (GTK_TREE_VIEW (priv->tree_view));
+ if (gtk_tree_view_get_headers_visible (GTK_TREE_VIEW (priv->tree_view)))
+ {
+ allocation.x = x_offset;
+ allocation.y = 0;
+ allocation.width = width;
+ allocation.height = _gtk_tree_view_get_header_height (GTK_TREE_VIEW (priv->tree_view));
- gtk_widget_size_allocate (priv->button, &allocation);
+ gtk_widget_size_allocate (priv->button, &allocation);
+ }
if (priv->window)
{