From b5887bd26e0c7833d3cdba746f947bd30643372b Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Thu, 17 Jan 2013 00:36:04 +0100 Subject: [PATCH] treeviewcolumn: always hide button widget if the header is not shown Fixes the following warning from appearing: Gtk-WARNING **: GtkTreeView 0xb44010 is mapped but visible child GtkButton 0xad9320 is not mapped --- gtk/gtktreeviewcolumn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 3f32c81312..e9b0ac6e9c 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -1035,10 +1035,10 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) priv->tree_view != NULL && gtk_widget_get_realized (priv->tree_view)) { - if (priv->visible) + if (priv->visible && + gdk_window_is_visible (_gtk_tree_view_get_header_window (GTK_TREE_VIEW (priv->tree_view)))) { - if (gdk_window_is_visible (_gtk_tree_view_get_header_window (GTK_TREE_VIEW (priv->tree_view)))) - gtk_widget_show_now (priv->button); + gtk_widget_show (priv->button); if (priv->window) {