[gnome-software: 15/16] epiphany: Port from GsPluginJobListInstalledApps to GsPluginJobListApps




commit 10e8ab455d21952ef1fd503d6b2a1aac609473d9
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed May 18 16:46:29 2022 +0100

    epiphany: Port from GsPluginJobListInstalledApps to GsPluginJobListApps
    
    This will allow removing the former, and simplifying code.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 plugins/epiphany/gs-self-test.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/epiphany/gs-self-test.c b/plugins/epiphany/gs-self-test.c
index 8f8f3c9fc..650384846 100644
--- a/plugins/epiphany/gs-self-test.c
+++ b/plugins/epiphany/gs-self-test.c
@@ -144,6 +144,7 @@ create_fake_desktop_file (const char *app_id)
 static void
 gs_plugins_epiphany_installed_func (GsPluginLoader *plugin_loader)
 {
+       g_autoptr(GsAppQuery) query = NULL;
        g_autoptr(GsPluginJob) plugin_job = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GIcon) icon = NULL;
@@ -159,9 +160,11 @@ gs_plugins_epiphany_installed_func (GsPluginLoader *plugin_loader)
        app_id_desktop = g_strdup_printf ("%s.desktop", app_id);
        desktop_path = create_fake_desktop_file (app_id);
 
-       plugin_job = gs_plugin_job_list_installed_apps_new (GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN,
-                                                           0, GS_PLUGIN_JOB_DEDUPE_FLAGS_DEFAULT,
-                                                           GS_PLUGIN_LIST_INSTALLED_APPS_FLAGS_NONE);
+       query = gs_app_query_new ("is-installed", GS_APP_QUERY_TRISTATE_TRUE,
+                                 "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN,
+                                 "dedupe-flags", GS_PLUGIN_JOB_DEDUPE_FLAGS_DEFAULT,
+                                 NULL);
+       plugin_job = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_NONE);
        list = gs_plugin_loader_job_process (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);


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