[gtk+] GtkAboutDialog: Support https in links



commit 992af6c4fe886992658438ff9217c569cf0aae9f
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Aug 29 00:51:39 2014 -0400

    GtkAboutDialog: Support https in links
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680067

 gtk/gtkaboutdialog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index b76742e..5729d46 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -2081,6 +2081,9 @@ text_buffer_new (GtkAboutDialog  *about,
           q1 = strchr (q0, '<');
           q2 = q1 ? strchr (q1, '>') : NULL;
           r1 = strstr (q0, "http://";);
+          r2 = strstr (q0, "https://";);
+          if (!r1 || (r1 && r2 && r2 < r1))
+            r1 = r2;
           if (r1)
             {
               r2 = strpbrk (r1, " \n\t>");
@@ -2206,6 +2209,9 @@ add_credits_section (GtkAboutDialog *about,
           q1 = strchr (q0, '<');
           q2 = q1 ? strchr (q1, '>') : NULL;
           r1 = strstr (q0, "http://";);
+          r2 = strstr (q0, "https://";);
+          if (!r1 || (r1 && r2 && r2 < r1))
+            r1 = r2;
           if (r1)
             {
               r2 = strpbrk (r1, " \n\t");


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