[gnome-software/1166-repository-dialog-design-updates] Replace GUri with SoupURI
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1166-repository-dialog-design-updates] Replace GUri with SoupURI
- Date: Mon, 28 Jun 2021 13:20:11 +0000 (UTC)
commit b5cd540b39d019b53be3d3eb6bb5bc442bbe73cb
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 28 15:17:07 2021 +0200
Replace GUri with SoupURI
src/gs-repo-row.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-repo-row.c b/src/gs-repo-row.c
index ce27f52f3..b534695f2 100644
--- a/src/gs-repo-row.c
+++ b/src/gs-repo-row.c
@@ -8,9 +8,10 @@
#include "config.h"
-#include "gs-repo-row.h"
-
#include <glib/gi18n.h>
+#include <libsoup/soup.h>
+
+#include "gs-repo-row.h"
typedef struct
{
@@ -192,11 +193,11 @@ gs_repo_row_set_repo (GsRepoRow *row, GsApp *repo)
tmp = gs_app_get_url (repo, AS_URL_KIND_HOMEPAGE);
if (tmp != NULL && *tmp != '\0') {
- g_autoptr(GUri) uri = NULL;
+ g_autoptr(SoupURI) uri = NULL;
- uri = g_uri_parse (tmp, G_URI_FLAGS_PARSE_RELAXED, NULL);
- if (uri && g_uri_get_host (uri) != NULL && *g_uri_get_host (uri) != '\0') {
- gtk_label_set_label (GTK_LABEL (priv->hostname_label), g_uri_get_host (uri));
+ uri = soup_uri_new (tmp);
+ if (uri && soup_uri_get_host (uri) != NULL && *soup_uri_get_host (uri) != '\0') {
+ gtk_label_set_label (GTK_LABEL (priv->hostname_label), soup_uri_get_host (uri));
gtk_widget_set_visible (priv->hostname_label, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]