[gnome-music/wip/jfelder/3-36-selection-fixes: 1/5] window: Do not start search when selection-mode is active
- From: Jean Felder <jfelder src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-music/wip/jfelder/3-36-selection-fixes: 1/5] window: Do not start search when selection-mode is active
 
- Date: Sat,  5 Sep 2020 21:33:50 +0000 (UTC)
 
commit f689942a039a8101609a7baa4af80786907f0af3
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Aug 19 13:43:20 2020 +0200
    window: Do not start search when selection-mode is active
    
    The search entry is a top-bar element, it is not visible when the
    application is in selection-mode state. Thus, it should not be
    possible to start a search when selection-mode is active.
    
    Related: #405
 gnomemusic/window.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 939855cb..b0afa62f 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -317,6 +317,7 @@ class Window(Gtk.ApplicationWindow):
             # Open search bar on Ctrl + F
             if (keyval == Gdk.KEY_f
                     and not self.views[View.PLAYLIST].rename_active
+                    and not self.props.selection_mode
                     and self._headerbar.props.state != HeaderBar.State.SEARCH):
                 search_mode = self._search.props.search_mode_active
                 self._search.props.search_mode_active = not search_mode
@@ -399,6 +400,7 @@ class Window(Gtk.ApplicationWindow):
                 and (modifiers == shift_mask
                      or modifiers == 0)
                 and not self.views[View.PLAYLIST].rename_active
+                and not self.props.selection_mode
                 and self._headerbar.props.state != HeaderBar.State.SEARCH):
             self._search.props.search_mode_active = True
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]