[gnome-calendar] source-dialog: fixed URI label in dialog
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] source-dialog: fixed URI label in dialog
- Date: Tue, 28 Nov 2017 20:11:18 +0000 (UTC)
commit fff12ced31158f14d6896a5c6bed8dc1c8d85bbe
Author: Günther Wutz <info gunibert de>
Date: Thu Nov 23 19:42:42 2017 +0100
source-dialog: fixed URI label in dialog
Show new the correct URI scheme and port for calendar location in
source dialog. We had a hard coded URI label and always showed https
even when the calendar source used http, and no port. So the showed
label was most of the time wrong.
Related to #41
src/gcal-source-dialog.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 1783cc5..68206ee 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -919,17 +919,20 @@ stack_visible_child_name_changed (GObject *object,
{
ESourceAuthentication *auth;
ESourceWebdav *webdav;
- gchar *uri;
+ g_autoptr (SoupURI) soup;
+ g_autofree gchar *uri;
auth = e_source_get_extension (self->source, E_SOURCE_EXTENSION_AUTHENTICATION);
webdav = e_source_get_extension (self->source, E_SOURCE_EXTENSION_WEBDAV_BACKEND);
- uri = g_strdup_printf ("https://%s%s", e_source_authentication_get_host (auth),
- e_source_webdav_get_resource_path (webdav));
+ soup = e_source_webdav_dup_soup_uri (webdav);
+ uri = g_strdup_printf ("%s://%s%s:%d",
+ soup_uri_get_scheme (soup),
+ e_source_authentication_get_host (auth),
+ e_source_webdav_get_resource_path (webdav),
+ e_source_authentication_get_port (auth));
gtk_link_button_set_uri (GTK_LINK_BUTTON (self->calendar_url_button), uri);
gtk_button_set_label (GTK_BUTTON (self->calendar_url_button), uri);
-
- g_free (uri);
}
if (is_goa)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]