Commit graph

3669 commits

Author SHA1 Message Date
Damien Elmes
8b273225ac
Merge branch 'main' into custom-colour-palette 2025-09-17 16:44:56 +10:00
Damien Elmes
321b21d6a0 Store colors in the collection
One minor tweak to the logic while I was there: an invalid color no
longer invalidates all the rest.
2025-09-17 16:39:01 +10:00
jcznk
ec6f09958a
(UI polish) Improved margins in Card Browser's "Previewer" (#4337)
* Improved margins in Card Browser's "Preview" pane

* Alternate approach that looks good on Mac too

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-09-17 15:30:22 +10:00
snowtimeglass
c2957746f4
Make timebox message translatable with flexible variable order (#4338)
* Make timebox message translatable with flexible variable order

Currently, the timebox dialog message is built from two separate strings,
each containing one variable:
"{ $count } cards studied in" + "{ $count } minutes."

As a result, translators cannot freely reorder the variables in their translations.

This change introduces a single string with both variables, allowing translators
to adjust the order for more natural expressions in their languages.

* Preserve old string for now

* Ensure message doesn't display over two lines

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-09-17 15:13:59 +10:00
jcznk
4506ad0c97
Prevent clipping for QPushButton:default (#4323) 2025-09-14 20:44:16 +03:00
llama
ed7228af30
restore custom colour palette on editor init 2025-09-10 00:30:18 +08:00
llama
2e466285f0
add SaveCustomColours rpc method 2025-09-10 00:29:38 +08:00
Damien Elmes
58deb14028 Ensure the newly-spawned terminal doesn't inherit the env var
It seems like the open call was leaking it into the newly spawned
process.

Follow-up fix to 2491eb0316
2025-09-04 16:18:11 +10:00
Damien Elmes
08431106da Exclude SSLKEYLOGFILE from Python
Closes #4308
2025-09-04 13:20:12 +10:00
Damien Elmes
b4b1c2013f Use the audio input device's preferred format
19f9afba64 broke recording for devices that
only support a single channel. Instead of hard-coding the values, we should
be using what the device prefers.

Apparently some devices may only support float formats, so conversion code
has been added to handle that case as well.

https://forums.ankiweb.net/t/cant-record-my-voice-after-upgrading-to-25-7-3/64453
2025-09-04 12:55:36 +10:00
Damien Elmes
b2ab0c0830 Add an experimental new system Qt mode to the launcher
Goal is to allow users to use their system Qt libraries that have
things like fcitx support available.

For #4313
2025-09-03 23:54:27 +10:00
Damien Elmes
6a985c9fb0 Add support for custom launcher venv locations
Closes #4305 when https://github.com/ankitects/anki-manual/pull/444 is
merged, and makes it easier to maintain multiple Anki versions at once.
2025-09-03 20:54:16 +10:00
Damien Elmes
db1d04f622 Centralize uv command setup
Closes #4306
2025-09-03 19:58:45 +10:00
Damien Elmes
2491eb0316 Don't reuse existing terminal process
May possibly help with #4304
2025-09-03 17:32:30 +10:00
Damien Elmes
06f9d41a96 Bypass install_name_tool invocation on macOS
Not sure when https://github.com/astral-sh/uv/issues/14893 will be
ready, and this seems to solve the problem for now.

Closes #4227
2025-09-03 17:32:30 +10:00
llama
8d5c385c76
use existing translation instead of adding new one (#4310) (#4316)
Co-authored-by: Abdo <abdo@abdnh.net>
2025-09-02 23:54:17 +03:00
llama
153b972dfd
Show the number of cards added when adding (#4310)
* modify `generate_cards_for_note` to return count

* modify `add_note` to return count

* show the number of cards added when adding
2025-09-02 18:06:49 +10:00
Damien Elmes
01b825f7c6 Fix theme/checkboxes when path contains an apostrophe
I couldn't find a list of other characters we might need to handle too.
I tested with ", but Qt failed to start then.

https://forums.ankiweb.net/t/qt-rendering-bug-in-check-boxes/66196
2025-09-02 15:55:37 +10:00
洩氏诹诹子
157da4c7a7
Fix mirror configuration not working during launcher download (#4280)
Use environment variable instead of configuration file
2025-09-02 14:58:34 +10:00
Lee Doughty
65ea013270
Update microphone icon to respect dark mode (#4297) 2025-09-01 17:56:48 +10:00
Abdo
79932aad41
Fix sync errors not being reported in some cases (#4281)
* Set parent of sync error dialog

* Explicitly mention parent arg in show_info() functions
2025-08-20 03:02:51 +10:00
Abdo
b92eabf4ae
Replace activeWindow() with activeModalWidget() (#4267) 2025-08-20 02:32:54 +10:00
Siyuan Yan
a3b3b0850d
Hi res microhpone icon for the recording dialog (#4262)
* Replace media-record.png with SVG icon

- Added SVG version of the microphone icon (from Font Awesome Free v7.0.0)
- Updated sound.py to use QIcon for proper SVG support
- Icon now displays at 60x60 pixels

* Remove obsolete media-record.png icon

The PNG icon has been replaced with an SVG version

* Update CONTRIBUTORS

* Replace icon with AnkiMobile's record icon

CC-BY requires attribution, and we don't currently have a way to describe
those attributions in a way the mobile clients can also include automatically.
For now, I've switched it to an icon I authored myself to avoid the issue.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-08-20 02:31:31 +10:00
Damien Elmes
78a3b3ef7b Expose control over AppNap for AnkiConnect
https://forums.ankiweb.net/t/recent-anki-updates-bundle-id-change-disabling-app-nap-macos-anki-connect/65550
2025-08-19 19:46:11 +10:00
Damien Elmes
8c7cd80245 Support socks proxies when fetching versions 2025-08-08 20:30:51 +10:00
Damien Elmes
68bc4c02cf Add mirror option to launcher; stop downloading automatically
To give users a chance to choose a mirror first, we have to give up
the automatic downloading on first run.

Closes #4226
2025-08-08 20:30:51 +10:00
llama
ab55440a05
Fix show_exception's messagebox always formatting as plaintext (#4246)
* fix show_exception's messagebox always formatting as plaintext

* Revert "fix show_exception's messagebox always formatting as plaintext"

This reverts commit aec6dd9be8.

* convert SearchError msg to markdown when in browser
2025-08-06 19:07:32 +10:00
Damien Elmes
8932199513 Possible fix for launcher failing to appear on some Linux systems
While testing the previous PR, I noticed that if stdout is set to None,
the same behaviour is shown as in the following report:
https://forums.ankiweb.net/t/cannot-switch-versions/64565

This leads me to wonder whether IsTerminal is behaving differently
on that user's system, and the use of an env var may be more reliable.
2025-07-28 21:53:44 +10:00
Damien Elmes
69d54864a8 Fix launcher display on Tools>Upgrade/Downgrade on Windows 10
Thanks to abdo:
https://forums.ankiweb.net/t/anki-25-08-beta-3/64738/6
2025-07-28 21:43:11 +10:00
Luc Mcgrady
1af3c58d40
Feat/Desired retention info graphs (#4199)
* backend part

* split memorised and cost

* slapdash frontend

* extract some simulator logic

* Add zoomed version of graph

* ./check

* Fix: Tooltip

* Fix: Simulator/workload transition

* remove "time"

* Update ts/routes/graphs/simulator.ts

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Added: Mode toggle

* Disable Dr in workload mode

* keep button order consistant between modes

* dont clear points on mode swap

* add review count graph

* Revert "dont clear points on mode swap"

This reverts commit fc89efb1d9.

* "Help me pick" button

* unrelated title case change

* Add translation strings

* fix: missing translation string

* Fix: Layout shift

* Add: Experimental

* Fix Time / Memorized

* per day values

* set review limit to 9999 on open

* keep default at currently set value

* Do DR calculation in parallel (dae)

Approx 5x faster on my machine

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-07-28 18:55:08 +10:00
Damien Elmes
661f78557f Fix sync server message failing to persist
It was disappearing immediately on macOS
2025-07-28 17:51:27 +10:00
Damien Elmes
7172b2d266 More launcher fixes
- The pyproject copy change broke the initial run case
- Avoid calling 'uv pip show' before venv created, as it causes
a pop-up prompting the user to install developer tools on macOS (#4227)
- Add a tip to the user about the unwanted install_name_tool pop-up
(Also tracked in #4227)
- Print 'Checking for updates...' prior to the potentially slow network
request
2025-07-25 23:34:50 +07:00
Damien Elmes
e2692b5ac9 Fix inability to upgrade/downgrade from a Python 3.9 version
Resolves AttributeError: module 'pip_system_certs.wrapt_requests' has no attribute 'inject_truststore'
2025-07-25 16:49:31 +07:00
Damien Elmes
177c483398 Stop copying updated pyproject/python pin on startup
The 'latest' and 'choose version' paths always read from the the
dist file these days, so the file doesn't need to be copied in advance.
The other reason for the current behaviour was so that when the user
manually installs a new launcher, it opens into the launcher on next
run, as that's probably what the user wanted. But this causes problems
when the launcher is updated automatically by things like homebrew.

https://forums.ankiweb.net/t/anki-homebrew-issues-terminal-and-crash-on-exit/64413/4
2025-07-25 15:40:00 +07:00
Damien Elmes
ca0459d8ee Use pip-system-certs when checking Anki versions 2025-07-24 21:56:15 +07:00
Damien Elmes
416e7af02b Pass --managed-python when fetching versions
Tentatively closes https://github.com/ankitects/anki/issues/4227
2025-07-24 21:32:23 +07:00
Damien Elmes
c74a97a5fa Increase default network timeout in launcher
https://forums.ankiweb.net/t/the-desktop-anki-app-cant-launch/64425/4
2025-07-24 20:34:43 +07:00
Damien Elmes
00bc0354c9 Provide better output when downloading versions fails
- include stdout/stderr when utf8_output() fails
- don't swallow the error returned by handle_Version_install_or_update
- skip codesigning when NODMG set

Closes #4224
2025-07-24 20:23:43 +07:00
llama
aee71afebe
set min size for card info dialog (#4221) 2025-07-24 18:55:47 +07:00
Damien Elmes
19f9afba64 Start requiring two channels for recording
Closes #4225
2025-07-24 18:49:29 +07:00
Damien Elmes
229337dbe0 Work around Conda breaking launcher
Closes #4216
2025-07-24 18:40:41 +07:00
Damien Elmes
aeaf001df7 Hack back in a fix for lack of ANSI codes on Windows 10
There must be a better way to do this, but someone more familiar
with Win32 internals than I will need to discover it.

https://forums.ankiweb.net/t/anki-25-08-beta/63645/61
2025-07-19 00:40:16 +07:00
Damien Elmes
a3da224511 Possible fix for error getting current version in launcher
https://forums.ankiweb.net/t/anki-25-08-beta/63645/68
2025-07-19 00:40:16 +07:00
Abdo
63ddd0e183
Fix wrong tab order in preferences (#4210) 2025-07-18 22:20:10 +07:00
Danika-Dakika
0b30155c90
Adding to about.py (#4211)
Adding a Hebrew translator.
2025-07-18 04:05:01 +03:00
Damien Elmes
4e29440d6a Version the launcher 2025-07-15 22:26:46 +07:00
Damien Elmes
15bbcdd568 Downgrade Chromium as potential rendering fix
https://forums.ankiweb.net/t/anki-25-08-beta/63645/57
2025-07-15 18:26:02 +07:00
Damien Elmes
12635f4cd2 Show Chromium version in About instead of PyQt version 2025-07-15 18:25:11 +07:00
Damien Elmes
834fb41015 Exclude VIRTUAL_ENV from environ as well
https://forums.ankiweb.net/t/anki-25-08-beta/63645/51
2025-07-15 17:03:51 +07:00
jcznk
4604bc7567
Add margin to QPushButton to prevent clipping (#4201)
* Update CONTRIBUTORS

* Add margin to QPushButton to prevent clipping
2025-07-13 22:21:31 +03:00