From 9dc8f2f2e38b10d0101749c9b56e22fa14c576bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Mon, 1 Oct 2012 12:29:29 -0300
Subject: [PATCH toolkit-gtk3] Alert: use GtkStyleContext instead of
deprecated GtkStyle - SL #3907
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
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 <manuq@laptop.org>
---
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 16392cd..5a9e2ef 100644
a
|
b
|
class _TimeoutIcon(Gtk.Alignment): |
369 | 369 | y = h * 0.5 |
370 | 370 | radius = w / 2 |
371 | 371 | context.arc(x, y, radius, 0, 2 * math.pi) |
372 | | widget_style = self.get_style() |
373 | | color = widget_style.bg[self.get_state()] |
| 372 | widget_style = self.get_style_context() |
| 373 | color = widget_style.get_background_color(self.get_state()) |
374 | 374 | context.set_source_rgb(color.red, color.green, color.blue) |
375 | 375 | context.fill_preserve() |
376 | 376 | |