Commit Graph

193 Commits

Author SHA1 Message Date
Abdo
b23f17df27
Drop support for checkpoints (#2742)
* Drop support for checkpoints

* Deprecate .flush()

* Remove .begin/.commit

* Remove rollback() and deprecate save/autosave/reset()

There's no need to commit anymore, as the Rust code is handling
transactions for us.

* Add safer transact() method

This will ensure add-on authors can't accidentally leave a transaction
open, leading to data loss.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-17 12:43:34 +10:00
Abdo
5cde4b6941
Remove v1/v2 support from the backend (#2727)
* Remove v1/v2 support from deck list

* Remove v1/v2 support from most routines and show error

* Remove scheduler_version from preferences

* Fix formatting

* Remove v1/v2 conditionals from Python code

* Fix legacy importer

* Remove legacy hooks

* Add missing scheduler checks

* Remove V2 logic from deck options screen

* Remove the review_did_undo hook

* Restore ability to open old options with shift (dae)
2023-10-14 10:50:59 +10:00
Abdo
ab7e64865e
Implement "stop timer on answer" as a preset option (#2686)
* Implement "stop timer on answer" as a preset option

* Hide timer setting on AnkiMobile (dae)
2023-09-27 16:10:14 +10:00
Damien Elmes
558c75493f Strip out v1/v2 code 2023-09-24 14:27:40 +10:00
Abdo
f78c59176e
Add an option to stop the timer on answer (#2673)
* Add an option to stop the timer on answer

* Fix tab order
2023-09-23 14:01:03 +10:00
Damien Elmes
5004cd332b
Integrate FSRS into Anki (#2654)
* Pack FSRS data into card.data

* Update FSRS card data when preset or weights change

+ Show FSRS stats in card stats

* Show a warning when there's a limited review history

* Add some translations; tweak UI

* Fix default requested retention

* Add browser columns, fix calculation of R

* Property searches

eg prop:d>0.1

* Integrate FSRS into reviewer

* Warn about long learning steps

* Hide minimum interval when FSRS is on

* Don't apply interval multiplier to FSRS intervals

* Expose memory state to Python

* Don't set memory state on new cards

* Port Jarret's new tests; add some helpers to make tests more compact

https://github.com/open-spaced-repetition/fsrs-rs/pull/64

* Fix learning cards not being given memory state

* Require update to v3 scheduler

* Don't exclude single learning step when calculating memory state

* Use relearning step when learning steps unavailable

* Update docstring

* fix single_card_revlog_to_items (#2656)

* not need check the review_kind for unique_dates

* add email address to CONTRIBUTORS

* fix last first learn & keep early review

* cargo fmt

* cargo clippy --fix

* Add Jarrett to about screen

* Fix fsrs_memory_state being initialized to default in get_card()

* Set initial memory state on graduate

* Update to latest FSRS

* Fix experiment.log being empty

* Fix broken colpkg imports

Introduced by "Update FSRS card data when preset or weights change"

* Update memory state during (re)learning; use FSRS for graduating intervals

* Reset memory state when cards are manually rescheduled as new

* Add difficulty graph; hide eases when FSRS enabled

* Add retrievability graph

* Derive memory_state from revlog when it's missing and shouldn't be

---------

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>
2023-09-16 16:09:26 +10:00
Abdo
120c6e165c
Fix tooltips not reflecting configured shortcuts (#2657) 2023-09-14 11:33:42 +10:00
evandrocoan
8d3debb6d4
Implemented support to audio_did_seek_relative (#2632)
* Implemented support to audio_did_seek_relative
2023-09-05 11:15:15 +10:00
Monty Evans
95f7d5a941
Change “Delete Note” shortcut to cmd+backspace (#2614)
* Changed delete note shortcut during reviewing to ctrl+backspace

* Added name to contributors

* Changed Mac shortcut
2023-08-25 07:15:11 +10:00
mjuhanne
cc776bb0ca
Fix crash caused by uninitialized self._reps in class Reviewer (#2603)
* Fix crash caused by uninitialized self._reps in class Reviewer

* Do not declare _reps in reviewer.py twice
2023-08-07 15:10:47 +10:00
Damien Elmes
45f5709214
Migrate to protobuf-es (#2547)
* Fix .no-reduce-motion missing from graphs spinner, and not being honored

* Begin migration from protobuf.js -> protobuf-es

Motivation:

- Protobuf-es has a nicer API: messages are represented as classes, and
fields which should exist are not marked as nullable.
- As it uses modules, only the proto messages we actually use get included
in our bundle output. Protobuf.js put everything in a namespace, which
prevented tree-shaking, and made it awkward to access inner messages.
- ./run after touching a proto file drops from about 8s to 6s on my machine. The tradeoff
is slower decoding/encoding (#2043), but that was mainly a concern for the
graphs page, and was unblocked by
37151213cd

Approach/notes:

- We generate the new protobuf-es interface in addition to existing
protobuf.js interface, so we can migrate a module at a time, starting
with the graphs module.
- rslib:proto now generates RPC methods for TS in addition to the Python
interface. The input-arg-unrolling behaviour of the Python generation is
not required here, as we declare the input arg as a PlainMessage<T>, which
marks it as requiring all fields to be provided.
- i64 is represented as bigint in protobuf-es. We were using a patch to
protobuf.js to get it to output Javascript numbers instead of long.js
types, but now that our supported browser versions support bigint, it's
probably worth biting the bullet and migrating to bigint use. Our IDs
fit comfortably within MAX_SAFE_INTEGER, but that may not hold for future
fields we add.
- Oneofs are handled differently in protobuf-es, and are going to need
some refactoring.

Other notable changes:

- Added a --mkdir arg to our build runner, so we can create a dir easily
during the build on Windows.
- Simplified the preference handling code, by wrapping the preferences
in an outer store, instead of a separate store for each individual
preference. This means a change to one preference will trigger a redraw
of all components that depend on the preference store, but the redrawing
is cheap after moving the data processing to Rust, and it makes the code
easier to follow.
- Drop async(Reactive).ts in favour of more explicit handling with await
blocks/updating.
- Renamed add_inputs_to_group() -> add_dependency(), and fixed it not adding
dependencies to parent groups. Renamed add() -> add_action() for clarity.

* Remove a couple of unused proto imports

* Migrate card info

* Migrate congrats, image occlusion, and tag editor

+ Fix imports for multi-word proto files.

* Migrate change-notetype

* Migrate deck options

* Bump target to es2020; simplify ts lib list

Have used caniuse.com to confirm Chromium 77, iOS 14.5 and the Chrome
on Android support the full es2017-es2020 features.

* Migrate import-csv

* Migrate i18n and fix missing output types in .js

* Migrate custom scheduling, and remove protobuf.js

To mostly maintain our old API contract, we make use of protobuf-es's
ability to convert to JSON, which follows the same format as protobuf.js
did. It doesn't cover all case: users who were previously changing the
variant of a type will need to update their code, as assigning to a new
variant no longer automatically removes the old one, which will cause an
error when we try to convert back from JSON. But I suspect the large majority
of users are adjusting the current variant rather than creating a new one,
and this saves us having to write proxy wrappers, so it seems like a
reasonable compromise.

One other change I made at the same time was to rename value->kind for
the oneofs in our custom study protos, as 'value' was easily confused
with the 'case/value' output that protobuf-es has.

With protobuf.js codegen removed, touching a proto file and invoking
./run drops from about 8s to 6s.

This closes #2043.

* Allow tree-shaking on protobuf types

* Display backend error messages in our ts alert()

* Make sourcemap generation opt-in for ts-run

Considerably slows down build, and not used most of the time.
2023-06-14 22:47:37 +10:00
Christopher Woggon
fadeb99c99
Partially supporting 한글 (hangul, Korean characters) (#2533)
* Partially supporting 한글 (hangul, Korean characters)

* Externalized korean shortcuts to separate function

* formatting
2023-06-07 14:54:52 +10:00
Ren Tatsumoto
a378e2923e
Allow the user to configure answer keys (#2502)
* add methods that allow the user to configure answer keys

* allow editing answer buttons in preferences

* import optional

* Give the layout referenced in code a clearer name (dae)

* Update placeholder text and make it translatable (dae)

The other items in the preferences screen don't have tooltips, so
placeholder text may be easier for the user to discover than a tooltip.
2023-05-18 17:47:51 +10:00
Ren Tatsumoto
fef2844d45
Enchance reviewer with new settings (#2489)
* add grading shortcuts

* add a new setting: grade with space

* new key: u for undo

* run ./ninja format

* rename property

* rename translation

* run ./ninja format
2023-05-08 11:04:18 +10:00
Damien Elmes
0a0d17ff98 Update Python deps
- Black's formatting has changed
- Pylint has introduced a new lint
2023-03-31 14:04:05 +10:00
RumovZ
bd88c6d352
Ensure state mutator runs after card is rendered (#2421)
* Ensure state mutator runs after card is rendered

* Ensure ease buttons only show when states are ready

* Pass context into states mutator

* Revert queuing of state mutator hook

Now that context data is exposed users shouldn't rely on the question
having been rendered anymore.

* Use callbacks instead of signals and timeout

... to track whether the states mutator ran or failed.

* Make mutator async

* Remove State enum

* Reduce requests and compute seed on backend
2023-03-16 16:31:00 +10:00
evandrocoan
d9f1e22648
Create the hook will_show_web to control html5 media elements with Javascript (#2340)
* Replaced ankimedia object directly call by addon specific hook

# Conflicts:
#	qt/aqt/browser/previewer.py
#	qt/aqt/clayout.py
#	qt/aqt/reviewer.py

* Replaced ankimedia.js by addon specific hook

# Conflicts:
#	qt/aqt/browser/previewer.py
#	qt/aqt/clayout.py
#	qt/aqt/main.py

* Create specific location name for each hook to reuse control

* Created the card_review_webview_did_init hook

* Extended the hook card_will_show to replace will_show_web

The new hook card_will_show_state takes three new arguments

* Created the hook audio_did_pause_or_unpause to replace will_show_web

The new hook is called when audio toggle pause is called

* Created the hook audio_will_replay to replace will_show_web

The new hook is called when the audio is replayed by the user.

* Created the hook previewer_will_redraw_after_show_both_sides_toggled

to replace will_show_web.
The new hook fully replaces the last uses of will_show_web.

* Replaced card_will_show_state hook with reviewer_did_init and

equivalents. Instead of receiving the required state, it access it
by caching the object values with hooks as reviewer_did_init.
2023-02-13 14:50:26 +10:00
Damien Elmes
2c952cf3af Wrap expected text in code block when no answer provided 2023-02-02 18:01:23 +10:00
Damien Elmes
6b7d372ca9 Skip answer comparison if the user didn't type anything 2023-01-28 21:54:16 +10:00
Damien Elmes
19bbcb4cc0 Use backend for extracting cloze text to type
Closes #2311
2023-01-18 23:05:28 +10:00
Matthias Metelka
f169ee0933
Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289)
* Create widget gallery dialog

* Add WidgetGallery to debug dialog

* Use enum for its intended purpose

* Rename "reduced-motion" to "reduce-motion"

* Add another border-radius value

and make former large radius a bit smaller.

* Revamp preferences, add minimalist mode

Also:
- create additional and missing widget styles and tweak existing ones
- use single profile entry to set widget styles and reduce choices to Anki and Native

* Indent QTabBar style definitions

* Add missing styles for QPushButton states

* Fix QTableView background

* Remove unused layout from Preferences

* Fix QTabView focused tab style

* Highlight QCheckBox and QRadioButton when focused

* Fix toolbar styles

* Reorder preferences

* Add setting to hide bottom toolbar

* Move toolbar settings above minimalist modes

* Remove unused lines

* Implement proper full-screen mode

* Sort imports

* Tweak deck overview appearance in minimalist mode

* Undo TitledContainer changes

since nobody asked for that

* Remove dynamic toolbar background from minimalist mode

* Tweak buttons in minimalist mode

* Fix some issues

* Reduce theme check interval to 5s on Linux

* Increase hide timer interval to 2s

* Collapse toolbars with slight delay when moving to review state

This should ensure the bottom toolbar collapses too.

* Allow users to make hiding exclusive to full screen

* Rename full screen option

* Fix hide mode dropdown ignoring checkbox state on startup

* Fix typing issue

* Refine background image handling

Giving the toolbar body the main webview height ensures background-size: cover behaves exactly the same.

To prevent an override of other background properties, users are advised to only set background-images via the background-image property, not the background shorthand.

* Fix top toolbar getting huge when switching modes

The issue was caused by the min-height hack to align the background images. A call to web.adjustHeightToFit would set the toolbar to the same height as the main webview, as the function makes use of document.offsetHeight.

* Prevent scrollbar from appearing on bottom toolbar resize

* Cleanup

* Put review tab before editing; fix some tab orders

* Rename 'network' to 'syncing'

* Fix bottom toolbar disappearing on UI > 100

* Improve Preferences layout by adding vertical spacers to the bottom

also make the hiding of video_driver and its label more obvious in preferences.py.

* Fix bottom toolbar animating on startup

Also fix bottom toolbar not appearing when unchecking hide mode in reviewer.

* Hide/Show menubar in fullscreen mode along with toolbar

* Attempt to fix broken native theme on macOS

* Format

* Improve native theme on other systems by not forcing palette

with the caveat that theme switching can get weird.

* Fix theme switching in native style

* Remove redundant condition

* Add back check for Qt5 to prevent theme issues

* Add check for macOS before setting fusion theme

* Do not force scrollbar styles on macOS

* Remove all of that crazy theme logic

* Use canvas instead of button-bg for ColorRole.Button

* Make sure Anki style is always based on Fusion

otherwise we can't guarantee the same look on all systems.

* Explicitly apply default style when Anki style is not selected

This should fix the style not switching back after it was selected.

* Remove reduncant default_palette

* Revert 8af4c1cc2

On Mac with native theme, both Qt5 and Qt6 look correct already. On
the Anki theme, without this change, we get the fusion-style scrollbars
instead of the rounded ones.

* Rename AnkiStyles enum to WidgetStyle

* Fix theme switching shades on same theme

* Format

* Remove unused placeholderText

that caused an error when opening the widget gallery on Qt5.

* Check for full screen windowState using bitwise operator

to prevent error in Qt5.

Credit: https://stackoverflow.com/a/65425151

* Hide style option on Windows

also exclude native option from dropdown just in case.

* Format

* Minor naming tweak
2023-01-18 21:24:16 +10:00
Matthias Metelka
9f8667fb47
Auto-hide toolbar in Reviewer (#2262)
* Give webviews a slide-in animation

if reduced motion isn't set.

* Auto-hide toolbar in review mode

moving the mouse above the main webview expands the toolbar. When the mouse leaves the toolbar, it will collapse after a delay of 2s.

* Save some space on bottom toolbars

* Use props for all hard-coded transition durations

and decrease most commonly used duration (200ms) to 150ms.

* Move auto-hide logic into ToolbarWebView

and handle auto-hide specific events in the respective webview subclasses.

* Fix typing issues

* Fix flickering issue

* Add auto_hide_toolbar opt-in to preferences

* Rename hide_toolbar to collapse_toolbar

to better describe the dock-like behaviour.

* Rename setting to minimize_distractions

* Reduce calls to pm in eventFilter

* Run formatter

* Revert setting title to something more specific

* Increase default animation time to 180ms

* Inset toolbar in review mode

when auto-hide is not enabled.

* Use card background on toolbar and add glass effect

* Use flatten/elevate over inset/outset

* Use flatten/elevate over inset/outset

* Update toolbar.py

* Fix toolbar background delay

* Tweak styles

* Use "collapse" instead of "auto-hide"

* Fix background misalignment in collapse mode

* Do not collapse toolbar when pointer is outside MainWebView

* Reduce hide_timer interval to 1000ms

* Use CSS to hide toolbar instead of setting webview height

* Add guard to prevent backdrop-filter: blur on Qt 5.14

* Apply transition to body instead of toolbar

to not complicate things for #2301.

* Fix Qt 5.14 and apply guard globally

* Fix background image scaling difference

* Tweak preference wording (dae)
2023-01-09 14:39:31 +10:00
Matthias Metelka
6481899454
Fix some more RTL issues (#2244)
* Swap flag and mark indicator position in RTL mode

* Make buttons of bottom toolbar align to edge of screen in RTL mode

* Use start instead of left and end instead of right
2022-12-08 22:29:56 +10:00
Stefan Kangas
5551a37f03
Fix typos (#2210) 2022-11-24 20:18:57 +10:00
Matthias Metelka
7768262086
Remove unneeded spacers (#2208) 2022-11-23 16:35:23 +10:00
Hikaru Y
dc4ac1da66
Add tooltip to 'More' button to show keyboard shortcut (#2193)
* Add tooltip to 'More' button to show keyboard shortcut

* Remove unused 'rem' key
2022-11-17 10:03:38 +10:00
Matthias Metelka
1478801e4a
Fix indicator positioning of Reviewer bottom toolbar (#2157)
* Prevent interval indicators from wrapping

* Move indicators inside and relative to their buttons

* Move due indicators into answer buttons
2022-11-02 18:18:21 +10:00
Matthias Metelka
0c340c4f74
Add comments to Sass variables and tweak main window (#2137)
* Prevent multiple inclusion of variables in CSS files

* Use dict instead of tuple for variables

* Add comments to variables

* Improve appearance of main window

* Tweak main window styles

* Use json.dumps over pprint.format

* Make study button primary

* Improve header margin

* Make bottom toolbar slimmer

* Make congrats page more balanced

* Fix type issue

* Replace day/night with light/dark

* Exclude top-level-drag-row from hover effect

* Create dataclass for variables

* Run formatter

* Apply CSS variables from Python side

Why go full-circle with the Sass variables? This way we only need one interface for add-on authors to interact with. It also makes it easier for us to apply additional themes in the future.

* Fix typing

* Fix rgba values in Qt

* Darken button background

* Fix palette not being applied in light theme

For some odd reason this problem arose much later than #2016.

* Tweak default button look

* Reformat

* Apply CSS vars to ts pages

* Include elevation in button_mixins_lib

* Cast opacity to int

* Add some margin to studiedToday info

* Tweak light theme button gradient

* Tweak highlight-bg for light theme

* Add back default button color

as it made the browser sidebar tool icons dark in light theme.

* Reformat

* Tweak light theme buttons once more

Sorry for the back-and-forth. Sass only compiles when there are changes in user files, not when I only change the vars.

* Fix bottom toolbar button indicators

* Make buttons more clicky

* Fix button padding

* Handle macOS separately again

* Decrease elevation effect for main window buttons to 1

* Imitate box-shadow for Qt elements

* Adjust shadow vars

* Adjust primary border color

because the save button in the deck options had a lighter color than its background gradient.

* Boost box-shadow color of primary buttons

* Format

* Adjust Qt box-shadow imitation and shadow colors

* Use more subtle default shadow color

* Add some more padding to top toolbar

* Revert "Apply CSS vars to ts pages"

This reverts commit 5d8e7f6b7ffc8894b6517ecbb8cfba35407fc69a.

* Revert "Apply CSS variables from Python side"

This reverts commit 87db774412fd2bfd75e2630d2c5e782daef96b5f.

* Better match the standard macOS buttons

In the dark theme the standard color is a lighter grey, but at least
the size/shape is similar again.

This doesn't work for the editor buttons.

* Reduce the top margin of the congrats screen

* Fix illegible buttons when changing theme on macOS; match dark button style
2022-10-29 10:48:53 +10:00
Hikaru Y
76065e843b
Fix scrolling with keys / keyboard event listeners not working on answer side (#2099)
* Revert "Fix reviewer shortcuts being inaccessible due to IME"

This reverts commit 5bf031f1e3.

* Work around WebEngine/IME bug in Qt6
2022-10-03 12:53:09 +10:00
Damien Elmes
5bf031f1e3 Fix reviewer shortcuts being inaccessible due to IME
Only tested on Windows, but hopefully resolves the Linux issue as well.

Closes #1952
2022-09-17 14:15:07 +10:00
RumovZ
e39fb74e82
Enable state-dependent custom scheduling data (#2049)
* Enable state-dependent custom scheduling data

* Next(Card)States -> SchedulingStates

The fact that `current` was included in `next` always bothered me,
and custom data is part of the card state, so that was a bit confusing
too.

* Store custom_data in SchedulingState

* Make custom_data optional when answering

Avoids having to send it 4 extra times to the frontend, and avoids the
legacy answerCard() API clobbering the stored data.

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2022-09-05 16:48:01 +10:00
RumovZ
31b7464c67
Add card meta for persisting custom scheduling state (#2040)
* Add card meta for persisting custom scheduling state

* Rename meta -> custom_data

* Enforce limits on size of custom data

Large values will slow down table scans of the cards table, and it's
easier to be strict now and possibly relax things in the future than
the opposite.

* Pack card states and customData into a single message

+ default customData to empty if it can't be parsed

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2022-09-02 11:22:49 +10:00
Damien Elmes
966d7f3760 Experimentally remove webview recycling
It was originally introduced for WebKit, and may no longer be pertinent
for Chromium.WebEngine.

https://forums.ankiweb.net/t/anki-glitch-showing-previous-card-answer-instead-of-new-card/12482/13
2022-08-30 21:52:22 +10:00
Damien Elmes
fc93ea3ecc Show a pop-up when the user tries to study with V1
Closes #1991
2022-08-19 12:43:17 +10:00
Damien Elmes
340da23104 Wrap type answer output in code tag; remove extra div
This would make more sense as a class on the outer div, but existing
templates reference code#typeans, so avoid breaking things for now.
2022-07-22 20:37:56 +10:00
Damien Elmes
1e0be26b7e Partially migrate type answer to backend
Partially completes #1068, and will allow mobile clients to drop
their separate diff-match-patch imports. Does not yet try to handle
case folding or combining-char stripping, and leaves some of the outer
HTML wrapping up to the frontend for now.

The logic for rendering the provided string has changed: missing chars
are now only inserted if they follow a correct section, and the original
text is shown instead of hyphens. This is an experiment, and can be
changed if it's not well received.
2022-07-22 19:28:34 +10:00
Mateus Etto
d7d9f51b68
Add reviewer suspend and bury hooks (#1967)
* Add reviewer suspend and bury hooks

* Empty commit

* Change my name in CONTRIBUTORS
2022-07-18 12:59:56 +10:00
Damien Elmes
32b9d34749 Add ellipsis to Forget action
https://forums.ankiweb.net/t/bug-card-browser-rmb-forget-label-should-end-with-ellipsis-because-it-displays-a-dialog/20851
2022-06-20 10:25:50 +10:00
Abdo
1bab947c9c
Fix JS drop event not firing in the reviewer (#1906)
* Allow webviews to opt in to default D&D handling

* Remove redundant webview.js include

* Block default drag & drop behavior in reviewing screens

* Fix mypy error
2022-06-10 23:33:53 +10:00
Abdo
638286a3fc
Add the reviewer_will_replay_recording hook (#1877) 2022-05-18 13:44:56 +10:00
Abdo
7c543eeb2f
Add the av_player_will_play_tags hook (#1842)
A general version of the reviewer_will_play_question_sounds and reviewer_will_play_answer_sounds hooks
2022-05-09 11:08:34 +10:00
Damien Elmes
27f2e39ff9
Drop default Show Answer/Good highlight (#1820)
Feedback welcome. Discussion at
https://forums.ankiweb.net/t/2-1-5-border-around-good/19175

Partially reverts 301c9587d1
2022-04-27 19:26:16 +10:00
RumovZ
b9c3b12f71
Optionally restore original position and reset counts when forgetting (#1714)
* Add forget prompt with options

- Restore original position
- Reset reps and lapses

* Restore position when resetting for export

* Add config context to avoid passing keys

* Add routine to fetch defaults; use method-specific enum (dae)

* Keep original position by default (dae)

* Fix code completion for forget dialog (dae)

Needs to be a symbolic link to the generated file
2022-03-09 16:51:41 +10:00
Damien Elmes
1165939271 Update Python deps, including stable Black
Black 22.1 made some changes that required some minor reformatting.
2022-02-25 15:26:16 +10:00
Damien Elmes
d52c36e920 Make flag changes undoable again
The previous change in 1871b57663 failed
to consider the browser refreshing case, as reported here:
https://forums.ankiweb.net/t/anki-2-1-50-beta-3-4/17501/30

I previously attempted to solve this by having SetFlag skip the queue
rebuild, then mutating the captured mtimes in the queues. That didn't
work correctly when undoing, as the queue mutations weren't recorded.
This approach combines that attempt and the previous change: flag
setting is an undoable operation again, but does not change the card's
modification time, so it can be applied/undone without a queue build
being required. Instead of special-casing flag changes in the review
screen, we now just redraw the flag on changes.card, as any other card
op will have triggered a queue rebuild.
2022-02-25 15:06:07 +10:00
roxgib
14af96d580
Remove .exec() from QMenus in Deck Browser, Reviewer, and Card Template screens (#1674)
* Call StudyDeck with callback

* StudyDeck w/ callback, remove redundant assignment

* Replace exec() with show() for various dialogs

* Update super init args for Models.__init__

* Make StudyDialog ApplicationModal

* Remove .exec() from various dialogs and menus
2022-02-18 17:18:29 +10:00
RumovZ
9c54f85be6
Import submodules directly (#1662)
* Use submodule imports in aqt

* Use submodule imports in pylib

* More submodule imports in pylib

These required removing some direct imports to get rid of import cycles.
2022-02-13 13:40:47 +10:00
Araceli Yanez
1e59ad6200
Add forget card to review context "more" menu (#1642)
* Add forget card to review context more menu

* Add to contributors
2022-02-07 19:56:31 +10:00
RumovZ
30dc2cf7ea
Add Create Copy to reviewer and use current card's deck (#1569)
* Use deck of current card when copying note

* Add Create Copy to reviewer menu

* Add ellipsis to Set Due Date
2021-12-31 16:45:30 +10:00
Damien Elmes
0d51b4db1f ensure multiple answer buttons don't get accepted when mashed in v3
We want to preserve the backend checks, because they may also detect
bugs. So we do the debouncing on the frontend instead, transitioning
into a temporary state until the background op completes.

https://forums.ankiweb.net/t/anki-2-1-50-beta/15608/74
2021-12-14 15:48:02 +10:00