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



commit 83e8ec2dcfaa88cb85f8c14dca71b6bdd4b79624
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 9c07e38a..fe3542be 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -510,7 +510,8 @@ class Window(Gtk.ApplicationWindow):
                 and visible_child != self.curr_view._grid):
             self._headerbar.props.state = HeaderBar.State.MAIN
 
-        self._searchbar.reveal(False)
+        if 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]