[gnome-software] Do not go 'back' to a previous application details panel
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not go 'back' to a previous application details panel
- Date: Thu, 19 Jul 2018 11:36:48 +0000 (UTC)
commit cbdbadf76f322aab560a5855a0f1e95517133d0e
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 19 12:35:57 2018 +0100
Do not go 'back' to a previous application details panel
Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/410
src/gs-shell.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 79fa674c..325df580 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -424,6 +424,12 @@ save_back_entry (GsShell *shell)
BackEntry *entry;
GsPage *page;
+ /* never go back to a details page */
+ if (priv->mode == GS_SHELL_MODE_DETAILS) {
+ g_debug ("ignoring back entry for details");
+ return;
+ }
+
entry = g_new0 (BackEntry, 1);
entry->mode = priv->mode;
@@ -441,14 +447,6 @@ save_back_entry (GsShell *shell)
page_name[entry->mode],
gs_category_get_id (entry->category));
break;
- case GS_SHELL_MODE_DETAILS:
- page = GS_PAGE (g_hash_table_lookup (priv->pages, "details"));
- entry->app = gs_details_page_get_app (GS_DETAILS_PAGE (page));
- g_object_ref (entry->app);
- g_debug ("pushing back entry for %s with %s",
- page_name[entry->mode],
- gs_app_get_id (entry->app));
- break;
case GS_SHELL_MODE_SEARCH:
page = GS_PAGE (g_hash_table_lookup (priv->pages, "search"));
entry->search = g_strdup (gs_search_page_get_text (GS_SEARCH_PAGE (page)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]