Ticket #4251: 0001-Alert-fix-for-traceback-in-the-draw-SL-4251.patch

File 0001-Alert-fix-for-traceback-in-the-draw-SL-4251.patch, 1.3 KB (added by manuq, 8 years ago)

Patch.

  • src/sugar3/graphics/alert.py

    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): 
    370370        radius = w / 2
    371371        context.arc(x, y, radius, 0, 2 * math.pi)
    372372        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())
    374374        context.set_source_rgb(color.red, color.green, color.blue)
    375375        context.fill_preserve()
    376376