[gtk+/gtk-3-8] GtkAboutDialog: Fix a corner case of link highlighting
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] GtkAboutDialog: Fix a corner case of link highlighting
- Date: Fri, 15 Nov 2013 22:06:21 +0000 (UTC)
commit cf962321e8ddb243543c22b4981c09d47cc8f6c8
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 15 14:42:34 2013 -0500
GtkAboutDialog: Fix a corner case of link highlighting
GtkAboutDialog highlights emails written as <...> and
urls written as http://... . gnome-terminal manages to
put <http://...> into its license text, which sadly
confuses the parser into running evolution on http://...
Fix things up far enough that <http://...> is now
recognized as url, and only the part inside the <> is
underlined (for email addresses, we include the <> in
the underline).
gtk/gtkaboutdialog.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index f50fed0..ef88ed6 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -2160,14 +2160,14 @@ text_view_new (GtkAboutDialog *about,
r1 = strstr (q0, "http://");
if (r1)
{
- r2 = strpbrk (r1, " \n\t");
+ r2 = strpbrk (r1, " \n\t>");
if (!r2)
r2 = strchr (r1, '\0');
}
else
r2 = NULL;
- if (r1 && r2 && (!q1 || !q2 || (r1 < q1)))
+ if (r1 && r2 && (!q1 || !q2 || (r1 <= q1 + 1)))
{
q1 = r1;
q2 = r2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]