diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-14 01:50:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-16 02:46:02 +0800 |
commit | c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede (patch) | |
tree | 6af964bb15322661d28181dc00310e3afe618f46 /libgnomecanvas/gnome-canvas-text.c | |
parent | 333897772f2cf3251915800aff2c836f02095c84 (diff) | |
download | gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.tar.gz gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.tar.zst gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.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.
This commit didn't work the first time because gnome-pilot libraries
were still pulling in the system-wide libgnomecanvas, and that was
interfereing with our bundled version which has a different ABI.
But gnome-pilot integration was dropped in the previous commit, so
everything is now using the bundled libgnomecanvas.
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 */ |