[gnome-software: 6/8] gs-plugin-loader: Remove GNOME_SOFTWARE_FEATURED environment variable




commit c343685da88d27a1282ac74508151cfcc4fa458b
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon May 23 14:15:13 2022 +0100

    gs-plugin-loader: Remove GNOME_SOFTWARE_FEATURED environment variable
    
    It’s not been used for testing for a while. To test an app featured
    banner, run gnome-software with `--show-metainfo=./path/to/metainfo.xml`
    as documented in `doc/app-developers.md`.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 lib/gs-plugin-loader.c | 17 ++---------------
 src/gs-overview-page.c |  6 ++----
 2 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 669cdb260..4ccca4659 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1088,15 +1088,6 @@ gs_plugin_loader_get_app_is_compatible (GsApp    *app,
 
 /******************************************************************************/
 
-static gboolean
-gs_plugin_loader_featured_debug (GsApp *app, gpointer user_data)
-{
-       if (g_strcmp0 (gs_app_get_id (app),
-           g_getenv ("GNOME_SOFTWARE_FEATURED")) == 0)
-               return TRUE;
-       return FALSE;
-}
-
 static gint
 gs_plugin_loader_app_sort_match_value_cb (GsApp *app1, GsApp *app2, gpointer user_data)
 {
@@ -3573,12 +3564,8 @@ gs_plugin_loader_process_thread_cb (GTask *task,
                gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
                break;
        case GS_PLUGIN_ACTION_GET_FEATURED:
-               if (g_getenv ("GNOME_SOFTWARE_FEATURED") != NULL) {
-                       gs_app_list_filter (list, gs_plugin_loader_featured_debug, NULL);
-               } else {
-                       gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
-                       gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
-               }
+               gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
+               gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
                break;
        case GS_PLUGIN_ACTION_GET_UPDATES:
                gs_app_list_filter (list, gs_plugin_loader_app_is_valid_updatable, helper);
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 8a5cfe142..e2274f044 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -291,10 +291,8 @@ gs_overview_page_get_featured_cb (GObject *source_object,
                goto out;
        }
 
-       if (g_getenv ("GNOME_SOFTWARE_FEATURED") == NULL) {
-               gs_app_list_filter_duplicates (list, GS_APP_LIST_FILTER_FLAG_KEY_ID);
-               gs_app_list_randomize (list);
-       }
+       gs_app_list_filter_duplicates (list, GS_APP_LIST_FILTER_FLAG_KEY_ID);
+       gs_app_list_randomize (list);
 
        /* Filter out apps which don’t have a suitable hi-res icon. */
        gs_app_list_filter (list, filter_hi_res_icon, self);


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