From 78c5da1abc9f97019d5ca6a72aec669f9c5d80c1 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 3 Nov 2007 18:43:00 -0400 Subject: [PATCH] Hack the Play button to have the right cursor --- lib/replay.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/replay.py b/lib/replay.py index d6b4025..f8f43b4 100644 --- a/lib/replay.py +++ b/lib/replay.py @@ -14,6 +14,7 @@ class PlayResult(CustomResult): widget.connect('clicked', self.play) widget.connect('button_press_event', self.on_button_press) + widget.connect('realize', self.on_realize) return widget @@ -74,6 +75,16 @@ class PlayResult(CustomResult): return True return False + + def on_realize(self, button): + # Hack to get the right cursor over the button, since the button + # doesn't set a cursor itself. button.window is the text view's + # window, we have to search to find button.event_window, since + # its not bound + for c in button.window.get_children(): + if c.get_user_data() == button: + cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR) + c.set_cursor(cursor) def play(data): if data.dtype != float32 and data.dtype != float64: -- 2.11.4.GIT