[gedit/gnome-3-20] external tools: Fix link click bug due to GTK API change



commit 9c71f854d2e3c7d68dbf9105644becae0bdb653a
Author: Adam Dingle <adam medovina org>
Date:   Tue Nov 15 10:54:54 2016 -0800

    external tools: Fix link click bug due to GTK API change
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768793

 configure.ac                               |    2 +-
 plugins/externaltools/tools/outputpanel.py |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index aacac6c..8f9be02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ AC_SUBST(GEDIT_API_VERSION)
 
 # Dependencies
 GLIB_REQUIRED=2.44
-GTK_REQUIRED=3.19.0
+GTK_REQUIRED=3.19.9
 GTKSOURCEVIEW_REQUIRED=3.19.4
 LIBPEAS_REQUIRED=1.14.1
 LIBXML_REQUIRED=2.5.0
diff --git a/plugins/externaltools/tools/outputpanel.py b/plugins/externaltools/tools/outputpanel.py
index af842d1..d451f29 100644
--- a/plugins/externaltools/tools/outputpanel.py
+++ b/plugins/externaltools/tools/outputpanel.py
@@ -209,7 +209,9 @@ class OutputPanel(UniqueById):
 
         # get the offset within the buffer from the x,y coordinates
         buff_x, buff_y = view.window_to_buffer_coords(Gtk.TextWindowType.TEXT, x, y)
-        iter_at_xy = view.get_iter_at_location(buff_x, buff_y)
+        (over_text, iter_at_xy) = view.get_iter_at_location(buff_x, buff_y)
+        if not over_text:
+            return None
         offset = iter_at_xy.get_offset()
 
         # find the first link that contains the offset


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]