diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-06-15 09:38:53 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-15 09:38:53 +0800 |
commit | a55021bcef7eb082b48e56aac361bd35a3a77b64 (patch) | |
tree | 9bcf1c1bbf522c87beac5d199b258f8aa24c7d7e /libgnomecanvas/gnome-canvas-rich-text.c | |
parent | ead63f16b2269325c1e4080b3dce8818bbafe189 (diff) | |
download | gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.gz gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.zst gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.zip |
Revert "Fix all remaining GTK3 issues."
This reverts commit fd8b55edaa88906b588aa07d9eadcacd34a7a774.
Something in this commit seriously hosed ETable, making Evolution pretty
much unusable. Reverting this until I can track down the problem.
Diffstat (limited to 'libgnomecanvas/gnome-canvas-rich-text.c')
-rw-r--r-- | libgnomecanvas/gnome-canvas-rich-text.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c index db0e52fde1..2a50f2ed4d 100644 --- a/libgnomecanvas/gnome-canvas-rich-text.c +++ b/libgnomecanvas/gnome-canvas-rich-text.c @@ -1522,14 +1522,8 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event) return gnome_canvas_rich_text_button_release_event( item, (GdkEventButton *) event); case GDK_FOCUS_CHANGE: - { - GtkLayout *layout; - GdkWindow *bin_window; - - layout = GTK_LAYOUT (item->canvas); - bin_window = gtk_layout_get_bin_window (layout); - - if (((GdkEventFocus *) event)->window != bin_window) + if (((GdkEventFocus *) event)->window != + item->canvas->layout.bin_window) return FALSE; if (((GdkEventFocus *) event)->in) @@ -1538,7 +1532,6 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event) else return gnome_canvas_rich_text_focus_out_event( item, (GdkEventFocus *) event); - } default: return FALSE; } @@ -1712,13 +1705,8 @@ scale_fonts(GtkTextTag *tag, gpointer data) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data); - /* XXX GtkTextTag::values is sealed with apparently no way - * to access it. This looks like a small optimization - * anyway. */ -#if 0 if (!tag->values) return; -#endif g_object_set( G_OBJECT(tag), "scale", @@ -1931,7 +1919,7 @@ gnome_canvas_rich_text_ensure_layout(GnomeCanvasRichText *text) style = gtk_text_attributes_new(); gnome_canvas_rich_text_set_attributes_from_style( - text, style, gtk_widget_get_style (canvas)); + text, style, canvas->style); style->pixels_above_lines = text->_priv->pixels_above_lines; style->pixels_below_lines = text->_priv->pixels_below_lines; @@ -2132,8 +2120,6 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) { GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item); - GtkStyle *style; - GtkWidget *widget; double i2w[6], w2c[6], i2c[6]; double ax, ay; int x1, y1, x2, y2; @@ -2159,16 +2145,13 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable, y2 = c2.y; gtk_text_layout_set_screen_width(text->_priv->layout, x2 - x1); - - widget = GTK_WIDGET (item->canvas); - style = gtk_widget_get_style (widget); - + /* FIXME: should last arg be NULL? */ gtk_text_layout_draw( text->_priv->layout, - widget, + GTK_WIDGET(item->canvas), drawable, - style->text_gc[GTK_STATE_NORMAL], + GTK_WIDGET (item->canvas)->style->text_gc[GTK_STATE_NORMAL], x - x1, y - y1, 0, 0, (x2 - x1) - (x - x1), (y2 - y1) - (y - y1), NULL); |