parent
75aabf570d
commit
97923e7530
@ -814,9 +814,12 @@ class ToolManagedWindowBase(ManagedWindow):
|
|||||||
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
||||||
int(event.x),
|
int(event.x),
|
||||||
int(event.y))
|
int(event.y))
|
||||||
iter = view.get_iter_at_location(*buffer_location)
|
_iter = view.get_iter_at_location(*buffer_location)
|
||||||
|
if isinstance(_iter, tuple): # Gtk changed api in recent versions
|
||||||
|
_iter = _iter[1]
|
||||||
|
|
||||||
for (tag, person_handle) in self.tags:
|
for (tag, person_handle) in self.tags:
|
||||||
if iter.has_tag(tag):
|
if _iter.has_tag(tag):
|
||||||
_window = view.get_window(Gtk.TextWindowType.TEXT)
|
_window = view.get_window(Gtk.TextWindowType.TEXT)
|
||||||
_window.set_cursor(self.link_cursor)
|
_window.set_cursor(self.link_cursor)
|
||||||
return False # handle event further, if necessary
|
return False # handle event further, if necessary
|
||||||
@ -827,9 +830,11 @@ class ToolManagedWindowBase(ManagedWindow):
|
|||||||
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
buffer_location = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT,
|
||||||
int(event.x),
|
int(event.x),
|
||||||
int(event.y))
|
int(event.y))
|
||||||
iter = view.get_iter_at_location(*buffer_location)
|
_iter = view.get_iter_at_location(*buffer_location)
|
||||||
|
if isinstance(_iter, tuple): # Gtk changed api in recent versions
|
||||||
|
_iter = _iter[1]
|
||||||
for (tag, person_handle) in self.tags:
|
for (tag, person_handle) in self.tags:
|
||||||
if iter.has_tag(tag):
|
if _iter.has_tag(tag):
|
||||||
person = self.db.get_person_from_handle(person_handle)
|
person = self.db.get_person_from_handle(person_handle)
|
||||||
if event.button == 1:
|
if event.button == 1:
|
||||||
if event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS:
|
if event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user