[gnome-software] Make sure back button always leads back to overview
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Make sure back button always leads back to overview
- Date: Fri, 12 Dec 2014 15:59:44 +0000 (UTC)
commit 1a06f3b49e3052ee42fd9c3db04fa8ee636fbb91
Author: Kalev Lember <kalevlember gmail com>
Date: Fri Dec 12 16:22:59 2014 +0100
Make sure back button always leads back to overview
When gnome-software is launched in the details view, the back button
should normally lead back to the main view.
However, this didn't work when gnome-software window had previously been
closed in a different view; when relaunched, gnome-software would then
remember the last view from the previous run and the back button would
go back there instead of the overview mode.
Fix this by making sure we reset the internal state when closing the
main window.
src/gs-shell.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index e9e7428..dc9a543 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -470,6 +470,10 @@ main_window_closed_cb (GtkWidget *dialog, GdkEvent *event, gpointer user_data)
GsShellPrivate *priv = shell->priv;
BackEntry *entry;
+ /* When the window is closed, reset the initial mode to overview */
+ priv->mode = GS_SHELL_MODE_OVERVIEW;
+
+ /* ... and clear any remaining entries in the back button stack */
while ((entry = g_queue_pop_head (priv->back_entry_stack)) != NULL) {
free_back_entry (entry);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]