Commit Graph

1752 Commits

Author SHA1 Message Date
bluegreenmagick
38ae2f2b06 Clicking the expander icon should not trigger click event
Expander icon does not change currentIndex
2021-03-11 09:04:24 +09:00
RumovZ
8e9331e424 Fix repainting in case of tag renaming exception 2021-03-10 21:50:46 +01:00
RumovZ
bc7043c384 Store name prefix of sidebar items 2021-03-10 16:38:29 +01:00
Damien Elmes
e122f8ae0d undo support for deck adding/removing
Work in progress - still to do:
- renames appear as 'Update Deck' - easiest way to solve it would
be to have a separate backend method for renames
- drag&drop of decks not yet undoable
- since the undo status is updated after the backend method ends,
the older checkpoint() calls need to be replaced with an
update_undo_status() at the end of the call - if we just remove the
checkpoint, then the menu doesn't get updated
2021-03-10 23:50:11 +10:00
RumovZ
602ffa67a7 Update about screen 2021-03-10 11:34:28 +01:00
RumovZ
0c2ac4ba04 Merge branch 'master' into sidebar-tools 2021-03-10 10:34:36 +01:00
RumovZ
ffbb0b7c07 Disable renaming models and templates ...
... but add context action CLayout for templates.
2021-03-10 10:14:06 +01:00
Damien Elmes
6b1dd9ee19 expand backend Preferences and make undoable
- moved 'default to current deck when adding' into prefs
- move some profile options into the collection config, so they're
undoable and will sync. There is (currently) no automatic migration
from the old profile settings, meaning users will need to set the
options again if they've customized them.
- tidy up preferences.py
- drop the deleteMedia option that was not exposed in the UI
2021-03-10 18:51:03 +10:00
Damien Elmes
24ad7c1f35 inline scheduling settings into preferences 2021-03-10 14:11:59 +10:00
Damien Elmes
ce243c2cae Simplify note adding and the deck/notetype choosers
The existing code was really difficult to reason about:

- The default notetype depended on the selected deck, and vice versa,
and this logic was buried in the deck and notetype choosing screens,
and models.py.
- Changes to the notetype were not passed back directly, but were fired
via a hook, which changed any screen in the app that had a notetype
selector.

It also wasn't great for performance, as the most recent deck and tags
were embedded in the notetype, which can be expensive to save and sync
for large notetypes.

To address these points:

- The current deck for a notetype, and notetype for a deck, are now
stored in separate config variables, instead of directly in the deck
or notetype. These are cheap to read and write, and we'll be able to
sync them individually in the future once config syncing is updated in
the future. I seem to recall some users not wanting the tag saving
behaviour, so I've dropped that for now, but if people end up missing
it, it would be simple to add as an extra auxiliary config variable.
- The logic for getting the starting deck and notetype has been moved
into the backend. It should be the same as the older Python code, with
one exception: when "change deck depending on notetype" is enabled in
the preferences, it will start with the current notetype ("curModel"),
instead of first trying to get a deck-specific notetype.
- ModelChooser has been duplicated into notetypechooser.py, and it
has been updated to solely be concerned with keeping track of a selected
notetype - it no longer alters global state.
2021-03-10 11:53:27 +10:00
Damien Elmes
3d0ddc8539 make flag changes in the reviewer undoable
This splits update_card() into separate undoable/non-undoable ops
like the change to notes in b4396b94abdeba3347d30025c5c0240d991006c9

It means that actions get a blanket 'Update Card' description - in the
future we'll probably want to either add specific actions to the backend,
or allow an enum or string to be passed in to describe the op.

Other changes:
- card.flush() can no longer be used to add new cards. Card creation
is only supposed to be done in response to changes in a note's fields,
and this functionality was only exposed because the card generation
hadn't been migrated to the backend at that point. As far as I'm aware,
only Arthur's "copy notes" add-on used this functionality, and that should
be an easy fix - when the new note is added, the associated cards will
be generated, and they can then be retrieved with note.cards()
- tidy ups/PEP8
2021-03-10 11:53:27 +10:00
Damien Elmes
d4765a301f coalesce note updates; avoid unnecessary saving due to mtime changes 2021-03-10 11:53:27 +10:00
Damien Elmes
f1a1b0891e make mark toggling undoable
- note.flush() behaves like before, as otherwise actions or add-ons
that perform bulk flushing would end up creating an undo entry for
each note
- added col.update_note() to opt in to the new behaviour
- tidy up the names of some related routines
2021-03-10 11:53:27 +10:00
Damien Elmes
bec77fd420 undo support for bulk tag add/remove 2021-03-10 11:47:53 +10:00
Damien Elmes
49a1970399 note deletion undo; refactoring
- transact() now automatically clears card queues unless an op
opts-out (and currently only AnswerCard does). This means there's no
risk of forgetting to clear the queues in an operation, or when undoing/
redoing
- CollectionOp->UndoableOp
- clear queues when redoing "answer card", instead of clearing redo
when clearing queues
2021-03-10 11:47:53 +10:00
Damien Elmes
605ad1c9ee remove unnecessary setMod() calls 2021-03-10 11:47:53 +10:00
Damien Elmes
57d7e3e2ab commit immediately when there's no active checkpoint
Reviews and operations on the backend that support undoing can now be
committed immediately, so they will not be lost in the event of a crash.

This required tweaks to a few places:

- don't set collection mtime on save() unless changes were made in
Python, as otherwise we end up accidentally clearing the backend undo
queue
- autosave() is now run on every reset()
- garbage collection now runs in a timer, instead of relying on
autosave() to be run periodically
2021-03-10 11:47:53 +10:00
Damien Elmes
40aff4447a undo support for note adding 2021-03-10 11:47:53 +10:00
Damien Elmes
105ce94dd4 undo unbury/unsuspend 2021-03-10 11:47:53 +10:00
Damien Elmes
41779c1aad implement bury/suspend undo 2021-03-10 11:47:53 +10:00
Damien Elmes
b466f0ce90 rework undo
- use dataclasses for the review/checkpoint undo cases, instead of the
nasty ad-hoc list structure
- expose backend review undo to Python, and hook it into GUI
- redo is not currently exposed on the GUI, and the backend can only
cope with reviews done by the new scheduler at the moment
- the initial undo prototype code was bumping mtime/usn on undo, but
that was not ideal, as it was breaking the queue handling which expected
the mtime to match. The original rationale for bumping mtime/usn was
to avoid problems with syncing, but various operations like removing
a revlog can't be synced anyway - so we just need to ensure we clear the
undo queue prior to syncing
2021-03-10 11:47:53 +10:00
Damien Elmes
b9c4b2bdbe
Merge pull request #1046 from hgiesel/sticky
Sticky icons in the editor window
2021-03-10 11:43:51 +10:00
Damien Elmes
1e7405296f
Merge pull request #1050 from BlueGreenMagick/choose-addon-to-update
Choose addon to update
2021-03-10 11:41:50 +10:00
RumovZ
9a844591fe Ensure mouse is at current index before searching
Thus, no search will be triggered when clicking an expansion indicator
as this doesn't update the current element. However, if the indicator
belongs to the current item, a search will be triggered anyway.
2021-03-09 20:36:15 +01:00
RumovZ
a9ea7e39ae Disable expand on double click in search mode 2021-03-09 20:18:12 +01:00
bluegreenmagick
4cde93ed74 don't show routine update when not update_enabled 2021-03-09 22:27:28 +09:00
bluegreenmagick
29076ec9ec add context menu to open ankiweb page 2021-03-09 22:19:03 +09:00
bluegreenmagick
c11feda0eb add bool_to_check and checked method 2021-03-09 22:19:03 +09:00
bluegreenmagick
01d8dc20f1 fix check issues in ChooseAddonsToUpdateList 2021-03-09 22:19:03 +09:00
bluegreenmagick
e73e0bec34 save chooseaddonupdate check state 2021-03-09 22:19:03 +09:00
Henrik Giesel
e03bfd2923 Refactor bridgeCommand and silence false "uncaught msg" log 2021-03-09 13:43:11 +01:00
Henrik Giesel
cd26901f3d Make sure topleft buttons are rounded too, prefer Bootstrap's rounded class 2021-03-09 13:43:11 +01:00
Henrik Giesel
6fbd82f2f8 Change signature of editor onBridgeCmd to Any instead of None 2021-03-09 13:43:11 +01:00
Henrik Giesel
da0317cb85 Replace pin icon with lock icon
Credit goes out to @kleinerpirat
2021-03-09 13:43:11 +01:00
Henrik Giesel
ebf423bc9c Remove Change Tracker again 2021-03-09 13:43:11 +01:00
Henrik Giesel
8593ab3c4c Connect icons to sticky fields values 2021-03-09 13:37:56 +01:00
Henrik Giesel
d13bd1096d Remove explicit popperjs again, because it's included in bootstrap.bundle 2021-03-09 13:37:56 +01:00
Henrik Giesel
31cba30873 Include the bootstrap icons in the editor view 2021-03-09 13:37:56 +01:00
Henrik Giesel
a66b0fbd84 Fix positioning of buttons 2021-03-09 13:37:56 +01:00
Henrik Giesel
f2cc85a3bc Include bootstrap in editor 2021-03-09 13:37:56 +01:00
Henrik Giesel
aeda64a890 Add bootstrap, bootstrap-icons, and popperjs 2021-03-09 13:37:56 +01:00
RumovZ
3f772ce0fe Add shortcuts for sidebar tools 2021-03-09 11:19:44 +01:00
RumovZ
28402c7015 Improve toolbar styling for macOS 2021-03-09 08:50:01 +01:00
RumovZ
08c09bcb0f Remove edit mode 2021-03-08 11:55:15 +01:00
RumovZ
8d9072193c Enable drag for all sidebar items ...
... and set valid drop targets dynamically based on the current
selection.
2021-03-08 11:35:39 +01:00
RumovZ
f07890c178 Ask before removing tags from collection 2021-03-07 11:40:11 +01:00
RumovZ
6c4d6457fb Simplify multi deletion confirmation strings 2021-03-07 11:05:43 +01:00
RumovZ
f72daacae4 Only show edit actions with conform selection 2021-03-07 11:05:28 +01:00
RumovZ
23777eed67 Fix repainting in case of tree building exception 2021-03-07 09:47:17 +01:00
RumovZ
cce1b1f702 Remove context action dict
Now that almost all actions can be triggered from outside the context
menu and are available for more than one item type, it's easier to check
for available actions dynamically.
2021-03-05 12:22:49 +01:00
RumovZ
39dad049cd Fix children check in context tree actions 2021-03-05 10:27:44 +01:00
Benjamin K
5d880f6e31 Clean up imports 2021-03-04 19:55:35 +01:00
Benjamin K
a066cee326 The old delimiter is now kept, when cancel button is clicked 2021-03-04 19:39:43 +01:00
RumovZ
513e7bdfb4 Enable deleting via delete key 2021-03-04 18:31:35 +01:00
RumovZ
1f500c1fb8 Enable Enter/Return search in all modes ...
... but don't trigger search if the key closes the editor.
Also get rid of the on_click of the saved searches root which has
already been removed on main.
2021-03-04 17:40:12 +01:00
RumovZ
4ab9e6caef Ask for confirmation when overwriting saved search 2021-03-04 17:22:03 +01:00
RumovZ
6930ea24a9 Adjust sidebar tool icons to smaller size 2021-03-04 17:20:10 +01:00
RumovZ
5c6eea0d80 Make renamed item current (don't just select) 2021-03-03 23:00:37 +01:00
RumovZ
7d3d6edb26 Remove renaming dialogues from sidebar ...
... in favour of in-line editing. This is simpler and more ergonomic for
the user (and the programmer) but doesn't allow for editing parents
through text input (in the case of tags and decks).
2021-03-03 21:57:39 +01:00
RumovZ
bcc8a5ac3a Enable renaming templates from the sidebar 2021-03-03 18:09:53 +01:00
RumovZ
aa4576dd42 Enable renaming notetypes 2021-03-03 15:18:50 +01:00
RumovZ
65a2796a0e Enable group expanding/collapsing
Also, only show expand/collapse actions if they will have an effect.
2021-03-03 11:44:42 +01:00
RumovZ
61e61376a2 Make SidebarItem._is_extended a property 2021-03-03 11:43:31 +01:00
RumovZ
e2940de4a4 Escape backslashes in re.sub()'s repl 2021-03-03 09:20:02 +01:00
RumovZ
c0d77896da Add DECK_CURRENT as a SidebarItemType
Thus, disable renaming, deleting etc. for the current deck item.
As a consequence, editable is no longer needed as a field of SidebarItem
as it can be derived from its type.
2021-03-03 09:15:36 +01:00
bluegreenmagick
69006b5872 add dialog to choose addons to update 2021-03-03 10:34:43 +09:00
RumovZ
adaea7227e Select and scroll to renamed/added sidebar item 2021-03-02 23:13:34 +01:00
RumovZ
25d57574c9 Enable removal of multiple tags from the sidebar 2021-03-02 11:05:16 +01:00
RumovZ
e29bd4479b Make clickable dyndeck labels fixed in size 2021-03-01 11:26:52 +01:00
RumovZ
f4aeb0c097 Enable deleting multiple saved searches 2021-03-01 09:41:41 +01:00
RumovZ
e199bf0b47 Fix repainting when renaming tag via dialogue 2021-03-01 08:45:33 +01:00
RumovZ
30e7d705b6 Enable extended selection in edit mode 2021-03-01 08:45:03 +01:00
Damien Elmes
e218604708 monospace font in html editor
https://forums.ankiweb.net/t/change-default-font-of-html-edit-mode-to-a-monospaced-font/7833
2021-03-01 10:16:12 +10:00
Damien Elmes
32af54cd4d catch attempts to nest under a filtered deck; don't show traceback 2021-03-01 09:58:12 +10:00
Damien Elmes
5564fd9e13
Merge pull request #1040 from RumovZ/deck-name-err
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
e83f0fef0f Fix Qt types 2021-02-28 22:36:31 +01:00
RumovZ
dc1711b630 Always return False from rename_node
setData expects a result but due to the asynchrony of the editor it
might not be known, yet.
2021-02-28 22:36:21 +01:00
RumovZ
1b8cebb8c5 Enable in-place editing of sidebar tags 2021-02-28 21:50:21 +01:00
RumovZ
d0b916a2ff Enable in-place editing of saved searches 2021-02-28 21:13:26 +01:00
RumovZ
0b83828508 Enable in-place editing of sidebar deck items 2021-02-28 21:03:19 +01:00
RumovZ
88c69665f3 Add support for multi deck deletion in python 2021-02-26 19:52:34 +01:00
RumovZ
2c25645975 Place sidebar tools right of search bar 2021-02-26 13:04:30 +01:00
RumovZ
92cbf168f6 Catch DeckIsFilteredError directly on frontend 2021-02-26 11:32:40 +01:00
Damien Elmes
b8acf11f3e remove left-click on saved searches
Multiple users have thought it was a bug rather than an intentional
feature, and it breaks double-clicking:

https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/51
2021-02-26 18:48:32 +10:00
Damien Elmes
d666b7e5b0 fix browser appearance defaults
https://forums.ankiweb.net/t/small-bug-in-the-browser-appearance-window/7806
2021-02-26 18:46:09 +10:00
Damien Elmes
bfd452c120
Merge pull request #1039 from RumovZ/dyndeck-hint
Clickable hint in dyndeck dialogue for unmovable cards
2021-02-26 18:02:51 +10:00
RumovZ
f5981e94bf Add group search context action 2021-02-25 21:24:11 +01:00
RumovZ
172133299b Handle search on event level
Instead of assigning each sidebar item a lambda, add a field for search
representation and handle searching in event handler.
2021-02-25 19:57:12 +01:00
RumovZ
47e1e62967 Make search first (default) mode 2021-02-25 19:28:29 +01:00
RumovZ
4a1e995934 Add edit mode in sidebar 2021-02-25 13:12:51 +01:00
RumovZ
0889972bb0 Save last sidebar tool 2021-02-25 12:20:54 +01:00
RumovZ
fd784adc31 Add select and search modes to sidebar 2021-02-25 11:06:59 +01:00
RumovZ
17afcb094f Add toolbar to sidebar 2021-02-25 11:05:04 +01:00
RumovZ
9d3da3b844 Add icons for sidebar tools 2021-02-25 11:02:17 +01:00
bluegreenmagick
c7d8700054 StudyDeck without add button 2021-02-25 07:34:01 +09:00
RumovZ
1dca43f409 Fix #1024 – catch deck rename errors 2021-02-24 13:59:38 +01:00
RumovZ
8e43b29816 Localise RenameDeckError 2021-02-24 13:57:44 +01:00
RumovZ
e95c2fa6ce Fix type hints in dyndeckconf 2021-02-24 11:24:27 +01:00
RumovZ
234ca4d496 Refactor dyndeckconf/on_hint_button 2021-02-24 11:14:33 +01:00
RumovZ
d6b1c0cf3a Give dyndeck hint unique styling 2021-02-23 23:34:05 +01:00
RumovZ
ae88f7e593 Add clickable hint to dyndeckconf 2021-02-23 23:14:11 +01:00
RumovZ
5a37b8e2af Add direct col reference to dyndeckconf 2021-02-23 22:31:04 +01:00
Henrik Giesel
8aa8174d4b Fix scrollbar issue in anki-editable component in two ways
- using :host-context(.nightMode) allows for applying the nightmode
  scroll bar inside the component
- apply max-width: 100% to all element within editable, not just images
2021-02-23 15:52:20 +01:00
Damien Elmes
f41ec183c2
Merge pull request #1034 from abdnh/clayout-cloze-shortcuts
Shortcuts to preview clozes in card layout screen
2021-02-22 10:07:16 +10:00
abdo
39f3b6ce93 Shortcuts to preview clozes in card layout screen
Assign Alt+{number} to select cloze cards.
2021-02-21 14:46:53 +03:00
Damien Elmes
13f5ee1ddc tweak update message
- Since we need to show this to new users until AnkiDroid is updated,
use a wording that doesn't seem so out of place to new users.
- Avoid mentioning syncing, since the user may not sync, and the
modSchema() call will allow the user to confirm anyway.
- Let the user know they can change their mind about AnkiDroid by
visiting the preferences.
2021-02-21 19:47:26 +10:00
Damien Elmes
5ae66af5d2 rework v2 scheduler upgrade; drop downgrade
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.

Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
bluegreenmagick
d6eac551b1 change _on_click_current to _on_click_index
fix bug where clicking on a blank space below sidebar item
would still trigger currentIndex item's click event
2021-02-20 22:58:02 +09:00
Damien Elmes
2941503bea tweak getFile() arguments in editor to be more readable 2021-02-19 10:18:40 +10:00
Damien Elmes
654f4d65f7 disable card shifting in reposition by default
https://forums.ankiweb.net/t/uncheck-shift-position-of-existing-cards-by-default/7550
2021-02-19 10:09:01 +10:00
Damien Elmes
ab1e59a04d use add-on id if name is blank
https://forums.ankiweb.net/t/support-for-rtl-layout-in-ankiweb-add-on-page/7522
2021-02-16 11:12:05 +10:00
Henrik Giesel
adb002f05f Remove unused imports 2021-02-12 02:16:05 +01:00
Henrik Giesel
87febe489e Allow for passing in custom note type and template 2021-02-12 02:12:03 +01:00
Henrik Giesel
270cef63f4 Allow for passing in custom note types for rendering ephemeral cards 2021-02-12 01:53:03 +01:00
Damien Elmes
6e9dfefb24 Revert "Use new note.ephemeral_card method in clayout"
This partially reverts commit 2483ef4517.
2021-02-12 10:05:46 +10:00
Damien Elmes
35840221bb tweak search wording and tidy up API
- SearchTerm -> SearchNode
- Operator -> Joiner; share between messages
- build_search_string() supports specifying AND/OR as a convenience
- group_searches() makes it easier to negate
2021-02-11 19:57:19 +10:00
Damien Elmes
59ccfe5918 more search bikeshedding
While implementing the overdue search, I realised it would be nice to
be able to construct a search string with OR and NOT searches without
having to construct each part individually with build_search_string().

Changes:

- Extends SearchTerm to support a text search, which will be parsed
by the backend. This allows us to do things like wrap text in a group
or NOT node.
- Because SearchTerm->Node conversion can now fail with a parsing error,
it's switched over to TryFrom
- Switch concatenate_searches and replace_search_term to use SearchTerms,
so that they too don't require separate string building steps.
- Remove the unused normalize_search()
- Remove negate_search, as this is now an operation on a Node, and
users can wrap their search in SearchTerm(negated=...)
- Remove the match_any and negate args from build_search_string

Having done all this work, I've just realised that perhaps the original
JSON idea was more feasible than I first thought - if we wrote it out
to a string and re-parsed it, we would be able to leverage the existing
checks that occur at parsing stage.
2021-02-11 17:11:17 +10:00
Damien Elmes
5c69bccfcf switch some existing code to use SearchTerm(negated=...) 2021-02-11 10:55:02 +10:00
Damien Elmes
397cff9194 split due into 'due today' and 'overdue' 2021-02-11 10:49:36 +10:00
Damien Elmes
67d612926c Revert "experiment with using right click for AND/OR/NOT"
This reverts commit 9048a1ff3c and
manually comments out the setSelectionMode() call.

Switching back to the old behaviour until issues can be worked through.
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/24
2021-02-11 10:14:26 +10:00
Damien Elmes
2a585c5e5a Revert "add escape hatch for new clicking behaviour, in case it causes problems"
This reverts commit 678756c3e9.
2021-02-11 10:10:45 +10:00
Damien Elmes
88c002f4eb convert qt strings to f-strings with flynt
Also revealed an incorrect type def in editor.py that mypy wasn't
noticing before :-(
2021-02-11 10:09:06 +10:00
Damien Elmes
bb29ce88f3 minor code cleanups with pyupgrade
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
4d373f4aa3 catch TTS runtime error 2021-02-10 16:30:51 +10:00
Damien Elmes
678756c3e9 add escape hatch for new clicking behaviour, in case it causes problems 2021-02-09 19:29:59 +10:00
Damien Elmes
9ce4b21935 add markdown flag for deck description
Needed so we can display consistently, and gradually transition over
2021-02-09 18:47:19 +10:00
Damien Elmes
cf5e04b011 tweak sidebar appearance
- draw a border between sidebar and main area
- tweak padding

Testing is a pain, because you need to check day mode on the
three platforms, and night mode as well. If you can do it better, PRs
are welcome :-)
2021-02-09 16:23:44 +10:00
Damien Elmes
63b369b8a6 add 'untagged', and make clicking on 'tags' show all tagged cards 2021-02-09 12:50:35 +10:00
Damien Elmes
9048a1ff3c experiment with using right click for AND/OR/NOT
This frees up Ctrl/Shift+left click to behave like in a typical GUI
app. On a Mac users can either two finger click, or Command+click in
conjunction with one of the other modifiers.

https://github.com/ankitects/anki/issues/1011
2021-02-09 11:39:47 +10:00
Damien Elmes
68c4b10dcd move update_search into sidebar.py; fix setFilter()
No idea why neither mypy nor pylint are not noticing
"set_filter_then_search" does not exist. Python tooling. :-(
2021-02-09 10:50:39 +10:00
Damien Elmes
09dfbfe2b9 Partially revert "don't select contiguously with shift+click"
I thought this could work, but users (including myself!) are used to
being able to shift+click to select a region, and this behaviour is
surprising. We're also doing potentially expensive searches for each
extra selected item. I think we may need to switch this behaviour to
the right mouse button instead.

This partially reverts commit c91d21e18e.
2021-02-09 10:37:21 +10:00
Damien Elmes
2a0bc15a0b move flags above card state; change stage label for consistency 2021-02-09 09:54:46 +10:00
Damien Elmes
180efbc578 recent -> today
'Current deck' has moved, and by removing 'due tomorrow', we can drop
the 'today' suffix on the rest of the items.

The keys of the existing translations have not been changed, so
existing translations will not break, but will need to be manually
updated to make them shorter.
2021-02-09 09:50:59 +10:00
Damien Elmes
13aa6f99e4 fix rename/delete on current deck 2021-02-09 09:38:37 +10:00
Damien Elmes
c91d21e18e don't select contiguously with shift+click; enable multiple selection
https://github.com/ankitects/anki/issues/1011
2021-02-09 09:33:32 +10:00
Damien Elmes
7972fa6493 remove 'any flag'; make clicking on flags root do the same thing 2021-02-08 22:52:37 +10:00
Damien Elmes
202cf38446 fix wrong item type being used for recent items 2021-02-08 22:50:48 +10:00
Damien Elmes
05074f2cc1 make decks root search collection; move current deck
Also use explicit 'deck:*' search, to make it more obvious what is
happening
2021-02-08 22:48:45 +10:00
Damien Elmes
a8ddb65e1c add ability to force interval reset
- use trailing ! to force a reset
- use - instead of ..
- tweak i18n messages and error handling
2021-02-08 22:33:27 +10:00
Damien Elmes
b9635ce936 nest NoteWithEmptyCards 2021-02-08 19:11:16 +10:00
Damien Elmes
aa82bb172d add small amount of padding to sidebar
https://forums.ankiweb.net/t/anki-2-1-41-beta/7305/3
2021-02-08 19:01:54 +10:00
Damien Elmes
4ac62f8848 fix media check not updating progress 2021-02-08 16:46:57 +10:00
Damien Elmes
6ac35b30c1 Media check suffered from the same text box slowdown as the importing screen 2021-02-08 16:42:21 +10:00
Damien Elmes
c23b01978d nest progress messages and remove Python wrapper class
The progress messages are only really intended to be consumed by Anki.
If consumption by add-ons was expected, we'd be better off keeping the
wrapper, as the API for oneofs in Python is quite awkward to use.
2021-02-08 16:40:27 +10:00
Damien Elmes
f434cff36f remember last input for 'set due'; add string config; nest config types 2021-02-08 14:10:05 +10:00
Damien Elmes
b56580a8c0 fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
Damien Elmes
6aab9feec1 add (unused) reschedule option back to avoid breaking fastbar 2021-02-08 09:51:40 +10:00
Damien Elmes
704b5e581a Rework reschedule tool
The old rescheduling dialog's two options have been split into two
separate menu items, "Forget", and "Set Due Date"

For cards that are not review cards, "Set Due Date" behaves like the
old reschedule option, changing the cards into a review card, and
and setting both the interval and due date to the provided number of
days.

When "Set Due Date" is applied to a review card, it no longer resets
the card's interval. Instead, it looks at how much the provided number
of days will change the original interval, and adjusts the interval by
that amount, so that cards that are answered earlier receive a smaller
next interval, and cards that are answered after a longer delay receive
a bonus.

For example, imagine a card was answered on day 5, and given an interval
of 10 days, so it has a due date of day 15.

- if on day 10 the due date is changed to day 12 (today+2), the card
is being scheduled 3 days earlier than it was supposed to be, so the
interval will be adjusted to 7 days.
- and if on day 10 the due date is changed to day 20, the interval will
be changed from 10 days to 15 days.

There is no separate option to reset the interval of a review card, but
it can be accomplished by forgetting the card(s), and then setting the
desired due date.

Other notes:

- Added the action to the review screen as well.
- Set the shortcut to Ctrl+Shift+D, and changed the existing Delete
Tags shortcut to Ctrl+Alt+Shift+A.
2021-02-07 21:57:51 +10:00
Damien Elmes
b7c72bca4c fix backup not being taken before full download 2021-02-06 19:01:48 +10:00
Damien Elmes
3cd311191a add opus to supported audio list and sort 2021-02-06 15:11:24 +10:00