Skip to content

Commit

Permalink
searchbar: Explicitly save query on return
Browse files Browse the repository at this point in the history
Now that filter changes don't.
  • Loading branch information
frestr committed May 30, 2018
1 parent 941db7b commit 66ffc88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quodlibet/quodlibet/qltk/searchbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(self, filename=None, completion=None, accel_group=None,
entry.connect('backspace', self.__text_changed)
entry.connect('populate-popup', self.__menu)
entry.connect('activate', self.__filter_changed)
entry.connect('activate', self.__save_search)
entry.connect('focus-out-event', self.__save_search)
entry.connect('key-press-event', self.__key_pressed)

Expand Down Expand Up @@ -168,7 +169,7 @@ def __save_search(self, entry, *args):
self.__uninhibit()

def __key_pressed(self, entry, event):
if (is_accel(event, "<Primary>Return") or
if (is_accel(event, '<Primary>Return') or
is_accel(event, '<Primary>KP_Enter')):
# Save query on Primary+Return accel, even though the focus is kept
self.__save_search(entry)
Expand Down

0 comments on commit 66ffc88

Please sign in to comment.