[gnome-software/1876-gnome-software-missing-an-install-upgrade-button-when-opening-an-rpm-file: 52/53] gs-origin-popover-row: Use local file as source if 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: 52/53] gs-origin-popover-row: Use local file as source if set
- Date: Fri, 2 Sep 2022 06:05:38 +0000 (UTC)
commit d9b601c0c2dfcddd8a42e57484df7fa46e071d67
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 25 12:36:27 2022 +0200
gs-origin-popover-row: Use local file as source if set
The local file can be installed, in which case the state is not enough
to know the GsApp:local-file is usable, thus have the GsApp:local-file
property as another indication that the source is from a file.
src/gs-origin-popover-row.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-origin-popover-row.c b/src/gs-origin-popover-row.c
index 27f76ea12..adfb539d7 100644
--- a/src/gs-origin-popover-row.c
+++ b/src/gs-origin-popover-row.c
@@ -49,7 +49,8 @@ refresh_ui (GsOriginPopoverRow *row)
if (origin_ui != NULL)
gtk_label_set_text (GTK_LABEL (priv->name_label), origin_ui);
- if (gs_app_get_state (priv->app) == GS_APP_STATE_AVAILABLE_LOCAL) {
+ if (gs_app_get_state (priv->app) == GS_APP_STATE_AVAILABLE_LOCAL ||
+ gs_app_get_local_file (priv->app) != NULL) {
GFile *local_file = gs_app_get_local_file (priv->app);
url = g_file_get_basename (local_file);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]