summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderer.c
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2001-08-11 20:27:36 +0000
committerHans Breuer <hans@src.gnome.org>2001-08-11 20:27:36 +0000
commit0b5db507da8fff0c9d4fad16c4b4fc569ffb3ec0 (patch)
treeb7c4593df4d6ff4ee476a9944e515698d6fe99ac /gtk/gtkcellrenderer.c
parent4041a889cd7f8219568ffbf49a611029786680eb (diff)
downloadgtk+-0b5db507da8fff0c9d4fad16c4b4fc569ffb3ec0.tar.gz
coalescing property notifies
2001-08-11 Hans Breuer <hans@breuer.org> * gtk/gtkalignment.c, gtk/gtkarrow.c, gtk/gtkaspectframe.c, gtk/gtkcellrenderer.c, gtk/gtkcellrenderertext.c, gtk/gtkcombo.c, gtk/gtkcurve.c, gtk/gtkfontsel.c, gtk/gtklayout.c, gtk/gtkmisc.c, gtk/gtkpacker.c, gtk/gtkprogress.c, gtk/gtkruler.c,, gtk/gtksettings.c, gtk/gtkspinbutton.c, gtk/gtktexttag.c : coalescing property notifies * gtk/gtkclist.c, gtk/gtktipsquery.c, gtk/gtktexttag.c, gtk/gtkwidget.c : added G_SIGNAL_TYPE_STATIC_SCOPE to all GDK_TYPE_EVENT signals * gtk/gtkalignment.c : removed 'direct allocation bug', which Tim discovered while reading the patch
Diffstat (limited to 'gtk/gtkcellrenderer.c')
-rw-r--r--gtk/gtkcellrenderer.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index 610d807bdb..75cc0c8bb8 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -428,16 +428,23 @@ gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell,
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (width >= -1 && height >= -1);
- if (width != cell->width)
+ if ((width != cell->width) || (height != cell->height))
{
- cell->width = width;
- g_object_notify (G_OBJECT (cell), "width");
- }
+ g_object_freeze_notify (G_OBJECT (cell));
- if (height != cell->height)
- {
- cell->height = height;
- g_object_notify (G_OBJECT (cell), "height");
+ if (width != cell->width)
+ {
+ cell->width = width;
+ g_object_notify (G_OBJECT (cell), "width");
+ }
+
+ if (height != cell->height)
+ {
+ cell->height = height;
+ g_object_notify (G_OBJECT (cell), "height");
+ }
+
+ g_object_thaw_notify (G_OBJECT (cell));
}
}