diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index c5bdcbe47..4790e5ed5 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -1601,7 +1601,13 @@ class ConfigEditor(QDialog): def accept(self) -> None: txt = self.form.editor.toPlainText() - txt = gui_hooks.addon_config_editor_will_save_json(txt) + txt = gui_hooks.addon_config_editor_will_update_json(txt, self.addon) + if gui_hooks.addon_config_editor_will_save_json.count() > 0: + print( + "The hook addon_config_editor_will_save_json is deprecated.\n" + "Use addon_config_editor_will_update_json instead." + ) + txt = gui_hooks.addon_config_editor_will_save_json(txt) try: new_conf = json.loads(txt) jsonschema.validate(new_conf, self.mgr._addon_schema(self.addon)) diff --git a/qt/tools/genhooks_gui.py b/qt/tools/genhooks_gui.py index 0742bde3d..85f4b50b0 100644 --- a/qt/tools/genhooks_gui.py +++ b/qt/tools/genhooks_gui.py @@ -271,7 +271,7 @@ hooks = [ as possible, instead opting to append your own changes, e.g.: def on_deck_browser_will_render_content(deck_browser, content): - content.stats += "\n