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
This commit is contained in:
Tim Janik 2008-06-20 11:01:02 +00:00
parent a734a9bca1
commit d0852ad65c

View File

@ -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;