From d3137bd35c443ab875e6fb5bfb03807a44e8d1c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Tue, 20 Nov 2012 15:46:33 -0300
Subject: [PATCH toolkit] Alert: fix for traceback in the draw - SL #4251
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
The Gtk.StyleContext get_background_color method needs a
Gtk.StateFlags as a parameter. Feeding it with a GtkStateType doesn't
work anymore in recent gtk+.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
src/sugar3/graphics/alert.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sugar3/graphics/alert.py b/src/sugar3/graphics/alert.py
index 5a9e2ef..6d00924 100644
a
|
b
|
class _TimeoutIcon(Gtk.Alignment): |
370 | 370 | radius = w / 2 |
371 | 371 | context.arc(x, y, radius, 0, 2 * math.pi) |
372 | 372 | widget_style = self.get_style_context() |
373 | | color = widget_style.get_background_color(self.get_state()) |
| 373 | color = widget_style.get_background_color(self.get_state_flags()) |
374 | 374 | context.set_source_rgb(color.red, color.green, color.blue) |
375 | 375 | context.fill_preserve() |
376 | 376 | |