From 76da9331a43e78c40a2710877c01dccd8bcab5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Mon, 1 Oct 2012 12:29:29 -0300 Subject: [PATCH] Alert: use GtkStyleContext instead of deprecated GtkStyle - SL #3907 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using the deprecated GtkStyle is giving an error [1] in the sugar alert. [1] http://bugs.sugarlabs.org/ticket/3907#comment:3 Signed-off-by: Manuel QuiƱones Acked-by: Simon Schampijer --- src/sugar3/graphics/alert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py index 16392cd0..5a9e2ef7 100644 --- a/src/sugar3/graphics/alert.py +++ b/src/sugar3/graphics/alert.py @@ -369,8 +369,8 @@ class _TimeoutIcon(Gtk.Alignment): y = h * 0.5 radius = w / 2 context.arc(x, y, radius, 0, 2 * math.pi) - widget_style = self.get_style() - color = widget_style.bg[self.get_state()] + widget_style = self.get_style_context() + color = widget_style.get_background_color(self.get_state()) context.set_source_rgb(color.red, color.green, color.blue) context.fill_preserve()