[gnome-software/1876-gnome-software-missing-an-install-upgrade-button-when-opening-an-rpm-file: 49/53] gs-app: Use 'Local file' origin string also when local-file is set
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1876-gnome-software-missing-an-install-upgrade-button-when-opening-an-rpm-file: 49/53] gs-app: Use 'Local file' origin string also when local-file is set
- Date: Fri, 2 Sep 2022 06:05:38 +0000 (UTC)
commit 42606cef59eb25e440d48b2cbf445eb1c93f78ae
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 25 12:30:59 2022 +0200
gs-app: Use 'Local file' origin string also when local-file is set
The local file can be installed, in which case its correct status is 'installed',
but that would return incorrect origin, thus use the 'Local file' also
in these cases.
lib/gs-app.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index d157ffb71..d4b3f912a 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -6170,7 +6170,8 @@ gs_app_dup_origin_ui (GsApp *app,
if (origin_str == NULL || origin_str[0] == '\0') {
/* use "Local file" rather than the filename for local files */
- if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL)
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL ||
+ gs_app_get_local_file (app) != NULL)
origin_str = _("Local file");
else if (g_strcmp0 (gs_app_get_origin (app), "flathub") == 0)
origin_str = "Flathub";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]