[gnome-software: 3/7] flatpak: Fix titles for added remotes




commit 24496c437be0e18686d4bfff089a0175a4fe5737
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Oct 19 12:10:47 2021 +0100

    flatpak: Fix titles for added remotes
    
    When adding a remote using a flatpakrepo file, use the `GsApp.title` to
    set the remote’s title, rather than the `GsApp.summary`.
    
    This is in line with the rest of the flatpakref/flatpakrepo code in
    gnome-software.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1507

 plugins/flatpak/gs-flatpak.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 0cdc48add..7b5583125 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1557,14 +1557,17 @@ gs_flatpak_create_new_remote (GsFlatpak *self,
 {
        const gchar *gpg_key;
        const gchar *branch;
+       const gchar *title;
        g_autoptr(FlatpakRemote) xremote = NULL;
 
        /* create a new remote */
        xremote = flatpak_remote_new (gs_app_get_id (app));
        flatpak_remote_set_url (xremote, gs_flatpak_app_get_repo_url (app));
        flatpak_remote_set_noenumerate (xremote, FALSE);
-       if (gs_app_get_summary (app) != NULL)
-               flatpak_remote_set_title (xremote, gs_app_get_summary (app));
+
+       title = gs_app_get_name (app);
+       if (title != NULL)
+               flatpak_remote_set_title (xremote, title);
 
        /* decode GPG key if set */
        gpg_key = gs_flatpak_app_get_repo_gpgkey (app);


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