[gnome-software/ramcq/loading: 1/4] Remove broken/questionable shell mode change code



commit c330dc0feb4da35602a80e19c68ac285bc772d31
Author: Robert McQueen <rob endlessm com>
Date:   Wed Oct 10 15:46:46 2018 +0100

    Remove broken/questionable shell mode change code
    
    The intention of this code is to finish the loading state early in the
    case that the mode is set to something other than the overview. However,
    it is broken because it was never updated after the loading page and
    loading state was separated out from the overview, so was checking for the
    callback on the wrong object.
    
    GsApplication relies on the "loaded" signal to defer any actions which
    need the initial refresh to have completed, so if this code actually did
    work, it would just undermine this logic anyway. The "loaded" signal
    will now only be emitted once the initial refresh has actually been
    finished (regardless of mode).

 src/gs-shell.c | 13 -------------
 1 file changed, 13 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index b760338b..977417e6 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2163,19 +2163,6 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
 void
 gs_shell_set_mode (GsShell *shell, GsShellMode mode)
 {
-       GsShellPrivate *priv = gs_shell_get_instance_private (shell);
-       guint matched;
-
-       /* if we're loading a different mode at startup then don't wait for
-        * the overview page to load before showing content */
-       if (mode != GS_SHELL_MODE_OVERVIEW) {
-               GsPage *page = g_hash_table_lookup (priv->pages, "overview");
-               matched = g_signal_handlers_disconnect_by_func (page,
-                                                               initial_overview_load_done,
-                                                               shell);
-               if (matched > 0)
-                       g_signal_emit (shell, signals[SIGNAL_LOADED], 0);
-       }
        gs_shell_change_mode (shell, mode, NULL, TRUE);
 }
 


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