diff options
author | Harish Krishnaswamy <kharish@novell.com> | 2006-01-02 14:52:05 +0800 |
---|---|---|
committer | Harish Krishnaswamy <kharish@src.gnome.org> | 2006-01-02 14:52:05 +0800 |
commit | 4c3bf71eda48c333a7b025acbf6156244c946e40 (patch) | |
tree | ffc02fda71b0fd17f331d20ad4af0c2262d2b851 /widgets | |
parent | 06a16e8c658f0194462b6e6297cc3a0cf0d68b15 (diff) | |
download | gsoc2013-evolution-4c3bf71eda48c333a7b025acbf6156244c946e40.tar.gz gsoc2013-evolution-4c3bf71eda48c333a7b025acbf6156244c946e40.tar.zst gsoc2013-evolution-4c3bf71eda48c333a7b025acbf6156244c946e40.zip |
Set the foreground only if the widget has already been realized. Fixes
2006-01-02 Harish Krishnaswamy <kharish@novell.com>
* e-canvas-background.c: (ecb_style_set): Set the
foreground only if the widget has already been realized.
Fixes #309618.
svn path=/trunk/; revision=31016
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 8 | ||||
-rw-r--r-- | widgets/misc/e-canvas-background.c | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 2f44eb6c3d..4a87dcdedf 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,11 @@ +2006-01-02 Harish Krishnaswamy <kharish@novell.com> + + reviewed by: Srinivasa Ragavan <sragavan@novell.com> + + * e-canvas-background.c: (ecb_style_set): Set the + foreground only if the widget has already been realized. + Fixes #309618. + 2005-12-21 Srinivasa Ragavan <sragavan@novell.com> ** Fixes bug #324590 diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index d224ab6cd9..b3582cecbb 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -427,8 +427,11 @@ static void ecb_style_set (ECanvasBackground *ecb, GtkStyle *previous_style) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb); - gdk_gc_set_foreground (ecb->priv->gc, >K_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]); - gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); + + if (GTK_WIDGET_REALIZED (item->canvas)) { + gdk_gc_set_foreground (ecb->priv->gc, >K_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); + } } static void |