Damien Elmes
42a44875ab
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
b6e873b17b
move remaining Filter button items into sidebar
...
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
5d4e50c39e
fix Qt translations in macOS packaged build
2021-02-04 20:28:25 +10:00
Damien Elmes
9702532fc4
more typing updates
2021-02-02 23:31:55 +10:00
Damien Elmes
06fda14999
fix: Qt translations not working
...
Will need to manually confirm this is working in the bundled builds
2021-02-02 21:12:28 +10:00
RumovZ
b21d1dcbc0
Merge branch 'master' into dyn-deckconf
2021-02-01 23:33:41 +01:00
Damien Elmes
748aeb9df1
add a bunch of return types
2021-02-01 23:53:23 +10:00
RumovZ
2a82e43c0b
Make DialogManager accept kwargs
...
When opening a dialogue accepting multiple optional arguments, relying
on position is error-prone and requires passing Nones to fill unused
parameter slots.
2021-02-01 08:50:19 +01:00
RumovZ
23d1481d34
Make dyndeckconf a registered dialogue
2021-01-31 22:37:08 +01:00
Damien Elmes
a6be0f493b
start work on more clearly defining backend/protobuf boundaries
...
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py
Still todo:
- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00
Damien Elmes
6cc58451b1
add local sync server frontend
2021-01-13 11:42:00 +10:00
Henrik Giesel
b7556281d0
Open AddonsDialog via dialog manager
2020-12-26 18:07:37 +01:00
Damien Elmes
08b0c3aa5a
add video driver enum; allow setting angle+software on mac in prefs
2020-12-22 13:01:06 +10:00
Damien Elmes
b13f6d4931
document ANKI_PROFILE_CODE and add bazel command to run snakeviz
2020-12-17 12:03:24 +10:00
abdo
a313ec2fe7
Fix UnboundLocalError in profiler code
2020-11-25 04:54:41 +03:00
abdo
d06a9137b6
Set up default language before loading profile
...
We can make more strings translatable this way.
2020-11-21 05:29:23 +03:00
Damien Elmes
ebd1236ab0
strip out unused gettext refs
2020-11-18 13:22:51 +10:00
Damien Elmes
7e655614b2
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
ec74cf6730
handle packaged pylib buildinfo.txt; drop aqt buildinfo
2020-11-11 10:33:49 +10:00
Damien Elmes
74981145cf
formatting fix
...
formatting fix
2020-10-14 10:35:57 +10:00
Damien Elmes
2c36fde269
Update __init__.py
2020-10-14 09:45:34 +10:00
Andreas Reis
4e35b1780d
Add command-line argument to skip addons
...
Shift doesn't work for me occasionally, for whatever reason. So just add an -s to skip it that way.
(Also, update my github nick)
2020-10-14 01:31:07 +02:00
johan456789
a5b452780e
remove never used link
2020-10-10 00:07:34 +08:00
Damien Elmes
8729edffbb
update to latest black
2020-08-31 13:29:28 +10:00
Damien Elmes
aeca369c9b
update to latest isort, pylint and pytest
2020-08-31 12:05:36 +10:00
Damien Elmes
a2cbaa1ede
fix Windows packages failing to start
2020-08-06 09:05:26 +10:00
Damien Elmes
1e05595e3a
fix untyped def issues in aqt/__init__.py
2020-08-02 10:22:08 +10:00
Damien Elmes
f7eb3512a9
force stdout/stderr encoding to utf8
...
As a GUI app, Anki only uses these for debugging info, and we've been
bitten numerous times in the past by bugs caused by printing Unicode
when the console only supported ASCII. An ens var might have been
a better approach, but Pyinstaller does not support defining them before
Python is initialized from what I can tell.
Latest issue:
https://forums.ankiweb.net/t/crashing-anki-version-2-1-29-3f62c1f7/1650
2020-08-01 11:31:22 +10:00
Damien Elmes
1d1f5e1afc
apply AltGr workaround on qt 5.14 as well
2020-07-26 10:13:53 +10:00
Damien Elmes
4dff66cd10
formatting and debug statement tweak
2020-07-24 11:57:37 +10:00
Damien Elmes
5104c0fd1b
enable AltGr workaround by default
...
5.15.1 may still be another month away
2020-07-24 10:32:50 +10:00
Damien Elmes
876f474b7d
apply rtl dir to webviews
...
https://forums.ankiweb.net/t/gui-problems-with-right-to-left-languages/1205
2020-07-21 11:52:25 +10:00
Damien Elmes
c61f52d871
shift+click on the graphs button to access old graphs for now
2020-06-30 20:07:46 +10:00
evandrocoan
5d166f990d
Create the command line argument -v/--version to print version
...
https://forums.ankiweb.net/t/i-couldnt-open-anki-resetting-corrupt-global/190
2020-06-19 13:13:10 -03:00
Damien Elmes
82e7451136
handle unicode hostnames
...
https://anki.tenderapp.com/discussions/ankidesktop/41915-something-wrong-and-i-cant-start-anki
2020-06-01 13:40:17 +10:00
evandrocoan
c336b70ea5
Set to also print the correct QT log message category
2020-05-31 19:38:02 -03:00
evandrocoan
b72aecee36
Print qt context if it exists
...
https://stackoverflow.com/questions/42561295/qt-error-is-printed-on-the-console-how-to-see-where-it-originates-from
https://stackoverflow.com/questions/35894171/redirect-qdebug-output-to-file-with-pyqt5
https://anki.tenderapp.com/discussions/ankidesktop/42070-anki-closes-without-warning-when-importing-conflicting-shared-deck
https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler
2020-05-31 19:38:02 -03:00
Damien Elmes
bcb71bbf2d
Merge pull request #610 from evandroforks/ask_confirmation_before_moving_anki_collection
...
Ask user confirmation before moving the Anki directory
2020-05-18 19:44:27 +10:00
Damien Elmes
afdab1beef
save profile stats to file instead of generating report
...
Can use an external tool like snakeviz to query them after a run.
2020-05-16 12:53:01 +10:00
evandrocoan
008e5b5370
Set to restart Anki application after profile directory migration
...
Ask user confirmation before moving the Anki directory
https://github.com/ankitects/anki/pull 610
2020-05-10 18:30:58 -03:00
Damien Elmes
9c05ceb357
benchmark->profile, and remove from error branches
2020-05-05 16:28:49 +10:00
Damien Elmes
d2448fd957
Merge pull request #605 from evandroforks/benchmark_option
...
Created the --benchmark command line option
2020-05-05 16:23:00 +10:00
evandrocoan
9ec62edb2f
Created the ANKI_RUN_BENCHMARK environment variable replacing
...
the command line argument.
2020-05-04 23:46:13 -03:00
evandrocoan
3d737f3329
Fixed profiler word misspelling and stopped trimming the output
2020-05-04 23:15:23 -03:00
Damien Elmes
4d33b2d8f7
use qconnect everywhere, and fix some typing issues
...
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
evandrocoan
8a516d8541
Created the --benchmark command line option
...
https://anki.tenderapp.com/discussions/ankidesktop/41106-card-audio-playback-changes-bug-in-212x
Based on the snippet: https://gist.github.com/evandrocoan/961d46e10424e53ba8946fac66e0efac
2020-05-03 20:34:43 -03:00
Damien Elmes
5aba5c3ab9
drop the separate i18n backend
2020-03-20 21:15:23 +10:00
Glutanimate
ef8a87446c
Elaborate more on the use case and requirements for dialog registration
2020-03-07 17:43:21 +01:00
Glutanimate
5105d297ac
Allow add-ons to register custom dialogs with the dialog manager
2020-03-07 17:35:09 +01:00
Glutanimate
49fa1cbc59
Add cursory type annotations for aqt.DialogManager
...
Typing DialogManager._dialogs properly would require more extensive
changes which could break a number of add-ons
2020-03-07 17:29:37 +01:00