[gtk+] gtk_widget_set_property(): use gtk_widget_set_visible()



commit 026bea22934e79b94ac6b28f3b08ca78046bfabc
Author: Michael Natterer <mitch gimp org>
Date:   Fri Sep 4 14:54:13 2009 +0200

    gtk_widget_set_property(): use gtk_widget_set_visible()
    
    Use the new API instead of show() and hide().

 gtk/gtkwidget.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 98e9149..10868ab 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2433,10 +2433,7 @@ gtk_widget_set_property (GObject         *object,
       gtk_widget_set_usize_internal (widget, -2, g_value_get_int (value));
       break;
     case PROP_VISIBLE:
-      if (g_value_get_boolean (value))
-	gtk_widget_show (widget);
-      else
-	gtk_widget_hide (widget);
+      gtk_widget_set_visible (widget, g_value_get_boolean (value));
       break;
     case PROP_SENSITIVE:
       gtk_widget_set_sensitive (widget, g_value_get_boolean (value));



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