summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-03-05 19:55:30 +0000
committerJonathan Blandford <jrb@src.gnome.org>2001-03-05 19:55:30 +0000
commita7f524bbd6d9afe99ec9f755ee4b0826411f706c (patch)
tree599235df59040e5c1fb72c12635a2d46c4638f0b /gtk
parent3b2ffda1f5e0498aad3cb9cd7938159631fac61f (diff)
downloadgdk-pixbuf-a7f524bbd6d9afe99ec9f755ee4b0826411f706c.tar.gz
Apply patch from Lee Mallabone to add object properties.
Mon Mar 5 14:55:19 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkcellrenderertoggle.c: Apply patch from Lee Mallabone to add object properties. * gtk/gtkcellrenderertextpixbuf.c: Apply patch from Lee Mallabone to add object properties. * gtk/gtkcellrenderertext.c: Apply patch from Lee Mallabone to add object properties. * gtk/gtkcellrendererpixbuf.c: Apply patch from Lee Mallabone to add object properties. * gtk/gtkcellrenderer.c: Apply patch from Lee Mallabone to add object properties.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcellrenderer.c4
-rw-r--r--gtk/gtkcellrendererpixbuf.c1
-rw-r--r--gtk/gtkcellrenderertext.c23
-rw-r--r--gtk/gtkcellrenderertextpixbuf.c6
-rw-r--r--gtk/gtkcellrenderertoggle.c2
5 files changed, 35 insertions, 1 deletions
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index 0b69d98bc..edc613512 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -182,15 +182,19 @@ gtk_cell_renderer_set_property (GObject *object,
{
case PROP_XALIGN:
cell->xalign = g_value_get_float (value);
+ g_object_notify (object, "xalign");
break;
case PROP_YALIGN:
cell->yalign = g_value_get_float (value);
+ g_object_notify (object, "yalign");
break;
case PROP_XPAD:
cell->xpad = g_value_get_int (value);
+ g_object_notify (object, "xpad");
break;
case PROP_YPAD:
cell->ypad = g_value_get_int (value);
+ g_object_notify (object, "ypad");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index f3a434e37..5f58d65e6 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -146,6 +146,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
if (cellpixbuf->pixbuf)
g_object_unref (G_OBJECT (cellpixbuf->pixbuf));
cellpixbuf->pixbuf = pixbuf;
+ g_object_notify (object, "pixbuf");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index fc998bd3a..de86b4b0d 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -666,6 +666,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
if (celltext->text)
g_free (celltext->text);
celltext->text = g_strdup (g_value_get_string (value));
+ g_object_notify(G_OBJECT(object), "text");
break;
case PROP_MARKUP:
@@ -732,10 +733,12 @@ gtk_cell_renderer_text_set_property (GObject *object,
break;
case PROP_BACKGROUND_GDK:
+ /* This notifies the GObject itself. */
set_bg_color (celltext, g_value_get_boxed (value));
break;
case PROP_FOREGROUND_GDK:
+ /* This notifies the GObject itself. */
set_fg_color (celltext, g_value_get_boxed (value));
break;
@@ -749,7 +752,13 @@ gtk_cell_renderer_text_set_property (GObject *object,
if (name)
font_desc = pango_font_description_from_string (name);
+ /* This function notifies the relevant GObjects itself.
+ * I'm not sure how useful the notify() on 'font'
+ * actually is here, but it's here for consistency.
+ */
set_font_description (celltext, font_desc);
+ g_object_notify(G_OBJECT(object), "font_desc");
+ g_object_notify(G_OBJECT(object), "font");
if (font_desc)
pango_font_description_free (font_desc);
@@ -851,50 +860,62 @@ gtk_cell_renderer_text_set_property (GObject *object,
case PROP_BACKGROUND_SET:
celltext->background_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "background_set");
break;
case PROP_FOREGROUND_SET:
celltext->foreground_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "foreground_set");
break;
case PROP_FAMILY_SET:
celltext->family_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "family_set");
break;
case PROP_STYLE_SET:
celltext->style_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "style_set");
break;
case PROP_VARIANT_SET:
celltext->variant_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "variant_set");
break;
case PROP_WEIGHT_SET:
celltext->weight_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "weight_set");
break;
case PROP_STRETCH_SET:
celltext->stretch_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "stretch_set");
break;
case PROP_SIZE_SET:
celltext->size_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "size_set");
break;
case PROP_EDITABLE_SET:
celltext->editable_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "editable_set");
break;
case PROP_STRIKETHROUGH_SET:
celltext->strikethrough_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "strikethrough_set");
break;
case PROP_UNDERLINE_SET:
celltext->underline_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "underline_set");
break;
- case PROP_RISE_SET:
+ case PROP_RISE_SET:
celltext->rise_set = g_value_get_boolean (value);
+ g_object_notify(G_OBJECT(object), "rise_set");
break;
default:
diff --git a/gtk/gtkcellrenderertextpixbuf.c b/gtk/gtkcellrenderertextpixbuf.c
index 2f007dcc4..08092e8ca 100644
--- a/gtk/gtkcellrenderertextpixbuf.c
+++ b/gtk/gtkcellrenderertextpixbuf.c
@@ -232,29 +232,35 @@ gtk_cell_renderer_text_pixbuf_set_property (GObject *object,
g_object_set_property (G_OBJECT (celltextpixbuf->pixbuf),
"pixbuf",
value);
+ g_object_notify (G_OBJECT(object), "pixbuf");
break;
case PROP_PIXBUF_POS:
celltextpixbuf->pixbuf_pos = g_value_get_int (value);
+ g_object_notify (G_OBJECT(object), "pixbuf_pos");
break;
case PROP_PIXBUF_XALIGN:
g_object_set_property (G_OBJECT (celltextpixbuf->pixbuf),
"xalign",
value);
+ g_object_notify (G_OBJECT(object), "pixbuf_xalign");
break;
case PROP_PIXBUF_YALIGN:
g_object_set_property (G_OBJECT (celltextpixbuf->pixbuf),
"yalign",
value);
+ g_object_notify (G_OBJECT(object), "pixbuf_yalign");
break;
case PROP_PIXBUF_XPAD:
g_object_set_property (G_OBJECT (celltextpixbuf->pixbuf),
"xpad",
value);
+ g_object_notify (G_OBJECT(object), "pixbuf_xpad");
break;
case PROP_PIXBUF_YPAD:
g_object_set_property (G_OBJECT (celltextpixbuf->pixbuf),
"ypad",
value);
+ g_object_notify (G_OBJECT(object), "pixbuf_ypad");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index b80fe177f..9e1d0f541 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -185,9 +185,11 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
{
case PROP_ACTIVE:
celltoggle->active = g_value_get_boolean (value);
+ g_object_notify (G_OBJECT(object), "active");
break;
case PROP_RADIO:
celltoggle->radio = g_value_get_boolean (value);
+ g_object_notify (G_OBJECT(object), "radio");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);