Damien Elmes
492137d264
Merge pull request #1291 from RumovZ/addon-cols
...
Show key of unknown browser columns
2021-07-13 13:35:54 +10:00
RumovZ
211f39836d
Show key of unknown browser columns
2021-07-12 19:03:51 +02:00
RumovZ
300ff08ad0
Add mock browser model to support legacy resetting
2021-07-12 12:36:26 +02:00
Damien Elmes
2238cdaa43
rename Config in protobuf to avoid conflict with module name
...
+ use the enum directly, instead of wrapping it in an object
Python code retains the old "Config" name.
2021-07-11 19:27:08 +10:00
Damien Elmes
e86e0a64ea
move proto files into separate py_library in same namespace
...
Will allow importing the Protobuf without pulling in the rest of
the library. This is not a full PEP420 namespace, and the wheel still
bundles everything - it just makes things easier in a Bazel workspace.
I originally tried with PEP420, but it required more invasive changes,
and I ran into issues with mypy.
2021-07-11 14:51:25 +10:00
Damien Elmes
3ca4ca397a
add workaround for protobufjs requiring uppercase package names
...
I mourn the time lost trying to track this down :-(
https://github.com/protobufjs/protobuf.js/issues/1014
We can't patch the minified file in dist without essentially duplicating
it, so this change also switches from the external file to including
the src file as part of the bundle.
2021-07-10 15:24:01 +10:00
Damien Elmes
bfa8ee6b96
more friendly message for v2 import into v1
2021-07-08 10:32:27 +10:00
Damien Elmes
af6a80c4ec
Merge pull request #1277 from RumovZ/config-keys
...
Add constants for literal config keys
2021-07-07 09:14:40 +10:00
RumovZ
e763745e05
Add pylib/browser.py for literal config keys
...
Also, remove config bools for sort order.
2021-07-05 12:44:48 +02:00
hikaru-y
00eaf63d41
Follow-up to #1271
...
- remove no-longer-required 'escape_media_filenames()' b21af06d
- clean up previewer.py
2021-07-05 01:13:17 +09:00
Damien Elmes
447bd2671c
Merge pull request #1273 from hgiesel/macshortcuts
...
Execute Ctrl+C/V/X/A via execCommand in editor
2021-07-04 16:02:52 +10:00
Damien Elmes
289845a049
remove old Mac shortcut code completely
...
The shortcuts seem to work correctly without it on Qt 5.14, so this
code seems to have only been required for older Qt releases.
2021-07-04 16:00:23 +10:00
Damien Elmes
29808094c8
Merge pull request #1271 from hikaru-y/preload-images
...
Preload answer images
2021-07-04 15:50:55 +10:00
Damien Elmes
d0480ff529
Merge pull request #1270 from RumovZ/flag-manager
...
Add flag manager and hook
2021-07-04 15:45:11 +10:00
Damien Elmes
b21af06d75
stop (un)escaping media filenames
...
Back in the WebKit days, images with Unicode filenames would fail to
appear if they weren't percent-escaped. This no longer seems to be the
case - with this patch, images appear correctly on the Mac and Windows
platforms I tested with.
Fixes https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/96
Fixes #1219
2021-07-04 15:27:29 +10:00
hikaru-y
bf93324448
Preload images to be displayed on answer side
2021-07-03 21:33:00 +09:00
Henrik Giesel
b74258f79e
Satisfy qt formatter
2021-07-03 01:54:10 +02:00
Henrik Giesel
5b2290f868
Execute Ctrl+C/V/X/A through execCommand in editor (so we can customize it)
2021-07-03 01:48:49 +02:00
RumovZ
94cc0cf901
Add flag manager and hook
...
'FlagManager' allows cached access to the flag objects, takes care of
renaming flags and notifies GUI components with the hook
'flag_label_did_change'.
2021-07-02 11:16:10 +02:00
Henrik Giesel
db4cbfcb26
More uniform file naming
...
kebap-case for .ts, .scss, .html, and directories
2021-07-01 12:24:16 +02:00
Henrik Giesel
01cc9df232
Add flag icons from mdi after all
...
- This way, we can also use their modifier versions with little pluses/minuses
2021-07-01 01:16:50 +02:00
Henrik Giesel
d5f8a6e50c
Remove multiple icons, new notetype/cardtype icons
2021-07-01 01:12:11 +02:00
Henrik Giesel
eec7eae885
Remove name_prefix from field sidebar item
2021-06-30 21:02:23 +02:00
Henrik Giesel
e1c171b819
Add missing type hint
2021-06-30 21:02:23 +02:00
Henrik Giesel
32f3c5dbe7
Replace card state and clock icon
2021-06-30 21:02:23 +02:00
Henrik Giesel
1850f24c4b
Replace saved search icon
2021-06-30 21:02:23 +02:00
Henrik Giesel
5031bafb61
Add NOTETYPE_FIELD sidebar items
2021-06-30 21:02:23 +02:00
Henrik Giesel
fecceb1997
Add notetype icons
2021-06-30 21:02:23 +02:00
Henrik Giesel
5fe2519619
Add new icons for decks
2021-06-30 21:02:23 +02:00
Henrik Giesel
d9a368631f
Add tag_multiple icon
2021-06-30 21:02:23 +02:00
Damien Elmes
309f5ee528
minor follow-up to #1257
...
No need for a separate argument, as we only want to scroll when
searching.
2021-06-29 11:53:10 +10:00
Damien Elmes
8743ccf682
Merge pull request #1257 from abdnh/sidebar-scroll-to-first-match
...
Scroll to first sidebar search match
2021-06-29 11:44:28 +10:00
Damien Elmes
2bada06570
use inner function instead of return value in _expand_where_necessary()
2021-06-29 11:40:59 +10:00
abdo
27313ba53d
Scroll to first sidebar search match
2021-06-28 14:44:09 +03:00
RumovZ
1be1ca5911
Fix id check for today and card state items
2021-06-28 12:55:59 +02:00
Damien Elmes
c0dccee9fa
Merge pull request #1252 from RumovZ/fix-tag-expand
...
Fix expanding/collapsing tags triggering refresh
2021-06-27 18:45:29 +10:00
Damien Elmes
f9560586cb
PEP8 collection.py
2021-06-27 15:12:22 +10:00
Damien Elmes
fba156ec93
PEP8 models.py
2021-06-27 14:30:00 +10:00
Damien Elmes
3c46c9a7eb
PEP8 decks.py
2021-06-27 14:02:48 +10:00
Damien Elmes
d6e3964151
PEP8 cards.py
2021-06-27 12:12:23 +10:00
Damien Elmes
d73231dbdc
PEP8 notes.py
...
An example of how we can start migrating the codebase to PEP8:
- enable invalid-name at the top
- use bazel run pylib:pylint to identify names that need renaming
- use PyCharm or similar to rename the functions/variables
- in the cases where the conversion is not just snake_case, use
.register_deprecated_aliases()
+ removed the __repr__() definition, it dumps all the note content
and obscures the error message
2021-06-26 11:38:59 +10:00
Damien Elmes
5d106a4c93
Merge pull request #1254 from RumovZ/sidebar-menu-hook
...
Add hook "browser_sidebar_will_show_context_menu"
2021-06-26 08:42:59 +10:00
Damien Elmes
f9dd95254b
revert to % format string to avoid breaking add-on
...
partially reverts 3572f0a0c6
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/50
2021-06-26 08:39:16 +10:00
Damien Elmes
3670a291a9
fix error when user confirms adding cloze to basic type
2021-06-26 08:35:24 +10:00
RumovZ
5cc2932fcb
Add hook "browser_sidebar_will_show_context_menu"
2021-06-25 17:01:17 +02:00
RumovZ
7a82ea01b8
Fix expanding/collapsing tags triggering refresh
2021-06-24 17:27:53 +02:00
hikaru-y
95a8d140e4
Set background-color of body to var(--window-bg)
...
required to emulate day mode in clayout
if background-color is not set in .card styling
2021-06-24 23:47:14 +09:00
hikaru-y
2ed9f69cd7
Toggle night-mode class of documentElement when action triggered
2021-06-24 23:47:06 +09:00
hikaru-y
754e7c753d
Set --window-bg of day/night mode to proper colors
...
including the following changes:
- rename "_getWindowColor" to "get_window_bg_color" to follow PEP8
- add "night_mode" argument to "get_window_bg_color"
- make it possible to get the correct colors regardless of the current theme
2021-06-24 23:46:48 +09:00
hikaru-y
3eb4321087
Store default palette before "fusion" QStyle is applied
...
Once a QStyle different from the system default is applied, the system default palette can no longer be retrieved with standardPalette().
2021-06-24 23:46:11 +09:00