[gnome-software/ramcq/loading: 5/8] Remove broken/questionable shell mode change code
- From: Robert McQueen <ramcq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/ramcq/loading: 5/8] Remove broken/questionable shell mode change code
- Date: Thu, 11 Oct 2018 11:12:20 +0000 (UTC)
commit 2eaa34ec9c91bbd4ad17e0228dcfde7236c9ab1b
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, 1 insertion(+), 12 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index b760338b..479ef8d3 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2164,18 +2164,7 @@ 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]