-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b94636
commit 75b9936
Showing
5 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
from anki.collection import Collection | ||
from aqt import gui_hooks | ||
from aqt.utils import askUser | ||
|
||
from . import answer_buttons | ||
from . import gui | ||
from . import toolbar | ||
from .consts import SCHED_UP_WARN_MSG | ||
|
||
|
||
def init_answer_buttons(col: Collection): | ||
# Upgrade scheduler version, if outdated. | ||
|
||
if col.schedVer() != 2: | ||
if askUser(SCHED_UP_WARN_MSG) is True: | ||
col.changeSchedulerVer(2) | ||
else: | ||
return | ||
|
||
answer_buttons.main() | ||
|
||
|
||
answer_buttons.main() | ||
toolbar.main() | ||
gui.main() | ||
gui_hooks.collection_did_load.append(init_answer_buttons) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters