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
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
141e631f22
commit
fff12ced31
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user