[gnome-music/wip/mschraal/move-searchbar-handling: 3/3] window: Fix search dissapearing on returning from child



commit ff4f7f022e92ef269c3a24db1d8a3fd48cb5a2df
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Sep 4 16:10:13 2018 +0200

    window: Fix search dissapearing on returning from child
    
    The search would dissapear when returning from a child view.
    Check if search is the active view and do not hide the searchbar in that
    case.

 gnomemusic/window.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 29338808..df57398f 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -509,7 +509,8 @@ class Window(Gtk.ApplicationWindow):
                 and visible_child != self.curr_view._grid):
             self._headerbar.props.state = HeaderBar.State.MAIN
 
-        self._searchbar.reveal(False)
+        if self.curr_view != self.views[View.SEARCH]:
+            self._searchbar.reveal(False)
 
     @log
     def _on_selection_mode_changed(self, widget, data=None):


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