Commit Graph

17 Commits

Author SHA1 Message Date
johan456789
06f1aeb052 fix help url paths 2020-10-10 00:38:07 +08:00
Matt Krump
b3b4d23f9d Add type hints for apt.deckconf
* Add type hints for apt.deckconf
* Turn on check_untyped_defs for apt.deckconf
2020-07-23 21:53:12 -06:00
Henrik Giesel
2074ffcf51 Add three deck config hooks
- gui_hooks.deck_conf_did_add_config
- gui_hooks.deck_conf_will_remove_config
- gui_hooks.deck_conf_will_rename_config
2020-05-22 21:24:05 +02:00
Damien Elmes
252eb3a444 fix shared deck conf warning 2020-05-17 14:37:59 +10:00
Damien Elmes
eec3fcf87a use qconnect everywhere, and fix some typing issues
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Damien Elmes
9645b85df8 fix deck confs not deleting
https://anki.tenderapp.com/discussions/ankidesktop/41044-bug-report-anki-2124-macos-deleting-unused-option-groups
2020-04-30 08:10:29 +10:00
Damien Elmes
683f664d85 fix deleting deck configs 2020-04-20 13:23:05 +10:00
Damien Elmes
335815ab9c fix renaming not updating dropdown 2020-04-20 13:17:55 +10:00
Damien Elmes
c023bdd78e fix adding deck configs 2020-04-20 13:15:23 +10:00
Damien Elmes
676f4e74a8 store config in separate DB table
- mtime is tracked on each key individually, which will allow
merging of config changes when syncing in the future
- added col.(get|set|remove)_config()
- in order to support existing code that was mutating returned
values (eg col.conf["something"]["another"] = 5), the returned list/dict
will be automatically wrapped so that when the value is dropped, it
will save the mutated item back to the DB if it's changed. Code that
is fetching lists/dicts from the config like so:

col.conf["foo"]["bar"] = baz
col.setMod()

will continue to work in most case, but should be gradually updated to:

conf = col.get_config("foo")
conf["bar"] = baz
col.set_config("foo", conf)
2020-04-06 15:39:47 +10:00
Damien Elmes
8b76098bc7 omit period in steps when possible 2020-04-06 15:39:47 +10:00
Damien Elmes
333d0735ff preserve mtime/usn when syncing deck config, and add snake_case names 2020-04-03 19:34:46 +10:00
Glutanimate
8454e27efb Use a consistent function signature across load and save hooks 2020-02-24 15:47:48 +01:00
Glutanimate
7cc9311b79 Add deck_conf_did_setup_ui_form hook
Called earlier than deck_conf_will_show, allowing add-on authors
to perform UI modifications before the deck config is loaded.
2020-02-24 15:29:23 +01:00
Glutanimate
335047187a Add hooks for extending the deck options dialog
Introduces three new hooks:

* deck_conf_will_show: Allows adding or modifying widgets
* deck_conf_did_load_config: Allows add-on widgets to read from config
* deck_conf_will_save_config: Allows add-on widgets to write to config
2020-02-24 13:42:30 +01:00
Damien Elmes
26d581adf9 remove dupe line 2020-01-06 20:59:18 +10:00
Damien Elmes
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00