[gnome-software: 2/4] gs-app: Notify app sizes when its runtime is changed
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 2/4] gs-app: Notify app sizes when its runtime is changed
- Date: Mon, 16 May 2022 18:12:19 +0000 (UTC)
commit 87dcadda3837fa7fcdd05b0da4901346bcf7fbb4
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon May 16 15:29:39 2022 +0100
gs-app: Notify app sizes when its runtime is changed
As the size of the runtime will affect the size of the app when
calculated to include dependencies.
Spotted by Phaedrus Leeds; see !1351.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
lib/gs-app.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 573d1a822..ca6b6a3db 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -2223,6 +2223,10 @@ gs_app_set_runtime (GsApp *app, GsApp *runtime)
g_return_if_fail (app != runtime);
locker = g_mutex_locker_new (&priv->mutex);
g_set_object (&priv->runtime, runtime);
+
+ /* The runtime adds to the main app’s sizes. */
+ gs_app_queue_notify (app, obj_props[PROP_SIZE_DOWNLOAD_DEPENDENCIES_TYPE]);
+ gs_app_queue_notify (app, obj_props[PROP_SIZE_DOWNLOAD_DEPENDENCIES]);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]