diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-11-10 00:58:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-26 21:49:12 +0800 |
commit | 310069df2f60e2b2d290d972d231f9021de0e37e (patch) | |
tree | f5a7c9cbdf256d442e6669e5e46bd3c4e5a99ddd /widgets/table/e-cell-popup.c | |
parent | b4e2a4b0dc885549f5869102dfe9bf714097ee98 (diff) | |
download | gsoc2013-evolution-310069df2f60e2b2d290d972d231f9021de0e37e.tar.gz gsoc2013-evolution-310069df2f60e2b2d290d972d231f9021de0e37e.tar.zst gsoc2013-evolution-310069df2f60e2b2d290d972d231f9021de0e37e.zip |
Adapt ECell classes to latest gtk+-3.0 API.
Diffstat (limited to 'widgets/table/e-cell-popup.c')
-rw-r--r-- | widgets/table/e-cell-popup.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c index dfc9526885..abfe61e206 100644 --- a/widgets/table/e-cell-popup.c +++ b/widgets/table/e-cell-popup.c @@ -54,7 +54,7 @@ static void ecp_kill_view (ECellView *ecv); static void ecp_realize (ECellView *ecv); static void ecp_unrealize (ECellView *ecv); static void ecp_draw (ECellView *ecv, - GdkDrawable *drawable, + cairo_t *cr, gint model_col, gint view_col, gint row, @@ -245,7 +245,7 @@ ecp_unrealize (ECellView *ecv) * ECell::draw method */ static void -ecp_draw (ECellView *ecv, GdkDrawable *drawable, +ecp_draw (ECellView *ecv, cairo_t *cr, gint model_col, gint view_col, gint row, ECellFlags flags, gint x1, gint y1, gint x2, gint y2) { @@ -256,6 +256,8 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable, GdkRectangle rect; gboolean show_popup_arrow; + cairo_save (cr); + canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ecv->e_table_item_view)->canvas); /* Display the popup arrow if we are the cursor cell, or the popup @@ -274,7 +276,7 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable, if (show_popup_arrow) { GtkStyle *style; - e_cell_draw (ecp_view->child_view, drawable, model_col, + e_cell_draw (ecp_view->child_view, cr, model_col, view_col, row, flags, x1, y1, x2 - E_CELL_POPUP_ARROW_WIDTH, y2); @@ -290,22 +292,24 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable, style = gtk_widget_get_style (canvas); - gtk_paint_box (style, drawable, + gtk_paint_box (style, cr, GTK_STATE_NORMAL, shadow, - &rect, canvas, "ecellpopup", + canvas, "ecellpopup", rect.x, rect.y, rect.width, rect.height); - gtk_paint_arrow (style, drawable, + gtk_paint_arrow (style, cr, GTK_STATE_NORMAL, GTK_SHADOW_NONE, - &rect, canvas, NULL, + canvas, NULL, GTK_ARROW_DOWN, TRUE, rect.x + E_CELL_POPUP_ARROW_XPAD, rect.y + E_CELL_POPUP_ARROW_YPAD, rect.width - E_CELL_POPUP_ARROW_XPAD * 2, rect.height - E_CELL_POPUP_ARROW_YPAD * 2); } else { - e_cell_draw (ecp_view->child_view, drawable, model_col, + e_cell_draw (ecp_view->child_view, cr, model_col, view_col, row, flags, x1, y1, x2, y2); } + + cairo_restore (cr); } /* |