[gnome-software/1453-flathub-repo-misleadingly-considered-present-on-fedora-35-with-filtered-flathub] gs-page: Use correct action when install/remove repo app
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1453-flathub-repo-misleadingly-considered-present-on-fedora-35-with-filtered-flathub] gs-page: Use correct action when install/remove repo app
- Date: Tue, 21 Sep 2021 12:09:02 +0000 (UTC)
commit 03ea59cc8db6bec34d56205d62ec495315e9ea96
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 21 13:55:57 2021 +0200
gs-page: Use correct action when install/remove repo app
Since the split of the install/remove action for apps and repos
the GsPage should use correct action too. This can happen for example
when installing a .flatpakrepo file.
src/gs-page.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index ca1fbfc70..dfaadbc39 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -280,7 +280,10 @@ gs_page_install_app (GsPage *page,
}
helper = g_slice_new0 (GsPageHelper);
- helper->action = GS_PLUGIN_ACTION_INSTALL;
+ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
+ helper->action = GS_PLUGIN_ACTION_INSTALL_REPO;
+ else
+ helper->action = GS_PLUGIN_ACTION_INSTALL;
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
@@ -466,7 +469,10 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
/* pending install */
helper = g_slice_new0 (GsPageHelper);
- helper->action = GS_PLUGIN_ACTION_REMOVE;
+ if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
+ helper->action = GS_PLUGIN_ACTION_REMOVE_REPO;
+ else
+ helper->action = GS_PLUGIN_ACTION_REMOVE;
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = cancellable != NULL ? g_object_ref (cancellable) : NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]