From: Colin Leroy Date: Thu, 25 Oct 2012 10:19:38 +0000 (+0000) Subject: 2012-10-25 [colin] 3.8.1cvs107 X-Git-Tag: REL_3_9_0~17 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=53672318a17b844495d628f4ef33fc7ff09f3315 2012-10-25 [colin] 3.8.1cvs107 * src/textview.c Verify the previous URI wasn't the same... fixes http://www. URIs. --- diff --git a/ChangeLog b/ChangeLog index 298ce3432..62b24117a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-10-25 [colin] 3.8.1cvs107 + + * src/textview.c + Verify the previous URI wasn't the same... + fixes http://www. URIs. + 2012-10-25 [colin] 3.8.1cvs106 * src/common/utils.c diff --git a/PATCHSETS b/PATCHSETS index 9b34efd37..5b1874ae7 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -4481,3 +4481,4 @@ ( cvs diff -u -r 1.100.2.85 -r 1.100.2.86 AUTHORS; cvs diff -u -r 1.96.2.249 -r 1.96.2.250 src/textview.c; cvs diff -u -r 1.12.2.35 -r 1.12.2.36 src/textview.h; cvs diff -u -r 1.1.2.81 -r 1.1.2.82 src/gtk/authors.h; ) > 3.8.1cvs104.patchset ( cvs diff -u -r 1.96.2.250 -r 1.96.2.251 src/textview.c; ) > 3.8.1cvs105.patchset ( cvs diff -u -r 1.36.2.207 -r 1.36.2.208 src/common/utils.c; cvs diff -u -r 1.20.2.82 -r 1.20.2.83 src/common/utils.h; cvs diff -u -r 1.96.2.251 -r 1.96.2.252 src/textview.c; ) > 3.8.1cvs106.patchset +( cvs diff -u -r 1.96.2.252 -r 1.96.2.253 src/textview.c; ) > 3.8.1cvs107.patchset diff --git a/configure.ac b/configure.ac index 60bbc1584..9e9bad43c 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=106 +EXTRA_VERSION=107 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/textview.c b/src/textview.c index 8dd88635a..b47a88138 100644 --- a/src/textview.c +++ b/src/textview.c @@ -1388,11 +1388,18 @@ static void textview_make_clickable_parts(TextView *textview, /* colorize this line */ if (head.next) { const gchar *normal_text = mybuf; + struct txtpos *previous = NULL; /* insert URIs */ for (last = head.next; last != NULL; normal_text = last->ep, last = last->next) { ClickableText *uri; + + if (previous != NULL + && previous->bp < last->bp + && previous->ep == last->ep) + continue; + uri = g_new0(ClickableText, 1); if (last->bp - normal_text > 0) gtk_text_buffer_insert_with_tags_by_name @@ -1410,6 +1417,7 @@ static void textview_make_clickable_parts(TextView *textview, uri->filename = NULL; textview->uri_list = g_slist_prepend(textview->uri_list, uri); + previous = last; } if (*normal_text) @@ -1501,12 +1509,19 @@ static void textview_make_clickable_parts_later(TextView *textview, /* colorize this line */ if (head.next) { + struct txtpos *previous = NULL; /* insert URIs */ for (last = head.next; last != NULL; last = last->next) { ClickableText *uri; gint start_offset, end_offset; gchar *tmp_str; gchar old_char; + + if (previous != NULL + && previous->bp < last->bp + && previous->ep == last->ep) + continue; + uri = g_new0(ClickableText, 1); uri->uri = parser[last->pti].build_uri(last->bp, last->ep); @@ -1533,6 +1548,7 @@ static void textview_make_clickable_parts_later(TextView *textview, uri->filename = NULL; textview->uri_list = g_slist_prepend(textview->uri_list, uri); + previous = last; } }