[Commits] [SCM] claws branch, master, updated. 3.9.2-90-ga02f436
colin at claws-mail.org
colin at claws-mail.org
Sun Sep 29 11:05:12 CEST 2013
The branch master of project "claws" (Claws Mail) has been updated
via a02f4367c140d6c08a34ae966ef4326ba979f3a0 (commit)
from de0d6d263e40307d18966c4fc46460f6bfbef5be (commit)
- Log -----------------------------------------------------------------
commit a02f4367c140d6c08a34ae966ef4326ba979f3a0
Author: Colin Leroy <colin at colino.net>
Date: Sun Sep 29 11:04:43 2013 +0200
Understand webcals:// as https://.
diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c
index d4a3b4f..cacb552 100644
--- a/src/plugins/vcalendar/vcal_folder.c
+++ b/src/plugins/vcalendar/vcal_folder.c
@@ -1910,14 +1910,12 @@ static void subscribe_cal_cb(GtkAction *action, gpointer data)
if (tmp == NULL)
return;
- if (!strncmp(tmp, "http://", 7)) {
+ if (!strncmp(tmp, "http", 4)) {
uri = tmp;
} else if (!strncmp(tmp, "file://", 7)) {
uri = tmp;
- } else if (!strncmp(tmp, "https://", 8)) {
- uri = tmp;
- } else if (!strncmp(tmp, "webcal://", 9)) {
- uri = g_strconcat("http://", tmp+9, NULL);
+ } else if (!strncmp(tmp, "webcal", 6)) {
+ uri = g_strconcat("http", tmp+6, NULL);
g_free(tmp);
} else {
alertpanel_error(_("Could not parse the URL."));
@@ -1991,8 +1989,8 @@ gboolean vcal_subscribe_uri(Folder *folder, const gchar *uri)
if (uri == NULL)
return FALSE;
- if (!strncmp(uri, "webcal://", 9)) {
- tmp = g_strconcat("http://", uri+9, NULL);
+ if (!strncmp(uri, "webcal", 6)) {
+ tmp = g_strconcat("http", uri+6, NULL);
} else {
return FALSE;
}
diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
index 4fd3ef5..c2d1419 100644
--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
+++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
@@ -1126,12 +1126,13 @@ static gboolean check_attendees_availability(VCalMeeting *meet, gboolean tell_if
if (strncmp(tmp, "http://", 7)
&& strncmp(tmp, "https://", 8)
&& strncmp(tmp, "webcal://", 9)
+ && strncmp(tmp, "webcals://", 10)
&& strncmp(tmp, "ftp://", 6))
contents = file_read_to_str(tmp);
else {
gchar *label = g_strdup_printf(_("Fetching planning for %s..."), email);
- if (!strncmp(tmp, "webcal://", 9)) {
- gchar *tmp2 = g_strdup_printf("http://%s", tmp+9);
+ if (!strncmp(tmp, "webcal", 6)) {
+ gchar *tmp2 = g_strdup_printf("http%s", tmp+6);
g_free(tmp);
tmp = tmp2;
}
@@ -2122,6 +2123,7 @@ putfile:
&& strncmp(file, "http://", 7)
&& strncmp(file, "https://", 8)
&& strncmp(file, "webcal://", 9)
+ && strncmp(file, "webcals://", 10)
&& strncmp(file, "ftp://", 6)) {
gchar *afile = NULL;
if (file[0] != G_DIR_SEPARATOR)
@@ -2138,8 +2140,8 @@ putfile:
g_free(file);
} else if (file) {
FILE *fp = g_fopen(tmpfile, "rb");
- if (!strncmp(file, "webcal://", 9)) {
- gchar *tmp = g_strdup_printf("http://%s", file+9);
+ if (!strncmp(file, "webcal", 6)) {
+ gchar *tmp = g_strdup_printf("http%s", file+6);
g_free(file);
file = tmp;
}
@@ -2269,6 +2271,7 @@ gboolean vcal_meeting_export_freebusy(const gchar *path, const gchar *user,
&& strncmp(file, "http://", 7)
&& strncmp(file, "https://", 8)
&& strncmp(file, "webcal://", 9)
+ && strncmp(file, "webcals://", 10)
&& strncmp(file, "ftp://", 6)) {
gchar *afile = NULL;
if (file[0] != G_DIR_SEPARATOR)
@@ -2285,8 +2288,8 @@ gboolean vcal_meeting_export_freebusy(const gchar *path, const gchar *user,
g_free(file);
} else if (file) {
FILE *fp = g_fopen(tmpfile, "rb");
- if (!strncmp(file, "webcal://", 9)) {
- gchar *tmp = g_strdup_printf("http://%s", file+9);
+ if (!strncmp(file, "webcal", 6)) {
+ gchar *tmp = g_strdup_printf("http%s", file+6);
g_free(file);
file = tmp;
}
diff --git a/src/plugins/vcalendar/vcal_prefs.c b/src/plugins/vcalendar/vcal_prefs.c
index fc07408..936c820 100644
--- a/src/plugins/vcalendar/vcal_prefs.c
+++ b/src/plugins/vcalendar/vcal_prefs.c
@@ -130,7 +130,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
!strncmp(export_path, "ftp://", 6) ||
!strncmp(export_path, "https://", 8) ||
!strncmp(export_path, "sftp://", 5) ||
- !strncmp(export_path, "webcal://", 9))) {
+ !strncmp(export_path, "webcal://", 9) ||
+ !strncmp(export_path, "webcals://", 10))) {
gtk_widget_set_sensitive(page->export_user_label, TRUE);
gtk_widget_set_sensitive(page->export_user_entry, TRUE);
gtk_widget_set_sensitive(page->export_pass_label, TRUE);
@@ -146,7 +147,8 @@ static void set_auth_sensitivity(struct VcalendarPage *page)
!strncmp(export_freebusy_path, "ftp://", 6) ||
!strncmp(export_freebusy_path, "https://", 8) ||
!strncmp(export_freebusy_path, "sftp://", 5) ||
- !strncmp(export_freebusy_path, "webcal://", 9))) {
+ !strncmp(export_freebusy_path, "webcal://", 9) ||
+ !strncmp(export_freebusy_path, "webcals://", 10))) {
gtk_widget_set_sensitive(page->export_freebusy_user_label, TRUE);
gtk_widget_set_sensitive(page->export_freebusy_user_entry, TRUE);
gtk_widget_set_sensitive(page->export_freebusy_pass_label, TRUE);
-----------------------------------------------------------------------
Summary of changes:
src/plugins/vcalendar/vcal_folder.c | 12 +++++-------
src/plugins/vcalendar/vcal_meeting_gtk.c | 15 +++++++++------
src/plugins/vcalendar/vcal_prefs.c | 6 ++++--
3 files changed, 18 insertions(+), 15 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list