This is meant to more closely replicate Anki 2.0.x`s _addButton method
than the current one does. Its primary purpose is to reduce the
boilerplate code needed for add-on authors to implement a new button
alongside its hotkey.
Anki 2.0.x provided add-on authors with the ability to define
labels that could be used instead of icons. This commit reintroduces
that ability and makes the use of an icon optional.
- use a main window instead of a dialog, so the menu items of the main
window don't appear while the profile window is active on OS X
- the profile manager now has a button to automatic restoring from
backup, which will prevent old backups from being clobbered
- drop support for profile passwords
- do the right thing when user quits from the menu in profile manager
mode
when modal, the program hangs on OS X when moving back and forth
between the main window and the profile manager, and I haven't been able
to find a better workaround
.update() ignores user input when processing events, so this will
hopefully not break things
- unloadCollection() now waits for all collection windows to
indicate they've closed, and calls a callback when it's done
- autosync runs when the collection is unloaded, and is no longer
responsible for reloading it
- make sure backup thread runs until completion
- ensure we return to profile manager when collection can't be loaded
- don't run the profile manager with exec_(), or opening+closing a
broken profile ends up nesting runloops
- warn if a window wasn't cleaned up as part of collection unloading
remove the old forceClose hack in favour of a callback when closing, so
all windows have a chance to save properly before the collection is
unloaded
also:
- fix a warning shown when opening about screen
- require a call to editor.cleanup() when closing a window, to make sure
any pending js callbacks don't try to fire on a deleted object
- make sure we gc webview when closing editcurrent
- main.py still needs refactoring to make use of the change
- embed date in name to make it easier for people to locate correct
backup
- move old backups to the trash instead of deleting outright
- backups in the old format will not be rotated, and will need to be
deleted by the user - if we just deleted them at the start of the
rotation it could lead to data loss for users moving back and forth
between 2.1 and 2.0
Users can now mark individual cards with one of four different coloured
flags, instead of relying on a tag that applied to the whole note.
- replaced marking functionality in reviewer and browser with new
flag options
- added flag:x search
- marked and leech tags now show in normal tag list in filter screen,
instead of being treated specially
- the other clients will need updating to set and shown the flags, but
flags set in the beta should be preserved by the other clients
- the bulk of image use is in webviews, so we move almost all used
images to web/imgs, as it's easier to manage
- change AnkiWebView to always use the local media server as a base, as
much of the UI has come to depend on it
- remove images from a few areas, as they felt dated
- delete a bunch of unused images
- href=# links were being opened in a browser window, so the code now
ignores them - the HTML should really be updated to return false in the
onclick handler
- update a few icons
use a pop-up menu instead, which saves a lot of screen real estate and
should be more intuitive for new users
also:
- add options to manage note types and clear unused tags in the relevant
submenus
- shuffle a few shortcut keys
- remove the old favourites code - saving and removing now done via the
menu
- individual card templates now searchable
you can use the debug console to define custom html/css/js to be added
to the bottom of the reviewer on all note types, so to increase the fade
time on the question you'd use
mw.col.conf["reviewExtra"]="<script>qFade=500;</script>"
mw.col.setMod()
also make sure the fading for question/answer is used correctly in
previewer, and use answer fading in clayout to speed it up