Damien Elmes
9720592519
temporary fix for error on deleting ( #1374 )
2021-09-20 22:02:44 +10:00
RumovZ
94b261f1ef
Simplify sidebar context menu separators
...
Qt can collapse consecutive menu separators, so no need to check if a
subroutine has actually added any actions to the menu.
2021-09-19 18:33:36 +02:00
RumovZ
40bad0f65d
Disable unusable browser actions on row change
2021-09-17 16:16:34 +02:00
Damien Elmes
b877026248
don't check state of current card when repositioning
...
closes #1365
2021-09-13 14:56:53 +10:00
RumovZ
d044360ff9
Disable 'Rename with Parents' for top-level items
2021-08-30 11:10:14 +02:00
Damien Elmes
528343b417
Merge pull request #1319 from abdnh/sidebar-scroll-center
...
Use PositionAtCenter for sidebar scrolling
2021-08-02 18:35:38 +10:00
Damien Elmes
f0b8b10314
Merge pull request #1311 from hikaru-y/flag-mark-icons-in-previewer
...
Show flag and mark icons in previewer
2021-08-02 18:33:36 +10:00
abdo
ad6f5c7404
Use PositionAtCenter for sidebar scrolling
2021-08-02 10:57:54 +03:00
Damien Elmes
68dddfe93b
prevent hiding of sidebar
...
https://forums.ankiweb.net/t/browser-format-issues/11504/10
2021-07-28 11:14:09 +10:00
hikaru-y
80e15ff6aa
Show flag and mark icons in previewer
2021-07-26 20:13:42 +09:00
RumovZ
0d45df8551
Fix browser search completer
...
Adding an empty entry at the top fixes
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/45
and allows for scrolling back to an empty line.
2021-07-17 12:23:19 +02:00
Damien Elmes
cba0735c59
Merge pull request #1297 from hgiesel/browsershortcuts
...
Allow Using Ctrl+Shift+P from Browser when focusing Qt components
2021-07-17 15:18:36 +10:00
Henrik Giesel
22e735266e
Remove unnecessary lambda
2021-07-17 04:17:28 +02:00
Henrik Giesel
fb56576e36
Allow Using Ctrl+Shift+P from Browser when focusing Qt components
2021-07-17 03:39:27 +02:00
Damien Elmes
ce5f9bb9b0
Merge pull request #1292 from hgiesel/reviewerplus
...
Move reviewer to ts/reviewer v2
2021-07-17 09:10:14 +10:00
hikaru-y
16a1eb05a2
Revert "Follow-up to #1271 (Preload answer images)"
2021-07-16 23:57:49 +09:00
Henrik Giesel
272f2f7d1a
Revert to MathJax through script tag
2021-07-16 16:56:57 +02:00
Henrik Giesel
ddf3adfc8e
Remove protobuf important from reiewer (no longer necessary (?))
2021-07-16 16:56:56 +02:00
Henrik Giesel
05771b7598
Include MathJax over ts/reviewer
2021-07-16 16:56:56 +02:00
Henrik Giesel
5cbb582d0b
Export jquery via ts/reviewer
2021-07-16 16:56:56 +02:00
Henrik Giesel
68ac505d81
Include css-browser-selector via ts/reviewer
2021-07-16 16:56:56 +02:00
Henrik Giesel
f203562c58
Include protobuf in clayout and browser (p)reviewer
2021-07-16 16:56:56 +02:00
Damien Elmes
96e6e216a7
Merge pull request #1293 from RumovZ/find-and-replace
...
Find & Replace
2021-07-16 10:47:16 +10:00
RumovZ
9f777ad009
Remove redundant QueryOp in rename_deck()
2021-07-15 08:56:47 +02:00
RumovZ
3a1f8d4241
Remove unused name prefix of sidebar templates
2021-07-13 16:41:50 +02:00
RumovZ
eab51dce40
Add sidebar actions
...
- Find & Replace for notetype fields
- Rename with Parents for decks and tags
2021-07-13 16:34:02 +02:00
RumovZ
a5193339e7
Rework Find & Replace dialog:
...
- Add option to affect whole collection
- Allow to open without selection
- Add parameter for presetting field
2021-07-13 16:33:45 +02:00
Damien Elmes
780a254ac8
Merge pull request #1291 from RumovZ/addon-cols
...
Show key of unknown browser columns
2021-07-13 13:35:54 +10:00
RumovZ
51af0ba7d4
Show key of unknown browser columns
2021-07-12 19:03:51 +02:00
RumovZ
e24f562f8c
Add mock browser model to support legacy resetting
2021-07-12 12:36:26 +02:00
Damien Elmes
e61a611af7
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
44ef810f67
Merge pull request #1277 from RumovZ/config-keys
...
Add constants for literal config keys
2021-07-07 09:14:40 +10:00
RumovZ
5067622751
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
09d1cc08c6
Follow-up to #1271
...
- remove no-longer-required 'escape_media_filenames()' 14110add
- clean up previewer.py
2021-07-05 01:13:17 +09:00
Damien Elmes
209a646d63
Merge pull request #1271 from hikaru-y/preload-images
...
Preload answer images
2021-07-04 15:50:55 +10:00
hikaru-y
9782d39ced
Preload images to be displayed on answer side
2021-07-03 21:33:00 +09:00
RumovZ
a5dacf0d0a
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
8edcc54aae
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
bcfbd2f680
Remove multiple icons, new notetype/cardtype icons
2021-07-01 01:12:11 +02:00
Henrik Giesel
fe7057b3f2
Remove name_prefix from field sidebar item
2021-06-30 21:02:23 +02:00
Henrik Giesel
803295341e
Replace card state and clock icon
2021-06-30 21:02:23 +02:00
Henrik Giesel
39075039de
Replace saved search icon
2021-06-30 21:02:23 +02:00
Henrik Giesel
aacf20531e
Add NOTETYPE_FIELD sidebar items
2021-06-30 21:02:23 +02:00
Henrik Giesel
6f201bdfe4
Add notetype icons
2021-06-30 21:02:23 +02:00
Henrik Giesel
da69a5e352
Add new icons for decks
2021-06-30 21:02:23 +02:00
Henrik Giesel
dedddd7f8d
Add tag_multiple icon
2021-06-30 21:02:23 +02:00
Damien Elmes
45b790ec3c
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
f8f6b828aa
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
ecabf35350
use inner function instead of return value in _expand_where_necessary()
2021-06-29 11:40:59 +10:00
abdo
33e6662dda
Scroll to first sidebar search match
2021-06-28 14:44:09 +03:00
RumovZ
19a36414e8
Fix id check for today
and card state
items
2021-06-28 12:55:59 +02:00
Damien Elmes
8942677c4b
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
1b15069b24
PEP8 collection.py
2021-06-27 15:12:22 +10:00
Damien Elmes
2a93355824
PEP8 cards.py
2021-06-27 12:12:23 +10:00
RumovZ
17009638c1
Add hook "browser_sidebar_will_show_context_menu"
2021-06-25 17:01:17 +02:00
RumovZ
72146c4b22
Fix expanding/collapsing tags triggering refresh
2021-06-24 17:27:53 +02:00
Damien Elmes
114eec6585
allow customization of default search text
...
https://forums.ankiweb.net/t/whats-the-default-search-when-browsing-now-also-how-do-i-choose-to-browse-current-deck/8922
2021-06-24 11:24:30 +10:00
Henrik Giesel
3aebae9f13
Allow inclusion of external icons into aqt/forms/icons
...
+ Replace old tag icon with mdi tag and tag-off icon
2021-06-16 17:19:21 +10:00
Henrik Giesel
c5faf39d7c
Make Browser root nodes use "_*" uniformly
2021-06-16 17:19:21 +10:00
Damien Elmes
61e86cc29d
new change notetype implementation for the frontend
...
- changes can now be undone
- the same field can now be mapped to multiple target fields, allowing
fields to be cloned
- the old Qt dialog has been removed
- the old col.models.change() API calls the new code, to avoid
breaking existing consumers. It requires the field map to always
be passed in, but that appears to have been the common case.
- closes #1175
2021-06-10 22:19:24 +10:00
Damien Elmes
2b8bbda55f
when focusing current card, position at top
...
trying out the changes mentioned on
https://github.com/ankitects/anki/pull/1222#discussion_r648051997
2021-06-09 21:01:29 +10:00
Damien Elmes
c5e56a5fe8
ensure current card centered even if it was already visible
...
Otherwise if a user reviews a card while keeping Browse open, the
card may not be centered if it was already in view.
2021-06-08 16:22:56 +10:00
Damien Elmes
afaaa763ec
don't wait before scrolling to current card
...
https://github.com/ankitects/anki/pull/1222#discussion_r647017566
2021-06-08 12:54:05 +10:00
Damien Elmes
1479957538
fix note changes triggering a queue rebuild
2021-06-08 12:09:35 +10:00
Damien Elmes
df600c094a
Merge pull request #1222 from RumovZ/browser-card
...
Change handling of browser's card parameter
2021-06-08 09:32:43 +10:00
RumovZ
8a9c9829e8
Change handling of browser's card parameter
...
If a search is provided execute it, else search for current deck.
Then try to select and scroll to the provided card.
2021-06-07 16:42:17 +02:00
Damien Elmes
e3ce9d05c7
add Rescheduled to Today section of sidebar
...
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/105
2021-06-05 12:55:07 +10:00
cherryblossom
92fe68abfe
fix documentation links
2021-06-03 16:51:03 +10:00
Damien Elmes
578b1b0552
Merge pull request #1213 from RumovZ/new-flags
...
Add pink, turquoise and purple flags
2021-06-02 11:22:26 +10:00
Damien Elmes
6e992752ca
prevent error storm when browser table encounters panic
2021-06-02 11:15:39 +10:00
RumovZ
5e7a47fdc7
Rename violet to pink
2021-06-01 18:14:43 +02:00
Damien Elmes
70d20dfbec
Merge pull request #1209 from RumovZ/drop-saved-search
...
Drag & drop for saved search
2021-06-01 17:50:55 +10:00
Damien Elmes
e124f935a5
fix timebox causing crash
...
When a modal was created with another window as its parent, the other
window was being returned, when it was the current window that we
actually wanted. This caused nextCard() to be called again when it
presented the timebox modal, leading to a stack overflow.
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/71
2021-06-01 15:35:18 +10:00
RumovZ
c97c6c6e98
Add violet, turquoise and purple flags
2021-05-31 12:03:30 +02:00
Damien Elmes
29c4869aef
remove deck protobuf from frontend
...
Like the previous change, avoid exposing the protobuf as a public API
for now. It requires more thought, and is probably better done with
either extra helper accessors like decks.name(), or via a native class.
2021-05-31 16:31:06 +10:00
RumovZ
c85ae24347
Make a new item the current item after refresh
2021-05-30 10:46:59 +02:00
RumovZ
985ce2466b
Skip saving search if it already exists
2021-05-30 10:11:40 +02:00
RumovZ
37fec02f88
Enable drop to create saved search
2021-05-30 09:30:22 +02:00
RumovZ
24b4f15038
Fix renaming of unused tag
...
Unused tags can't be renamed, but since the CollectionOp returns success
in any case, the provisionally renamed sidebar item needs to be reset.
2021-05-28 19:18:21 +02:00
RumovZ
2597038fe5
Prevent sidebar toolbar from folding
...
If there is little space, Qt replaces some tools of the toolbar with an
expandable menu indicated by an arrow. But this arrow is invisible in
night mode.
2021-05-28 18:09:44 +02:00
RumovZ
af50db9fd3
Fix restoring current sidebar element for cards
2021-05-28 17:46:46 +02:00
Damien Elmes
5a8f534f00
always start in first sidebar mode
...
I didn't notice anyone objecting; let's see how this is received.
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/35
2021-05-24 14:51:21 +10:00
Damien Elmes
adcdb422c5
config updates by the frontend now skip undo by default
2021-05-24 14:50:46 +10:00
Damien Elmes
a0eebb78ce
Merge pull request #1186 from RumovZ/ctx-actions
...
Update context action states after card op
2021-05-24 10:49:23 +10:00
RumovZ
ff76d50338
Remove browser.oneModelNotes()
2021-05-22 19:12:03 +02:00
RumovZ
0dca3ef548
Check notetype count in browser.onChangeModel()
2021-05-22 19:11:06 +02:00
RumovZ
29589fcf0d
Update context action states after card op
2021-05-22 08:35:47 +02:00
Damien Elmes
195c41cba3
Merge pull request #1185 from RumovZ/scrolling
...
Scroll pixels instead of columns horizontally
2021-05-22 10:59:09 +10:00
Damien Elmes
958c53d886
fix find&replace searching in incorrect field
2021-05-22 10:12:14 +10:00
RumovZ
d46fe913a5
Scroll pixels instead of columns horizontally
2021-05-21 18:59:53 +02:00
Damien Elmes
3d4cf26758
expose undoable config changes to frontend; refresh sidebar
...
The browser header handling still needs updating
2021-05-21 17:50:41 +10:00
Damien Elmes
99b7da49a9
report changed cards when changing deck/flag
...
+ fix repeated flag shortcut not toggling
2021-05-21 16:03:05 +10:00
RumovZ
5a6ba1b0b9
Move flags into separate module
2021-05-20 10:26:18 +02:00
RumovZ
6fb2d30426
Remove redundant pylint exception
2021-05-19 19:44:49 +02:00
RumovZ
5fa68c885a
Use dataclass instead of tuple for loaded flags
2021-05-19 19:17:43 +02:00
RumovZ
30736ddf75
Use custom flag labels for browser actions
2021-05-19 11:00:02 +02:00
RumovZ
9816227b5c
Make sidebar flags renamable
2021-05-19 10:04:40 +02:00
Damien Elmes
9f3f6bab7d
enable redo support
...
Also:
- fix issues where the Undo action in the Browse screen was not
consistent with the main window. The existing hook signature has been
changed; from a snapshot of the add-on code from a few months ago, it
was not a hook that was being used by anyone.
- change the undo shortcut in the Browse window to match the main
window. It was different because undoing a change in the editing area
could accidentally trigger an undo of an operation, but the damage is
limited now that (most) operations can be redone. If it still proves to
be a problem, perhaps we should just always swallow ctrl+z when an
editing field is focused.
2021-05-19 15:18:39 +10:00
Damien Elmes
fa47f6ec15
Merge pull request #1170 from RumovZ/fix-columns
...
Fix column issues
2021-05-18 09:24:15 +10:00
Damien Elmes
bd24005e08
PreviewDialog was missing from top level browser module
2021-05-18 09:10:28 +10:00