[glade3/glade-3-8] * gladeui/glade-editor-property.c: Hide editor properties when the property is not available on



commit 243ab18c4352fb80214ce546e99aa400f3fcdfc7
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Dec 18 19:30:11 2010 +0900

    	* gladeui/glade-editor-property.c: Hide editor properties when the property is not available
    	  on the widget, bug 585299, fix by Marco Diego Aurélio Mesquita.

 ChangeLog                       |    3 +++
 gladeui/glade-editor-property.c |   10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cfbd657..14175cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 	* src/Makefile.am, gladeui/Makefile.am, plugins/gtk+/Makefile.am, plugins/gnome/Makefile.am:
 	  Fixed makefiles as per bug 521713 (patch initially by Daniel Macks).
 
+	* gladeui/glade-editor-property.c: Hide editor properties when the property is not available
+	  on the widget, bug 585299, fix by Marco Diego Aurélio Mesquita.
+
 2010-12-17  Tristan Van Berkom <tristanvb openismus com>
 
 	* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added support for deprecated GtkOptionMenu.
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index d79d462..4b3183c 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -3767,7 +3767,15 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
 		/* properties are allowed to be missing on some internal widgets */
 		property = glade_widget_get_property (widget, eprop->klass->id);
 
-		glade_editor_property_load (eprop, property);
+		if(property) {
+			glade_editor_property_load (eprop, property);
+			gtk_widget_show (GTK_WIDGET (eprop));
+			gtk_widget_show (GTK_WIDGET (eprop->item_label));
+		}
+		else {
+			gtk_widget_hide (GTK_WIDGET (eprop));
+			gtk_widget_hide (GTK_WIDGET (eprop->item_label));
+		}
 	}
 }
 



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