[glade/glade-3-14] Update GladeEditorProperty label sensitivity on GladeProperty sensitivity notify.



commit 69cf45410cfd27177b5a1d24623da99231a6182c
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Fri Oct 19 11:37:44 2012 -0700

    Update GladeEditorProperty label sensitivity on GladeProperty sensitivity notify.

 gladeui/glade-editor-property.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index b726cfd..7c41907 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -201,14 +201,20 @@ glade_editor_property_sensitivity_cb (GladeProperty *property,
                                       GParamSpec *pspec,
                                       GladeEditorProperty *eprop)
 {
-  gboolean sensitive = glade_property_get_sensitive (eprop->priv->property);
+  GladeEditorPropertyPrivate *priv = eprop->priv;
+  gboolean property_enabled = glade_property_get_enabled (property);
+  gboolean sensitive = glade_property_get_sensitive (priv->property);
   gboolean support_sensitive =
-    (glade_property_get_state (eprop->priv->property) & GLADE_STATE_SUPPORT_DISABLED) == 0;
+    (glade_property_get_state (priv->property) & GLADE_STATE_SUPPORT_DISABLED) == 0;
+
+  gtk_widget_set_sensitive (priv->input,
+                            sensitive && support_sensitive && property_enabled);
 
-  gtk_widget_set_sensitive (eprop->priv->input, sensitive && support_sensitive &&
-                            glade_property_get_enabled (property));
-  if (eprop->priv->check)
-    gtk_widget_set_sensitive (eprop->priv->check, sensitive && support_sensitive);
+  if (priv->item_label)
+    gtk_widget_set_sensitive (priv->item_label,
+                              sensitive && support_sensitive && property_enabled);
+  if (priv->check)
+    gtk_widget_set_sensitive (priv->check, sensitive && support_sensitive);
 }
 
 static void



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