[gtk+/parasite2: 4/38] parasite: Make child properties insensitive when empty



commit b402b500db89961f0e5a3fa139c15a3f4072358b
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 3 15:57:16 2014 -0400

    parasite: Make child properties insensitive when empty
    
    When the selected object is not a widget, make the child property
    list insensitive.

 modules/other/parasite/prop-list.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/modules/other/parasite/prop-list.c b/modules/other/parasite/prop-list.c
index 8cedde3..8d042f1 100644
--- a/modules/other/parasite/prop-list.c
+++ b/modules/other/parasite/prop-list.c
@@ -362,6 +362,7 @@ parasite_proplist_set_object (ParasitePropList* pl, GObject *object)
 
   g_hash_table_remove_all (pl->priv->prop_iters);
   gtk_list_store_clear (pl->priv->model);
+  gtk_widget_set_sensitive (GTK_WIDGET (pl), FALSE);
 
   if (pl->priv->child_properties)
     {
@@ -379,6 +380,8 @@ parasite_proplist_set_object (ParasitePropList* pl, GObject *object)
   else
     props = g_object_class_list_properties (G_OBJECT_GET_CLASS (object), &num_properties);
 
+  gtk_widget_set_sensitive (GTK_WIDGET (pl), TRUE);
+
   for (i = 0; i < num_properties; i++)
     {
       GParamSpec *prop = props[i];


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