diff options
author | Denis Fomin <fominde@gmail.com> | 2013-11-23 11:20:29 +0400 |
---|---|---|
committer | Denis Fomin <fominde@gmail.com> | 2013-11-23 11:20:29 +0400 |
commit | 9e39f8d01fe9dba5e5f76a2187abfcd06dd1d05b (patch) | |
tree | 92aaba2eefff749644f894cf1a072bdc113a337e | |
parent | 6b35ad79e57188dd07a4d6e533425f48b9d65c3d (diff) |
Change cursor on location icon. Fixes #7570
-rw-r--r-- | src/chat_control.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/chat_control.py b/src/chat_control.py index b19c3a013..b21cb7aa5 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1630,6 +1630,12 @@ class ChatControl(ChatControlBase): id_ = widget.connect('button-release-event', self.on_location_eventbox_button_release_event) self.handlers[id_] = widget + id_ = widget.connect('enter-notify-event', + self.on_location_eventbox_enter_notify_event) + self.handlers[id_] = widget + id_ = widget.connect('leave-notify-event', + self.on_location_eventbox_leave_notify_event) + self.handlers[id_] = widget for key in ('1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'): widget = self.xml.get_object(key + '_button') @@ -2064,6 +2070,17 @@ class ChatControl(ChatControlBase): 'lon': location['lon']} helpers.launch_browser_mailer('url', uri) + def on_location_eventbox_leave_notify_event(self, widget, event): + """ + Just moved the mouse so show the cursor + """ + cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR) + self.parent_win.window.window.set_cursor(cursor) + + def on_location_eventbox_enter_notify_event(self, widget, event): + cursor = gtk.gdk.Cursor(gtk.gdk.HAND2) + self.parent_win.window.window.set_cursor(cursor) + def _on_window_motion_notify(self, widget, event): """ It gets called no matter if it is the active window or not |