This commit is contained in:
Kovid Goyal 2020-03-27 12:40:50 +05:30
parent 53de96b18b
commit a3b83ab1b9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -225,7 +225,7 @@ def reset_to_defaults():
w.reset_to_default() w.reset_to_default()
def prefs_panel_handler(title, get_prefs_data, on_close=None, icon='close'): def prefs_panel_handler(title_func, get_prefs_data, on_close=None, icon='close'):
def close_action(): def close_action():
if on_close is not None: if on_close is not None:
@ -234,7 +234,7 @@ def prefs_panel_handler(title, get_prefs_data, on_close=None, icon='close'):
def init_prefs_panel(container_id): def init_prefs_panel(container_id):
container = document.getElementById(container_id) container = document.getElementById(container_id)
create_top_bar(container, title=title, action=close_action, icon=icon) create_top_bar(container, title=title_func(), action=close_action, icon=icon)
container.appendChild(E.div()) container.appendChild(E.div())
create_prefs_widget(container.lastChild, get_prefs_data()) create_prefs_widget(container.lastChild, get_prefs_data())

View File

@ -509,7 +509,7 @@ def get_prefs():
] ]
def tb_config_panel_handler(): def tb_config_panel_handler():
return prefs_panel_handler(_('Configure Tag browser'), get_prefs) return prefs_panel_handler(def(): return _('Configure Tag browser');, get_prefs)
# }}} # }}}