[gnome-software: 4/18] gs-odrs-provider: Use GNetworkMonitor directly




commit 47274bc5e644932c2389e19254a4e32233218b87
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue May 18 14:12:24 2021 +0100

    gs-odrs-provider: Use GNetworkMonitor directly
    
    Rather than indirectly through a `GsPlugin`. The behaviour is identical.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/gs-odrs-provider.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/gs-odrs-provider.c b/lib/gs-odrs-provider.c
index 907795a58..53c60ee20 100644
--- a/lib/gs-odrs-provider.c
+++ b/lib/gs-odrs-provider.c
@@ -323,7 +323,7 @@ gs_odrs_provider_parse_reviews (GsOdrsProvider  *self,
 
        /* nothing */
        if (data == NULL) {
-               if (!gs_plugin_get_network_available (plugin))
+               if (!g_network_monitor_get_network_available (g_network_monitor_get_default ()))
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
                                             GS_PLUGIN_ERROR_NO_NETWORK,
@@ -414,7 +414,7 @@ gs_odrs_provider_parse_success (GsPlugin *plugin, const gchar *data, gssize data
 
        /* nothing */
        if (data == NULL) {
-               if (!gs_plugin_get_network_available (plugin))
+               if (!g_network_monitor_get_network_available (g_network_monitor_get_default ()))
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
                                             GS_PLUGIN_ERROR_NO_NETWORK,


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