From d0852ad65ce1bc06769164b8159a724ca8b6c9ef Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Fri, 20 Jun 2008 11:01:02 +0000 Subject: [PATCH] Add "editing" GObject property to GtkCellRenderer. * gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init), (gtk_cell_renderer_get_property), (gtk_cell_renderer_set_property): add the property and hook it up. svn path=/trunk/; revision=20524 --- gtk/gtkcellrenderer.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 609af2c15f..3754fd5207 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -61,7 +61,8 @@ enum { PROP_IS_EXPANDED, PROP_CELL_BACKGROUND, PROP_CELL_BACKGROUND_GDK, - PROP_CELL_BACKGROUND_SET + PROP_CELL_BACKGROUND_SET, + PROP_EDITING }; /* Signal IDs */ @@ -287,6 +288,14 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) GDK_TYPE_COLOR, GTK_PARAM_READWRITE)); + g_object_class_install_property (object_class, + PROP_EDITING, + g_param_spec_boolean ("editing", + P_("Editing"), + P_("Whether the cell renderer is currently in editing mode"), + FALSE, + GTK_PARAM_READWRITE)); + #define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (object_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE)) @@ -317,6 +326,9 @@ gtk_cell_renderer_get_property (GObject *object, case PROP_SENSITIVE: g_value_set_boolean (value, cell->sensitive); break; + case PROP_EDITING: + g_value_set_boolean (value, cell->editing); + break; case PROP_XALIGN: g_value_set_float (value, cell->xalign); break; @@ -382,6 +394,9 @@ gtk_cell_renderer_set_property (GObject *object, case PROP_SENSITIVE: cell->sensitive = g_value_get_boolean (value); break; + case PROP_EDITING: + cell->editing = g_value_get_boolean (value); + break; case PROP_XALIGN: cell->xalign = g_value_get_float (value); break;