[gnome-software/wip/hughsie/search-launchable: 15/16] Show the overview if the user cannot go back to an existing state



commit 2d3390be8d1a06a1dff32dc1774472190e623070
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jul 16 18:14:19 2019 +0100

    Show the overview if the user cannot go back to an existing state

 src/gs-shell.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 70bcc373..631c8938 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -459,7 +459,12 @@ gs_shell_go_back (GsShell *shell)
        BackEntry *entry;
        GtkWidget *widget;
 
-       g_return_if_fail (!g_queue_is_empty (priv->back_entry_stack));
+       /* nothing to do */
+       if (g_queue_is_empty (priv->back_entry_stack)) {
+               g_debug ("no back stack, showing overview");
+               gs_shell_change_mode (shell, GS_SHELL_MODE_OVERVIEW, NULL, FALSE);
+               return;
+       }
 
        entry = g_queue_pop_head (priv->back_entry_stack);
 


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