GNOME Bugzilla – Bug 777238
Behaviour of back ui button and short cut <ALT> + Left is not same.
Last modified: 2017-12-19 12:53:45 UTC
Observations: Go to albums > click an album > search for tracks > [go back] > turn search off [go back] by <Alt> + Left : stuck at single album with no way to go back to albums. [go back] by UI button : present at albums view -- no problem. Observations (if 777235 patched): --- https://bugzilla.gnome.org/show_bug.cgi?id=777235 Hide the search view and search bar, and then go back. --- Along with the observations from without 777235 patched, the behaviour difference also causes the search bar to not disappear. Reasoning: Shortut (window.py) has a different implementation of going back, while back button (toolbar.py) has a different implementation.
Created attachment 343458 [details] [review] Matched the behaviour of navigating back - ui/shortcut Shortcut navigation back behaviour was missing some conditions while ui behaviour was good. Hence now calling the same function.
I just saw that baseview.py does not have an implementation of back_button_clicked. Hence the above patch breaks the back navigation in artists/songs view. ------ When back navigation is done, there are these things that needs to be done, 1> Reset toolbar state 2> Set visible child view 3> If search is on, disable it 4> If selection is on, disable it (not sure) Currently this happens, back button ui : reset toolbar (toolbar.py) > set visible child, reset header title (albumsview.py) back button shortcut : reset toolbar, set visible child (window.py) Both currently are incomplete and have different implementation. Solution: On back shortcut(Alt+left) call the toolbar.py back_button_clicked. In back_button_clicked: > ask the toolbar to reset itself > ask the current view to go back (ie baseview.py has implementation of back_clicked) > ask the toolbar to disable search/selection This is also solve another problem, ----- [window.py, back shortcut] if (self.toolbar._state != ToolbarState.MAIN): self.curr_view.set_visible_child(self.curr_view._grid) ----- Currently window is using private members of child views, this solution will fix that too, as all views will have their own responsibility to go back.
Review of attachment 343458 [details] [review]: lgtm
I really don't know why this lingered so long, added in commit 28a7c0868a6a0f116e6801afe22fad3b33a40e46 . This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.