Remove hard coded tab string in ThemesHandler

Remove hard coded tab string and replace with self.tabs, which is
a reference to the same tab string defined in the __init__ of
ThemesHandler
This commit is contained in:
James Reid 2022-05-30 19:17:07 +01:00
parent 1962f8e5a0
commit 1dc6b49e02
No known key found for this signature in database
GPG Key ID: 4359023131208302

View File

@ -389,7 +389,7 @@ class ThemesHandler(Handler):
if key_event.matches('esc') or key_event.matches_text('q'): if key_event.matches('esc') or key_event.matches_text('q'):
self.quit_on_next_key_release = 0 self.quit_on_next_key_release = 0
return return
for cat in 'all dark light recent'.split(): for cat in self.tabs:
if key_event.matches_text(cat[0]) or key_event.matches(f'alt+{cat[0]}'): if key_event.matches_text(cat[0]) or key_event.matches(f'alt+{cat[0]}'):
if cat != self.current_category: if cat != self.current_category:
self.current_category = cat self.current_category = cat