[gnome-software/1754-improve-the-sources-dropdown: 2/10] flatpak: Use GS_APP_QUIRK_DEVELOPMENT_SOURCE
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1754-improve-the-sources-dropdown: 2/10] flatpak: Use GS_APP_QUIRK_DEVELOPMENT_SOURCE
- Date: Thu, 4 Aug 2022 14:55:39 +0000 (UTC)
commit 53fba34f6ea97ecd0a620c144df2126297be5523
Author: Milan Crha <mcrha redhat com>
Date: Wed Aug 3 15:52:22 2022 +0200
flatpak: Use GS_APP_QUIRK_DEVELOPMENT_SOURCE
Set the quirk on an app when its origin or its branch matches some
heuristic values.
plugins/flatpak/gs-flatpak.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 6f1a391be..83784a9fa 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -167,6 +167,12 @@ gs_flatpak_set_app_origin (GsFlatpak *self,
}
}
+ if (g_strcmp0 (origin, "flathub-beta") == 0 ||
+ g_strcmp0 (gs_app_get_branch (app), "devel") == 0 ||
+ g_strcmp0 (gs_app_get_branch (app), "master") == 0 ||
+ (gs_app_get_branch (app) && g_str_has_suffix (gs_app_get_branch (app), "beta")))
+ gs_app_add_quirk (app, GS_APP_QUIRK_DEVELOPMENT_SOURCE);
+
gs_app_set_origin (app, origin);
gs_app_set_origin_ui (app, title);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]