[gnome-software: 3/4] gs-license-tile: Use CONTRIBUTE link for getting involved
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 3/4] gs-license-tile: Use CONTRIBUTE link for getting involved
- Date: Wed, 27 Apr 2022 10:39:21 +0000 (UTC)
commit 1c2c631a667a3849e0c9419628dc391feaa112d1
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Mar 31 10:45:08 2022 +0100
gs-license-tile: Use CONTRIBUTE link for getting involved
Prefer the new `CONTRIBUTE` link over `HOMEPAGE` when opening a page to
show the user how to get involved in developing an app.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Fixes: #1702
src/gs-details-page.c | 10 +++++++++-
src/gs-license-tile.c | 5 +++++
2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index dd1591087..2d74ce463 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -488,7 +488,15 @@ static void
gs_details_page_license_tile_get_involved_activated_cb (GsLicenseTile *license_tile,
GsDetailsPage *self)
{
- gs_shell_show_uri (self->shell, gs_app_get_url (self->app, AS_URL_KIND_HOMEPAGE));
+ const gchar *uri = NULL;
+
+#if AS_CHECK_VERSION(0, 15, 3)
+ uri = gs_app_get_url (self->app, AS_URL_KIND_CONTRIBUTE);
+#endif
+ if (uri == NULL)
+ uri = gs_app_get_url (self->app, AS_URL_KIND_HOMEPAGE);
+
+ gs_shell_show_uri (self->shell, uri);
}
static void
diff --git a/src/gs-license-tile.c b/src/gs-license-tile.c
index 0ced8fe64..a5fb8e994 100644
--- a/src/gs-license-tile.c
+++ b/src/gs-license-tile.c
@@ -95,7 +95,12 @@ gs_license_tile_refresh (GsLicenseTile *self)
lozenge_icon_names[0] = "heart-filled-symbolic";
lozenge_icon_names[1] = "community-symbolic";
lozenge_icon_names[2] = "sign-language-symbolic";
+#if AS_CHECK_VERSION(0, 15, 3)
+ get_involved_visible = (gs_app_get_url (self->app, AS_URL_KIND_HOMEPAGE) != NULL ||
+ gs_app_get_url (self->app, AS_URL_KIND_CONTRIBUTE) != NULL);
+#else
get_involved_visible = (gs_app_get_url (self->app, AS_URL_KIND_HOMEPAGE) != NULL);
+#endif
/* Translators: The placeholder here is the name of a software license. */
description = g_strdup_printf (_("This software is developed in the open by a community of
volunteers, and released under the %s license."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]