summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderer.c
diff options
context:
space:
mode:
authorTim Janik <timj@src.gnome.org>2008-06-20 11:01:02 +0000
committerTim Janik <timj@src.gnome.org>2008-06-20 11:01:02 +0000
commitd0852ad65ce1bc06769164b8159a724ca8b6c9ef (patch)
treebe2a0931c148e82a6682c815bf79672ebbdf06e5 /gtk/gtkcellrenderer.c
parenta734a9bca1200164e9db6249a282f5a6fab96976 (diff)
downloadgtk+-d0852ad65ce1bc06769164b8159a724ca8b6c9ef.tar.gz
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
Diffstat (limited to 'gtk/gtkcellrenderer.c')
-rw-r--r--gtk/gtkcellrenderer.c17
1 files changed, 16 insertions, 1 deletions
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;