[gnome-software] Start monitoring the network when the UI is initialized



commit 362ff80ff53aaecf3f042d881d9ad7c28d01c832
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Thu Nov 17 17:08:31 2016 +0100

    Start monitoring the network when the UI is initialized
    
    Otherwise, depending on the action with which GNOME Software is
    activated, it may not monitor the network which means it will assume
    that it is always offline.

 src/gs-application.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 9e7c4ae..5892856 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -280,6 +280,9 @@ gs_application_initialize_ui (GsApplication *app)
 
        gs_shell_setup (app->shell, app->plugin_loader, app->cancellable);
        gtk_application_add_window (GTK_APPLICATION (app), gs_shell_get_window (app->shell));
+
+       /* monitor the network as the many UI operations need the network */
+       gs_application_monitor_network (app);
 }
 
 static void
@@ -590,7 +593,6 @@ filename_activated (GSimpleAction *action,
        const gchar *filename;
 
        gs_application_initialize_ui (app);
-       gs_application_monitor_network (GS_APPLICATION (app));
 
        g_variant_get (parameter, "(&s)", &filename);
        gs_shell_show_filename (app->shell, filename);
@@ -743,7 +745,6 @@ gs_application_activate (GApplication *application)
        GsApplication *app = GS_APPLICATION (application);
 
        gs_application_initialize_ui (GS_APPLICATION (application));
-       gs_application_monitor_network (GS_APPLICATION (application));
 
        /* start metadata loading screen */
        if (gs_shell_get_mode (app->shell) == GS_SHELL_MODE_UNKNOWN) {


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