Skip to content

Commit

Permalink
RadioBrowser Search Window: Left and right movement on "Search" check…
Browse files Browse the repository at this point in the history
…boxes fixed
  • Loading branch information
s-n-g committed Aug 11, 2021
1 parent dca1740 commit 6c85f91
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions pyradio/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2069,11 +2069,27 @@ def keypress(self, char):
elif char in (ord('l'), curses.KEY_RIGHT) and \
class_name not in ('SimpleCursesWidgetColumns',
'SimpleCursesLineEdit'):
self._focus_next()
if 5 <= self._widgets[self._focus].id <= 13:
new_focus = self._focus + 2
# logger.error('DE focus = {}'.format(new_focus))
if new_focus == 15:
new_focus = 17
# logger.error('DE focus = {}'.format(new_focus))
self._apply_new_focus(new_focus)
else:
self._focus_next()
elif char in (ord('h'), curses.KEY_LEFT) and \
class_name not in ('SimpleCursesWidgetColumns',
'SimpleCursesLineEdit'):
self._focus_previous()
if 5 <= self._widgets[self._focus].id <= 13:
new_focus = self._focus - 2
# logger.error('DE focus = {}'.format(new_focus))
if new_focus == 3:
new_focus = 4
# logger.error('DE focus = {}'.format(new_focus))
self._apply_new_focus(new_focus)
else:
self._focus_previous()

if char == ord('?'):
return 2
Expand Down

0 comments on commit 6c85f91

Please sign in to comment.