Ticket #1959: 0005-Change-mouse-cursor-to-a-hand-when-grabbing-the-hand.2.patch

File 0005-Change-mouse-cursor-to-a-hand-when-grabbing-the-hand.2.patch, 1.3 KB (added by manuq, 11 years ago)
  • clock.py

    From e4293bf331f0b81bdc53f5c2f88004b2c6e84013 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Fri, 15 Feb 2013 01:34:20 -0300
    Subject: [PATCH 5/6] Change mouse cursor to a hand when grabbing the hands of
     the clock - 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 | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/clock.py b/clock.py
    index 5bbb90a..4bf0ab6 100755
    a b font_desc="Sans Bold 40">%d</span></markup>') % (i + 1) 
    962962                                           self._motion_cb)
    963963            self._release_id = self.connect("button-release-event",
    964964                                        self._release_cb)
     965
     966            # Put hand cursor
     967            self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND2))
     968
    965969        else:
    966970            self.disconnect(self._press_id)
    967971            self.disconnect(self._motion_id)
    968972            self.disconnect(self._release_id)
    969973
     974            # Put original cursor again
     975            self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
     976
    970977            # Update again the clock every seconds.
    971978            gobject.timeout_add(1000, self._update_cb)
    972979