Commit a15d5c36 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fix up for changes to PangoFontDescription.

Wed Sep 12 11:21:14 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
	  gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
	PangoFontDescription.

	* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
	gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
	structure.

	* gtk/gtkfontsel.c: Fix up for new Pango font listing API.

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
  	direct access to style->font. Deprecate gtk_style_ref/unref.

 	* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
  	Remove gtk_style_ref/unref with g_object_ref/unref.

  	* gtk/gtkcalendar.c: Remove leftover macros accessing
  	style->font.

  	* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
  	variable.

  	* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
	style->font.
parent c45ee0bf
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
Wed Sep 12 11:21:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcellrenderertext.[ch] gtk/gtktexttag.[ch]
gtk/gtktextview.c tests/testgtk.c: Fix up for changes to
PangoFontDescription.
* gtk/gtkentry.c gtk/gtkclist.c gtk/gtkcellrenderertext.c
gtk/gtkspinbutton.c: Fix up for change to PangoMetrics
structure.
* gtk/gtkfontsel.c: Fix up for new Pango font listing API.
* gtk/gtkstyle.[ch]: Add gtk_style_get_font/set_font to replace
direct access to style->font. Deprecate gtk_style_ref/unref.
* gtk/gtkclist.c gtk/gtkctree.c gtk/gtkstyle.c gtk/gtkwidget.c:
Remove gtk_style_ref/unref with g_object_ref/unref.
* gtk/gtkcalendar.c: Remove leftover macros accessing
style->font.
* gtk/gtkhruler.c (gtk_hruler_draw_ticks): Remove unused
variable.
* gtk/gtktext.c gtk/gtklabel.c: Use gtk_style_get_font() instead of
style->font.
Tue Sep 18 13:51:35 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
......
......@@ -491,7 +491,3 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
ancestor with a colormap set on it explicitely, or if that
fails, the default colormap.
\ No newline at end of file
......@@ -36,8 +36,7 @@ GtkCellRenderer
@height:
@xpad:
@ypad:
@can_activate:
@can_edit:
@mode:
@visible:
@is_expander:
@is_expanded:
......
......@@ -44,7 +44,6 @@ Styles
@text_aa:
@black:
@white:
@font:
@font_desc:
@xthickness:
@ythickness:
......
......@@ -186,10 +186,6 @@ dates_difference(N_int year1, N_int mm1, N_int dd1,
#define BACKGROUND_COLOR(widget) (& (widget)->style->base[GTK_WIDGET_STATE (widget)])
#define HIGHLIGHT_BACK_COLOR(widget) (& (widget)->style->mid[GTK_WIDGET_STATE (widget)])
#define HEADER_FONT(widget) ((widget)->style->font)
#define LABEL_FONT(widget) ((widget)->style->font)
#define DAY_FONT(widget) ((widget)->style->font)
enum {
ARROW_YEAR_LEFT,
ARROW_YEAR_RIGHT,
......
......@@ -130,6 +130,7 @@ gtk_cell_renderer_text_init (GtkCellRendererText *celltext)
GTK_CELL_RENDERER (celltext)->ypad = 2;
celltext->fixed_height_rows = -1;
celltext->font = pango_font_description_new ();
}
static void
......@@ -396,8 +397,7 @@ gtk_cell_renderer_text_finalize (GObject *object)
{
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (object);
if (celltext->font.family_name)
g_free (celltext->font.family_name);
pango_font_description_free (celltext->font);
if (celltext->text)
g_free (celltext->text);
......@@ -408,6 +408,28 @@ gtk_cell_renderer_text_finalize (GObject *object)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static PangoFontMask
get_property_font_set_mask (guint prop_id)
{
switch (prop_id)
{
case PROP_FAMILY_SET:
return PANGO_FONT_MASK_FAMILY;
case PROP_STYLE_SET:
return PANGO_FONT_MASK_STYLE;
case PROP_VARIANT_SET:
return PANGO_FONT_MASK_VARIANT;
case PROP_WEIGHT_SET:
return PANGO_FONT_MASK_WEIGHT;
case PROP_STRETCH_SET:
return PANGO_FONT_MASK_STRETCH;
case PROP_SIZE_SET:
return PANGO_FONT_MASK_SIZE;
}
return 0;
}
static void
gtk_cell_renderer_text_get_property (GObject *object,
guint param_id,
......@@ -455,42 +477,42 @@ gtk_cell_renderer_text_get_property (GObject *object,
/* FIXME GValue imposes a totally gratuitous string copy
* here, we could just hand off string ownership
*/
gchar *str = pango_font_description_to_string (&celltext->font);
gchar *str = pango_font_description_to_string (celltext->font);
g_value_set_string (value, str);
g_free (str);
}
break;
case PROP_FONT_DESC:
g_value_set_boxed (value, &celltext->font);
g_value_set_boxed (value, celltext->font);
break;
case PROP_FAMILY:
g_value_set_string (value, celltext->font.family_name);
g_value_set_string (value, pango_font_description_get_family (celltext->font));
break;
case PROP_STYLE:
g_value_set_enum (value, celltext->font.style);
g_value_set_enum (value, pango_font_description_get_style (celltext->font));
break;
case PROP_VARIANT:
g_value_set_enum (value, celltext->font.variant);
g_value_set_enum (value, pango_font_description_get_variant (celltext->font));
break;
case PROP_WEIGHT:
g_value_set_int (value, celltext->font.weight);
g_value_set_int (value, pango_font_description_get_weight (celltext->font));
break;
case PROP_STRETCH:
g_value_set_enum (value, celltext->font.stretch);
g_value_set_enum (value, pango_font_description_get_stretch (celltext->font));
break;
case PROP_SIZE:
g_value_set_int (value, celltext->font.size);
g_value_set_int (value, pango_font_description_get_size (celltext->font));
break;
case PROP_SIZE_POINTS:
g_value_set_double (value, ((double)celltext->font.size) / (double)PANGO_SCALE);
g_value_set_double (value, ((double)pango_font_description_get_size (celltext->font)) / (double)PANGO_SCALE);
break;
case PROP_SCALE:
......@@ -522,28 +544,15 @@ gtk_cell_renderer_text_get_property (GObject *object,
break;
case PROP_FAMILY_SET:
g_value_set_boolean (value, celltext->family_set);
break;
case PROP_STYLE_SET:
g_value_set_boolean (value, celltext->style_set);
break;
case PROP_VARIANT_SET:
g_value_set_boolean (value, celltext->variant_set);
break;
case PROP_WEIGHT_SET:
g_value_set_boolean (value, celltext->weight_set);
break;
case PROP_STRETCH_SET:
g_value_set_boolean (value, celltext->stretch_set);
break;
case PROP_SIZE_SET:
g_value_set_boolean (value, celltext->size_set);
break;
{
PangoFontMask mask = get_property_font_set_mask (param_id);
g_value_set_boolean (value, (pango_font_description_get_set_fields (celltext->font) & mask) != 0);
}
case PROP_SCALE_SET:
g_value_set_boolean (value, celltext->scale_set);
......@@ -628,68 +637,70 @@ set_fg_color (GtkCellRendererText *celltext,
}
}
static void
notify_set_changed (GObject *object,
PangoFontMask changed_mask)
{
if (changed_mask & PANGO_FONT_MASK_FAMILY)
g_object_notify (object, "family_set");
if (changed_mask & PANGO_FONT_MASK_STYLE)
g_object_notify (object, "style_set");
if (changed_mask & PANGO_FONT_MASK_VARIANT)
g_object_notify (object, "variant_set");
if (changed_mask & PANGO_FONT_MASK_WEIGHT)
g_object_notify (object, "weight_set");
if (changed_mask & PANGO_FONT_MASK_STRETCH)
g_object_notify (object, "stretch_set");
if (changed_mask & PANGO_FONT_MASK_SIZE)
g_object_notify (object, "size_set");
}
static void
set_font_description (GtkCellRendererText *celltext,
PangoFontDescription *font_desc)
{
if (font_desc != NULL)
{
/* pango_font_description_from_string() will sometimes return
* a NULL family or -1 size, so handle those cases.
*/
if (font_desc->family_name)
g_object_set (G_OBJECT (celltext),
"family", font_desc->family_name,
NULL);
if (font_desc->size >= 0)
g_object_set (G_OBJECT (celltext),
"size", font_desc->size,
NULL);
g_object_set (G_OBJECT (celltext),
"style", font_desc->style,
"variant", font_desc->variant,
"weight", font_desc->weight,
"stretch", font_desc->stretch,
NULL);
}
GObject *object = G_OBJECT (celltext);
PangoFontDescription *new_font_desc;
PangoFontMask old_mask, new_mask, changed_mask, set_changed_mask;
if (font_desc)
new_font_desc = pango_font_description_copy (font_desc);
else
new_font_desc = pango_font_description_new ();
old_mask = pango_font_description_get_set_fields (celltext->font);
new_mask = pango_font_description_get_set_fields (new_font_desc);
changed_mask = old_mask | new_mask;
set_changed_mask = old_mask ^ new_mask;
pango_font_description_free (celltext->font);
celltext->font = new_font_desc;
g_object_freeze_notify (object);
g_object_notify (object, "font_desc");
g_object_notify (object, "font");
if (changed_mask & PANGO_FONT_MASK_FAMILY)
g_object_notify (object, "family");
if (changed_mask & PANGO_FONT_MASK_STYLE)
g_object_notify (object, "style");
if (changed_mask & PANGO_FONT_MASK_VARIANT)
g_object_notify (object, "variant");
if (changed_mask & PANGO_FONT_MASK_WEIGHT)
g_object_notify (object, "weight");
if (changed_mask & PANGO_FONT_MASK_STRETCH)
g_object_notify (object, "stretch");
if (changed_mask & PANGO_FONT_MASK_SIZE)
{
g_object_freeze_notify (G_OBJECT (celltext));
if (celltext->family_set)
{
celltext->family_set = FALSE;
g_object_notify (G_OBJECT (celltext), "family_set");
}
if (celltext->style_set)
{
celltext->style_set = FALSE;
g_object_notify (G_OBJECT (celltext), "style_set");
}
if (celltext->variant_set)
{
celltext->variant_set = FALSE;
g_object_notify (G_OBJECT (celltext), "variant_set");
}
if (celltext->weight_set)
{
celltext->weight_set = FALSE;
g_object_notify (G_OBJECT (celltext), "weight_set");
}
if (celltext->stretch_set)
{
celltext->stretch_set = FALSE;
g_object_notify (G_OBJECT (celltext), "stretch_set");
}
if (celltext->size_set)
{
celltext->size_set = FALSE;
g_object_notify (G_OBJECT (celltext), "size_set");
}
g_object_thaw_notify (G_OBJECT (celltext));
g_object_notify (object, "size");
g_object_notify (object, "size_points");
}
notify_set_changed (object, set_changed_mask);
g_object_thaw_notify (object);
}
static void
......@@ -706,7 +717,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");
g_object_notify (object, "text");
break;
case PROP_ATTRIBUTES:
......@@ -761,7 +772,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (G_OBJECT (celltext), "background_gdk");
g_object_notify (object, "background_gdk");
}
break;
......@@ -776,7 +787,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (G_OBJECT (celltext), "foreground_gdk");
g_object_notify (object, "foreground_gdk");
}
break;
......@@ -800,16 +811,8 @@ 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);
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
}
......@@ -817,119 +820,94 @@ gtk_cell_renderer_text_set_property (GObject *object,
case PROP_FONT_DESC:
set_font_description (celltext, g_value_get_boxed (value));
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_FAMILY:
if (celltext->font.family_name)
g_free (celltext->font.family_name);
celltext->font.family_name = g_strdup (g_value_get_string (value));
celltext->family_set = TRUE;
g_object_notify (G_OBJECT (celltext), "family_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_STYLE:
celltext->font.style = g_value_get_enum (value);
celltext->style_set = TRUE;
g_object_notify (G_OBJECT (celltext), "style_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_VARIANT:
celltext->font.variant = g_value_get_enum (value);
celltext->variant_set = TRUE;
g_object_notify (G_OBJECT (celltext), "variant_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_WEIGHT:
celltext->font.weight = g_value_get_int (value);
celltext->weight_set = TRUE;
g_object_notify (G_OBJECT (celltext), "weight_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_STRETCH:
celltext->font.stretch = g_value_get_enum (value);
celltext->stretch_set = TRUE;
g_object_notify (G_OBJECT (celltext), "stretch_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_SIZE:
celltext->font.size = g_value_get_int (value);
celltext->size_set = TRUE;
g_object_notify (G_OBJECT (celltext), "size_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_SIZE_POINTS:
{
PangoFontMask old_set_mask = pango_font_description_get_set_fields (celltext->font);
switch (param_id)
{
case PROP_FAMILY:
pango_font_description_set_family (celltext->font,
g_value_get_string (value));
break;
case PROP_STYLE:
pango_font_description_set_style (celltext->font,
g_value_get_enum (value));
break;
case PROP_VARIANT:
pango_font_description_set_variant (celltext->font,
g_value_get_enum (value));
break;
case PROP_WEIGHT:
pango_font_description_set_weight (celltext->font,
g_value_get_enum (value));
break;
case PROP_STRETCH:
pango_font_description_set_stretch (celltext->font,
g_value_get_enum (value));
break;
case PROP_SIZE:
pango_font_description_set_size (celltext->font,
g_value_get_int (value));
g_object_notify (object, "size_points");
break;
case PROP_SIZE_POINTS:
pango_font_description_set_size (celltext->font,
g_value_get_double (value) * PANGO_SCALE);
g_object_notify (object, "size");
break;
}
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
notify_set_changed (object, old_set_mask & pango_font_description_get_set_fields (celltext->font));
g_object_notify (object, "font_desc");
g_object_notify (object, "font");
}
case PROP_SCALE:
celltext->font_scale = g_value_get_double (value);
celltext->scale_set = TRUE;
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
g_object_notify (object, "scale_set");
break;
case PROP_SIZE_POINTS:
celltext->font.size = g_value_get_double (value) * PANGO_SCALE;
celltext->size_set = TRUE;
g_object_notify (G_OBJECT (celltext), "size_set");
g_object_notify (G_OBJECT (celltext), "font_desc");
g_object_notify (G_OBJECT (celltext), "font");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
case PROP_EDITABLE:
celltext->editable = g_value_get_boolean (value);
celltext->editable_set = TRUE;
g_object_notify (G_OBJECT (celltext), "editable_set");
g_object_notify (object, "editable_set");
break;
case PROP_STRIKETHROUGH:
celltext->strikethrough = g_value_get_boolean (value);
celltext->strikethrough_set = TRUE;
g_object_notify (G_OBJECT (celltext), "strikethrough_set");
g_object_notify (object, "strikethrough_set");
break;
case PROP_UNDERLINE:
celltext->underline_style = g_value_get_enum (value);
celltext->underline_set = TRUE;
g_object_notify (G_OBJECT (celltext), "underline_set");
g_object_notify (object, "underline_set");
break;
case PROP_RISE:
celltext->rise = g_value_get_int (value);
celltext->rise_set = TRUE;
g_object_notify (G_OBJECT (celltext), "rise_set");
g_object_notify (object, "rise_set");
if (celltext->fixed_height_rows != -1)
celltext->calc_fixed_height = TRUE;
break;
......@@ -943,27 +921,14 @@ gtk_cell_renderer_text_set_property (GObject *object,
break;
case PROP_FAMILY_SET:
celltext->family_set = g_value_get_boolean (value);
break;
case PROP_STYLE_SET:
celltext->style_set = g_value_get_boolean (value);
break;
case PROP_VARIANT_SET:
celltext->variant_set = g_value_get_boolean (value);