[gnome-software/wip/mcrha/empty-overview-page] gs-shell: Overview page opens empty with "Automatic Updates" off
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/empty-overview-page] gs-shell: Overview page opens empty with "Automatic Updates" off
- Date: Thu, 15 Apr 2021 07:59:06 +0000 (UTC)
commit 80fc7459b3f7ac1516903e9ae0e8daef6f31d433
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 15 09:55:44 2021 +0200
gs-shell: Overview page opens empty with "Automatic Updates" off
When the "Automatic Updates" are off, the shell window switches to
the overview page immediately. Since some recent change the preselected
page is the Overview page, thus the switch to it doesn't call reload(),
thus it is left empty. To adapt to the new behavior call reload() also
when the Overview page had been already selected. It's okay, because
it's only after the initial start.
src/gs-shell.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 380ddf7af..369786952 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -778,14 +778,17 @@ static void
initial_refresh_done (GsLoadingPage *loading_page, gpointer data)
{
GsShell *shell = data;
+ gboolean been_overview;
g_signal_handlers_disconnect_by_func (loading_page, initial_refresh_done, data);
+ been_overview = gs_shell_get_mode (shell) == GS_SHELL_MODE_OVERVIEW;
+
g_signal_emit (shell, signals[SIGNAL_LOADED], 0);
/* if the "loaded" signal handler didn't change the mode, kick off async
* overview page refresh, and switch to the page once done */
- if (gs_shell_get_mode (shell) == GS_SHELL_MODE_LOADING) {
+ if (gs_shell_get_mode (shell) == GS_SHELL_MODE_LOADING || been_overview) {
g_signal_connect (shell->pages[GS_SHELL_MODE_OVERVIEW], "refreshed",
G_CALLBACK (overview_page_refresh_done), shell);
gs_page_reload (GS_PAGE (shell->pages[GS_SHELL_MODE_OVERVIEW]));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]