diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-14 01:50:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-15 00:55:49 +0800 |
commit | fd8b55edaa88906b588aa07d9eadcacd34a7a774 (patch) | |
tree | 14fe95f503fefe738465ff4a734671afec0efb57 /libgnomecanvas/gnome-canvas-text.c | |
parent | e8a1662875e3e957d96d4f60cb8b5664ee4f74b3 (diff) | |
download | gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.gz gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.zst gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.zip |
Fix all remaining GTK3 issues.
Work around the issue of GnomeCanvasItem amending its own flags to
GtkObject::flags (which is sealed) by giving it its own flags field.
This breaks libgnomecanvas ABI and API, but I see no other way.
Diffstat (limited to 'libgnomecanvas/gnome-canvas-text.c')
-rw-r--r-- | libgnomecanvas/gnome-canvas-text.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c index 81cc357e41..c7e58aef0d 100644 --- a/libgnomecanvas/gnome-canvas-text.c +++ b/libgnomecanvas/gnome-canvas-text.c @@ -1307,9 +1307,13 @@ gnome_canvas_text_get_property (GObject *object, static void gnome_canvas_text_apply_font_desc (GnomeCanvasText *text) { - PangoFontDescription *font_desc = - pango_font_description_copy ( - GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas)->style->font_desc); + PangoFontDescription *font_desc; + GtkWidget *widget; + GtkStyle *style; + + widget = GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas); + style = gtk_widget_get_style (widget); + font_desc = pango_font_description_copy (style->font_desc); if (text->font_desc) pango_font_description_merge (font_desc, text->font_desc, TRUE); @@ -1423,6 +1427,8 @@ gnome_canvas_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_pa static void gnome_canvas_text_realize (GnomeCanvasItem *item) { + GtkLayout *layout; + GdkWindow *bin_window; GnomeCanvasText *text; text = GNOME_CANVAS_TEXT (item); @@ -1430,7 +1436,10 @@ gnome_canvas_text_realize (GnomeCanvasItem *item) if (parent_class->realize) (* parent_class->realize) (item); - text->gc = gdk_gc_new (item->canvas->layout.bin_window); + layout = GTK_LAYOUT (item->canvas); + bin_window = gtk_layout_get_bin_window (layout); + + text->gc = gdk_gc_new (bin_window); } /* Unrealize handler for the text item */ |