[Commits] [SCM] claws branch, master, updated. 3.18.0-145-g3bf1a2983
wwp at claws-mail.org
wwp at claws-mail.org
Fri Sep 17 16:56:11 CEST 2021
The branch, master has been updated
via 3bf1a29835ea753597ccab93919a41a2f195422a (commit)
from c9be0c35f12d8aa9f335f15b8848b1fd835ffb5a (commit)
Summary of changes:
src/common/utils.c | 13 +++++++++++++
src/compose.c | 3 +++
src/messageview.c | 4 ++++
src/plugins/vcalendar/vcal_meeting_gtk.c | 6 ++++--
src/plugins/vcalendar/vcal_prefs.c | 6 ++++--
src/textview.c | 6 ++++++
6 files changed, 34 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 3bf1a29835ea753597ccab93919a41a2f195422a
Author: wwp <subscript at free.fr>
Date: Fri Sep 17 16:55:12 2021 +0200
Fix few wrong string lengths when matching URI schemes, add more known
schemes.
diff --git a/src/common/utils.c b/src/common/utils.c
index 14eca4707..66abb39bf 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1334,6 +1334,11 @@ gboolean is_uri_string(const gchar *str)
return (g_ascii_strncasecmp(str, "http://", 7) == 0 ||
g_ascii_strncasecmp(str, "https://", 8) == 0 ||
g_ascii_strncasecmp(str, "ftp://", 6) == 0 ||
+ g_ascii_strncasecmp(str, "ftps://", 7) == 0 ||
+ g_ascii_strncasecmp(str, "sftp://", 7) == 0 ||
+ g_ascii_strncasecmp(str, "ftp.", 4) == 0 ||
+ g_ascii_strncasecmp(str, "webcal://", 9) == 0 ||
+ g_ascii_strncasecmp(str, "webcals://", 10) == 0 ||
g_ascii_strncasecmp(str, "www.", 4) == 0);
}
@@ -1347,6 +1352,14 @@ gchar *get_uri_path(const gchar *uri)
return (gchar *)(uri + 8);
else if (g_ascii_strncasecmp(uri, "ftp://", 6) == 0)
return (gchar *)(uri + 6);
+ else if (g_ascii_strncasecmp(uri, "ftps://", 7) == 0)
+ return (gchar *)(uri + 7);
+ else if (g_ascii_strncasecmp(uri, "sftp://", 7) == 0)
+ return (gchar *)(uri + 7);
+ else if (g_ascii_strncasecmp(uri, "webcal://", 9) == 0)
+ return (gchar *)(uri + 7);
+ else if (g_ascii_strncasecmp(uri, "webcals://", 10) == 0)
+ return (gchar *)(uri + 7);
else
return (gchar *)uri;
}
diff --git a/src/compose.c b/src/compose.c
index ee0f07219..5445828bc 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -4547,9 +4547,12 @@ static gboolean compose_beautify_paragraph(Compose *compose, GtkTextIter *par_it
{"http://", strcasestr, get_uri_part, make_uri_string},
{"https://", strcasestr, get_uri_part, make_uri_string},
{"ftp://", strcasestr, get_uri_part, make_uri_string},
+ {"ftps://", strcasestr, get_uri_part, make_uri_string},
{"sftp://", strcasestr, get_uri_part, make_uri_string},
{"gopher://",strcasestr, get_uri_part, make_uri_string},
{"www.", strcasestr, get_uri_part, make_http_string},
+ {"webcal://",strcasestr, get_uri_part, make_uri_string},
+ {"webcals://",strcasestr, get_uri_part, make_uri_string},
{"mailto:", strcasestr, get_uri_part, make_uri_string},
{"@", strcasestr, get_email_part, make_email_string}
};
diff --git a/src/messageview.c b/src/messageview.c
index 6c9482a49..a8a455733 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -3024,7 +3024,11 @@ void messageview_list_urls (MessageView *msgview)
if (uri->uri &&
(!g_ascii_strncasecmp(uri->uri, "ftp.", 4) ||
!g_ascii_strncasecmp(uri->uri, "ftp:", 4) ||
+ !g_ascii_strncasecmp(uri->uri, "ftps:", 5) ||
+ !g_ascii_strncasecmp(uri->uri, "sftp:", 5) ||
!g_ascii_strncasecmp(uri->uri, "www.", 4) ||
+ !g_ascii_strncasecmp(uri->uri, "webcal:", 7) ||
+ !g_ascii_strncasecmp(uri->uri, "webcals:", 8) ||
!g_ascii_strncasecmp(uri->uri, "http:", 5) ||
!g_ascii_strncasecmp(uri->uri, "https:", 6)))
{
diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
index c4b942d97..e3167755e 100644
--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
+++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2013 Colin Leroy <colin at colino.net> and
+ * Copyright (C) 1999-2021 Colin Leroy <colin at colino.net> and
* the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
@@ -1063,7 +1063,9 @@ static gboolean check_attendees_availability(VCalMeeting *meet, gboolean tell_if
&& strncmp(tmp, "https://", 8)
&& strncmp(tmp, "webcal://", 9)
&& strncmp(tmp, "webcals://", 10)
- && strncmp(tmp, "ftp://", 6))
+ && strncmp(tmp, "ftp://", 6)
+ && strncmp(tmp, "ftps://", 7)
+ && strncmp(tmp, "sftp://", 7))
contents = file_read_to_str(tmp);
else {
gchar *label = g_strdup_printf(_("Fetching planning for %s..."), email);
diff --git a/src/plugins/vcalendar/vcal_prefs.c b/src/plugins/vcalendar/vcal_prefs.c
index d40c94ac4..658b60ec5 100644
--- a/src/plugins/vcalendar/vcal_prefs.c
+++ b/src/plugins/vcalendar/vcal_prefs.c
@@ -140,7 +140,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
(!strncmp(export_path, "http://", 7) ||
!strncmp(export_path, "ftp://", 6) ||
!strncmp(export_path, "https://", 8) ||
- !strncmp(export_path, "sftp://", 5) ||
+ !strncmp(export_path, "ftps://", 7) ||
+ !strncmp(export_path, "sftp://", 7) ||
!strncmp(export_path, "webcal://", 9) ||
!strncmp(export_path, "webcals://", 10))) {
gtk_widget_set_sensitive(page->export_user_label, TRUE);
@@ -157,7 +158,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
(!strncmp(export_freebusy_path, "http://", 7) ||
!strncmp(export_freebusy_path, "ftp://", 6) ||
!strncmp(export_freebusy_path, "https://", 8) ||
- !strncmp(export_freebusy_path, "sftp://", 5) ||
+ !strncmp(export_freebusy_path, "ftps://", 7) ||
+ !strncmp(export_freebusy_path, "sftp://", 7) ||
!strncmp(export_freebusy_path, "webcal://", 9) ||
!strncmp(export_freebusy_path, "webcals://", 10))) {
gtk_widget_set_sensitive(page->export_freebusy_user_label, TRUE);
diff --git a/src/textview.c b/src/textview.c
index 9ede9e60e..c4fbf9e4a 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1368,9 +1368,12 @@ static void textview_make_clickable_parts(TextView *textview,
{"http://", strcasestr, get_uri_part, make_uri_string},
{"https://", strcasestr, get_uri_part, make_uri_string},
{"ftp://", strcasestr, get_uri_part, make_uri_string},
+ {"ftps://", strcasestr, get_uri_part, make_uri_string},
{"sftp://", strcasestr, get_uri_part, make_uri_string},
{"gopher://",strcasestr, get_uri_part, make_uri_string},
{"www.", strcasestr, get_uri_part, make_http_string},
+ {"webcal://",strcasestr, get_uri_part, make_uri_string},
+ {"webcals://",strcasestr, get_uri_part, make_uri_string},
{"mailto:", strcasestr, get_uri_part, make_uri_string},
{"@", strcasestr, get_email_part, make_email_string}
};
@@ -1492,9 +1495,12 @@ static void textview_make_clickable_parts_later(TextView *textview,
{"http://", strcasestr, get_uri_part, make_uri_string},
{"https://", strcasestr, get_uri_part, make_uri_string},
{"ftp://", strcasestr, get_uri_part, make_uri_string},
+ {"ftps://", strcasestr, get_uri_part, make_uri_string},
{"sftp://", strcasestr, get_uri_part, make_uri_string},
{"www.", strcasestr, get_uri_part, make_http_string},
{"mailto:", strcasestr, get_uri_part, make_uri_string},
+ {"webcal://",strcasestr, get_uri_part, make_uri_string},
+ {"webcals://",strcasestr, get_uri_part, make_uri_string},
{"@", strcasestr, get_email_part, make_email_string}
};
const gint PARSE_ELEMS = sizeof parser / sizeof parser[0];
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list