[gnome-software/gnome-3-30] Remove broken/questionable shell mode change code



commit 234fbee25872e07bff490a45636c7cef38a9bba9
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 77e606fd..2d790b57 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2135,19 +2135,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]