[gnome-music/wip/mschraal/window-selection-mode: 19/22] headerbar: Do not switch view in selection mode



commit 6646315033b0ea365fe4bc09ec7b8c013cd64780
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Sep 2 13:22:33 2018 +0200

    headerbar: Do not switch view in selection mode
    
    In the child view it was possible to switch to the parent view while in
    selection-mode with the keybindings.
    Add a selection-mode check to the back button handling to prevent this.

 gnomemusic/widgets/headerbar.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gnomemusic/widgets/headerbar.py b/gnomemusic/widgets/headerbar.py
index b15cedb2..761d6e52 100644
--- a/gnomemusic/widgets/headerbar.py
+++ b/gnomemusic/widgets/headerbar.py
@@ -202,6 +202,9 @@ class HeaderBar(Gtk.HeaderBar):
     @Gtk.Template.Callback()
     @log
     def _on_back_button_clicked(self, widget=None):
+        if self.props.selection_mode:
+            return
+
         window = self.get_toplevel()
 
         visible_child = window.curr_view.props.visible_child


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