[gnome-software: 6/9] Try to install the apps that are queued after adding them
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 6/9] Try to install the apps that are queued after adding them
- Date: Mon, 18 Jul 2022 08:42:39 +0000 (UTC)
commit 47e258f06c27535f75783e9f979ddf3354510b62
Author: Joaquim Rocha <jrocha endlessm com>
Date: Fri Feb 16 13:16:27 2018 +0100
Try to install the apps that are queued after adding them
After adding the apps that are queued (for installation) to the
installed page, nothing was calling their actual installation. So this
patch does exactly that, provided there's available and unmetered
network.
(Rebased from downstream Endless OS by Philip Withnall)
src/gs-installed-page.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 97f4744c1..1ac6a3f59 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -707,6 +707,13 @@ gs_installed_page_pending_apps_refined_cb (GObject *source,
if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE)
gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL &&
+ gs_plugin_loader_get_network_available (plugin_loader) &&
+ !gs_plugin_loader_get_network_metered (plugin_loader))
+ gs_page_install_app (GS_PAGE (self), app,
+ GS_SHELL_INTERACTION_FULL,
+ gs_app_get_cancellable (app));
+
++pending_apps_count;
if (!gs_installed_page_has_app (self, app))
gs_installed_page_add_app (self, list, app);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]