[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-205-g6c1835695

wwp at claws-mail.org wwp at claws-mail.org
Fri Sep 17 16:57:26 CEST 2021


The branch, gtk3 has been updated
       via  6c1835695df1c63a1eef1666c4f60349b3212eb9 (commit)
      from  cd666398a71e1173abd4fdbafc142855cf41e02a (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 6c1835695df1c63a1eef1666c4f60349b3212eb9
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 f75057bef..6c8294ef6 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -4532,9 +4532,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 ecc5a639e..409f5a526 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -3023,7 +3023,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 fa4ed2dac..cbac831cb 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-2019 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
@@ -1077,7 +1077,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 24acd309d..437e942f5 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 4bc94acb5..40a9716d7 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1347,9 +1347,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}
 	};
@@ -1471,9 +1474,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