[gtk+] treeviewcolumn: always hide button widget if the header is not shown



commit b5887bd26e0c7833d3cdba746f947bd30643372b
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Jan 17 00:36:04 2013 +0100

    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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 3f32c81..e9b0ac6 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)
 	    {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]