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
This commit is contained in:
Carl-Anton Ingmarsson 2013-01-17 00:36:04 +01:00 committed by Benjamin Otte
parent 3210cd6511
commit b5887bd26e

View File

@ -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)
{