[accerciser] Restore textview.get_iter_at_location compatibility with earlier gtk
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] Restore textview.get_iter_at_location compatibility with earlier gtk
- Date: Mon, 10 Jun 2019 16:10:12 +0000 (UTC)
commit 8bd85a78ebf49ed2c2c4d3f6449a66ec9f9c1caf
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Mon Jun 10 18:09:42 2019 +0200
Restore textview.get_iter_at_location compatibility with earlier gtk
plugins/event_monitor.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/event_monitor.py b/plugins/event_monitor.py
index f6844ea..3865db0 100644
--- a/plugins/event_monitor.py
+++ b/plugins/event_monitor.py
@@ -423,7 +423,10 @@ class EventMonitor(ViewportPlugin):
'''
x, y = textview.window_to_buffer_coords(gtk.TextWindowType.WIDGET,
int(event.x), int(event.y))
- (isText, iter) = textview.get_iter_at_location(x, y)
+ isText = True
+ iter = textview.get_iter_at_location(x, y)
+ if isinstance(iter, tuple):
+ (isText, iter) = iter
cursor = gdk.Cursor(gdk.CursorType.XTERM)
if isText:
for tag in iter.get_tags():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]