[gnome-software/wip/show-metainfo-load-icons] gs-details-page: Load icons for --show-metainfo app




commit ea1722022d385340d84290e23f143ec856b36884
Author: Milan Crha <mcrha redhat com>
Date:   Tue Aug 9 16:06:01 2022 +0200

    gs-details-page: Load icons for --show-metainfo app
    
    Loading remote icons for the --show-metainfo app, when no special
    icon is specified on the command line, allows to get closer experience
    for the shown app.

 src/gs-details-page.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index e59b602db..ae48c21ec 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -2754,6 +2754,15 @@ gs_details_page_metainfo_thread (GTask *task,
                g_autoptr(GIcon) icon = g_file_icon_new (icon_file);
                gs_icon_set_width (icon, (guint) -1);
                gs_app_add_icon (app, G_ICON (icon));
+       } else {
+               g_autoptr(SoupSession) soup_session = NULL;
+               guint maximum_icon_size;
+
+               /* Currently a 160px icon is needed for #GsFeatureTile, at most. */
+               maximum_icon_size = 160 * 2;
+
+               soup_session = gs_build_soup_session ();
+               gs_app_ensure_icons_downloaded (app, soup_session, maximum_icon_size, cancellable);
        }
 
        gs_app_set_state (app, GS_APP_STATE_UNKNOWN);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]