diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2004-05-27 03:31:17 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-05-27 03:31:17 +0000 |
commit | 310fd268e7498582755fd21bcf5428794a832bc0 (patch) | |
tree | 9323eafee5beacd4743fd73599b1a82a11658958 /gtk/gtkcellrenderer.c | |
parent | 7c200f8a9c9985c483f6293d79d8b4192e2e6a4a (diff) | |
download | gtk+-310fd268e7498582755fd21bcf5428794a832bc0.tar.gz |
Support insensitive cells in tree views and combo boxes.
Diffstat (limited to 'gtk/gtkcellrenderer.c')
-rw-r--r-- | gtk/gtkcellrenderer.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 31fffdaea7..345766d5e0 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -50,6 +50,7 @@ enum { PROP_ZERO, PROP_MODE, PROP_VISIBLE, + PROP_SENSITIVE, PROP_XALIGN, PROP_YALIGN, PROP_XPAD, @@ -111,6 +112,7 @@ gtk_cell_renderer_init (GtkCellRenderer *cell) cell->yalign = 0.5; cell->xpad = 0; cell->ypad = 0; + cell->sensitive = TRUE; } static void @@ -162,8 +164,14 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) P_("visible"), P_("Display the cell"), TRUE, - G_PARAM_READABLE | - G_PARAM_WRITABLE)); + G_PARAM_READWRITE)); + g_object_class_install_property (object_class, + PROP_SENSITIVE, + g_param_spec_boolean ("sensitive", + P_("Sensitive"), + P_("Display the cell sensitive"), + TRUE, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_XALIGN, @@ -293,6 +301,9 @@ gtk_cell_renderer_get_property (GObject *object, case PROP_VISIBLE: g_value_set_boolean (value, cell->visible); break; + case PROP_SENSITIVE: + g_value_set_boolean (value, cell->sensitive); + break; case PROP_XALIGN: g_value_set_float (value, cell->xalign); break; @@ -355,6 +366,9 @@ gtk_cell_renderer_set_property (GObject *object, case PROP_VISIBLE: cell->visible = g_value_get_boolean (value); break; + case PROP_SENSITIVE: + cell->sensitive = g_value_get_boolean (value); + break; case PROP_XALIGN: cell->xalign = g_value_get_float (value); break; |