aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-canvas-background.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-13 06:54:29 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-14 03:17:42 +0800
commita6d296b998729abc78e634844cc4a3aeda7d0327 (patch)
tree136c24bd250a288f8152cd563969f3954adc75be /widgets/misc/e-canvas-background.c
parent4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6 (diff)
downloadgsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.gz
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.tar.zst
gsoc2013-evolution-a6d296b998729abc78e634844cc4a3aeda7d0327.zip
Baby steps toward GSEAL compliance.
Diffstat (limited to 'widgets/misc/e-canvas-background.c')
-rw-r--r--widgets/misc/e-canvas-background.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 898fe0628a..f9879c2614 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -337,11 +337,14 @@ static void
ecb_realize (GnomeCanvasItem *item)
{
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
+ GdkWindow *bin_window;
if (GNOME_CANVAS_ITEM_CLASS (ecb_parent_class)->realize)
GNOME_CANVAS_ITEM_CLASS (ecb_parent_class)->realize (item);
- ecb->priv->gc = gdk_gc_new (item->canvas->layout.bin_window);
+ bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (item->canvas));
+
+ ecb->priv->gc = gdk_gc_new (bin_window);
get_color (ecb);
if (!item->canvas->aa)
gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
@@ -430,11 +433,13 @@ ecb_style_set (ECanvasBackground *ecb,
GtkStyle *previous_style)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb);
+ GtkStyle *style;
+
+ style = gtk_widget_get_style (GTK_WIDGET (item->canvas));
if (GTK_WIDGET_REALIZED (item->canvas)) {
gdk_gc_set_foreground (
- ecb->priv->gc, &GTK_WIDGET(item->canvas)->
- style->base[GTK_STATE_NORMAL]);
+ ecb->priv->gc, &style->base[GTK_STATE_NORMAL]);
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
}
}