Ticket #1959: 0008-Fix-traceback-when-the-resize-callback-is-called-and.patch

File 0008-Fix-traceback-when-the-resize-callback-is-called-and.patch, 1.1 KB (added by manuq, 11 years ago)
  • clock.py

    From 9ac1396d11daef79fb7505edba06fb4ac347bb7f Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Fri, 15 Feb 2013 10:30:33 -0300
    Subject: [PATCH 8/8] Fix traceback when the resize callback is called and no
     gdk window is yet set - SL #1959
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     clock.py | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/clock.py b/clock.py
    index dad46ae..e49b7c3 100755
    a b class ClockFace(gtk.DrawingArea): 
    607607        the parameters which are important for our rendering (center
    608608        of the clock, radius).
    609609        """
     610        # This callback can be called when the gdk window is not yet
     611        # set
     612        if self.window is None:
     613            return
     614
    610615        # Store the measures of the clock face widget
    611616        self._center_x = int(allocation.width / 2.0)
    612617        self._center_y = int(allocation.height / 2.0)