From c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 13 Jan 2010 12:50:49 -0500 Subject: 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. --- libgnomecanvas/gnome-canvas-text.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'libgnomecanvas/gnome-canvas-text.c') 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 */ -- cgit v1.2.3