[gnome-music/wip/mschraal/window-disallow-type-search-on-startup] window: Typeahead search only when views are loaded
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/window-disallow-type-search-on-startup] window: Typeahead search only when views are loaded
- Date: Tue, 5 Apr 2022 09:18:33 +0000 (UTC)
commit 8ab65555a60c3f7dbf8c65e227bffc919f568b52
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Apr 5 11:14:31 2022 +0200
window: Typeahead search only when views are loaded
On startup when immediately typing on the keyboard, the views are not
yet loaded and this resulted in an error for the typeahead search.
Check that the views are loaded before allowing typeahead search.
gnomemusic/window.py | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 0c6d00da2..93f1b27d6 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -374,6 +374,7 @@ class Window(Adw.ApplicationWindow):
and GLib.unichar_isprint(chr(key_unic))
and (modifiers == shift_mask
or modifiers == 0)
+ and self.views[View.PLAYLIST] is not None
and not self.views[View.PLAYLIST].rename_active
and not self.props.selection_mode
and self._headerbar.props.state != HeaderBar.State.SEARCH):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]