diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-02-09 03:34:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-02-09 03:34:11 +0800 |
commit | d328ab72d554fe60c892ddc8c278340c027b51dc (patch) | |
tree | f8513f9a30b036d3ff3c3c65be8d9f842ab1f81b /widgets/table/e-table-field-chooser-item.c | |
parent | 9be6776a1c431142621c5838182fd967febd880e (diff) | |
download | gsoc2013-evolution-d328ab72d554fe60c892ddc8c278340c027b51dc.tar.gz gsoc2013-evolution-d328ab72d554fe60c892ddc8c278340c027b51dc.tar.zst gsoc2013-evolution-d328ab72d554fe60c892ddc8c278340c027b51dc.zip |
** Fixes bug #357216
2006-02-08 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #357216
* widgets/text/e-entry.c: Remove "font", "fontset", and "gdk_font"
properties, since they forward gets and sets to non-existant
properties in entry->item.
* widgets/table/e-table-field-chooser-item.c:
* widgets/table/e-table-field-chooser-item.h:
* widgets/table/e-table-group-container.c:
* widgets/table/e-table-group-container.h:
Replace deprecated GdkFont with PangoFontDescription.
* widgets/table/e-table-header-item.c:
* widgets/table/e-table-header-item.h:
Replace deprecated GdkFont with PangoFontDescription.
Rename "fontset" property to "font-desc", and change the property
type to a boxed PangoFontDescription.
svn path=/trunk/; revision=33185
Diffstat (limited to 'widgets/table/e-table-field-chooser-item.c')
-rw-r--r-- | widgets/table/e-table-field-chooser-item.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 0d72dc7ad8..6742483fd6 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -84,9 +84,9 @@ etfci_dispose (GObject *object) g_object_unref (etfci->combined_header); etfci->combined_header = NULL; - if (etfci->font) - gdk_font_unref(etfci->font); - etfci->font = NULL; + if (etfci->font_desc) + pango_font_description_free (etfci->font_desc); + etfci->font_desc = NULL; if (G_OBJECT_CLASS (etfci_parent_class)->dispose) (*G_OBJECT_CLASS (etfci_parent_class)->dispose) (object); @@ -219,11 +219,13 @@ etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flag static void etfci_font_load (ETableFieldChooserItem *etfci) { - if (etfci->font) - gdk_font_unref (etfci->font); + GtkStyle *style; + + if (etfci->font_desc) + pango_font_description_free (etfci->font_desc); - etfci->font = gtk_style_get_font (GTK_WIDGET(GNOME_CANVAS_ITEM(etfci)->canvas)->style); - gdk_font_ref(etfci->font); + style = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas)->style; + etfci->font_desc = pango_font_description_copy (style->font_desc); } static void @@ -419,7 +421,7 @@ etfci_realize (GnomeCanvasItem *item) if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)-> realize) (*GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->realize)(item); - if (!etfci->font) + if (!etfci->font_desc) etfci_font_load (etfci); etfci->drag_end_id = g_signal_connect ( @@ -436,9 +438,9 @@ etfci_unrealize (GnomeCanvasItem *item) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); - if (etfci->font) - gdk_font_unref (etfci->font); - etfci->font = NULL; + if (etfci->font_desc) + pango_font_description_free (etfci->font_desc); + etfci->font_desc = NULL; g_signal_handler_disconnect (item->canvas, etfci->drag_end_id); etfci->drag_end_id = 0; @@ -677,7 +679,7 @@ etfci_init (GnomeCanvasItem *item) etfci->height = etfci->width = 0; - etfci->font = NULL; + etfci->font_desc = NULL; etfci->full_header_structure_change_id = 0; etfci->full_header_dimension_change_id = 0; |