Commit Graph

1839 Commits

Author SHA1 Message Date
RumovZ
28402c7015 Improve toolbar styling for macOS 2021-03-09 08:50:01 +01:00
RumovZ
08c09bcb0f Remove edit mode 2021-03-08 11:55:15 +01:00
RumovZ
8d9072193c Enable drag for all sidebar items ...
... and set valid drop targets dynamically based on the current
selection.
2021-03-08 11:35:39 +01:00
RumovZ
f07890c178 Ask before removing tags from collection 2021-03-07 11:40:11 +01:00
RumovZ
6c4d6457fb Simplify multi deletion confirmation strings 2021-03-07 11:05:43 +01:00
RumovZ
f72daacae4 Only show edit actions with conform selection 2021-03-07 11:05:28 +01:00
RumovZ
23777eed67 Fix repainting in case of tree building exception 2021-03-07 09:47:17 +01:00
RumovZ
cce1b1f702 Remove context action dict
Now that almost all actions can be triggered from outside the context
menu and are available for more than one item type, it's easier to check
for available actions dynamically.
2021-03-05 12:22:49 +01:00
RumovZ
39dad049cd Fix children check in context tree actions 2021-03-05 10:27:44 +01:00
RumovZ
513e7bdfb4 Enable deleting via delete key 2021-03-04 18:31:35 +01:00
RumovZ
1f500c1fb8 Enable Enter/Return search in all modes ...
... but don't trigger search if the key closes the editor.
Also get rid of the on_click of the saved searches root which has
already been removed on main.
2021-03-04 17:40:12 +01:00
RumovZ
4ab9e6caef Ask for confirmation when overwriting saved search 2021-03-04 17:22:03 +01:00
RumovZ
6930ea24a9 Adjust sidebar tool icons to smaller size 2021-03-04 17:20:10 +01:00
RumovZ
5c6eea0d80 Make renamed item current (don't just select) 2021-03-03 23:00:37 +01:00
RumovZ
7d3d6edb26 Remove renaming dialogues from sidebar ...
... in favour of in-line editing. This is simpler and more ergonomic for
the user (and the programmer) but doesn't allow for editing parents
through text input (in the case of tags and decks).
2021-03-03 21:57:39 +01:00
RumovZ
bcc8a5ac3a Enable renaming templates from the sidebar 2021-03-03 18:09:53 +01:00
RumovZ
aa4576dd42 Enable renaming notetypes 2021-03-03 15:18:50 +01:00
RumovZ
65a2796a0e Enable group expanding/collapsing
Also, only show expand/collapse actions if they will have an effect.
2021-03-03 11:44:42 +01:00
RumovZ
61e61376a2 Make SidebarItem._is_extended a property 2021-03-03 11:43:31 +01:00
RumovZ
e2940de4a4 Escape backslashes in re.sub()'s repl 2021-03-03 09:20:02 +01:00
RumovZ
c0d77896da Add DECK_CURRENT as a SidebarItemType
Thus, disable renaming, deleting etc. for the current deck item.
As a consequence, editable is no longer needed as a field of SidebarItem
as it can be derived from its type.
2021-03-03 09:15:36 +01:00
RumovZ
adaea7227e Select and scroll to renamed/added sidebar item 2021-03-02 23:13:34 +01:00
RumovZ
25d57574c9 Enable removal of multiple tags from the sidebar 2021-03-02 11:05:16 +01:00
RumovZ
f4aeb0c097 Enable deleting multiple saved searches 2021-03-01 09:41:41 +01:00
RumovZ
e199bf0b47 Fix repainting when renaming tag via dialogue 2021-03-01 08:45:33 +01:00
RumovZ
30e7d705b6 Enable extended selection in edit mode 2021-03-01 08:45:03 +01:00
RumovZ
e83f0fef0f Fix Qt types 2021-02-28 22:36:31 +01:00
RumovZ
dc1711b630 Always return False from rename_node
setData expects a result but due to the asynchrony of the editor it
might not be known, yet.
2021-02-28 22:36:21 +01:00
RumovZ
1b8cebb8c5 Enable in-place editing of sidebar tags 2021-02-28 21:50:21 +01:00
RumovZ
d0b916a2ff Enable in-place editing of saved searches 2021-02-28 21:13:26 +01:00
RumovZ
0b83828508 Enable in-place editing of sidebar deck items 2021-02-28 21:03:19 +01:00
RumovZ
88c69665f3 Add support for multi deck deletion in python 2021-02-26 19:52:34 +01:00
RumovZ
2c25645975 Place sidebar tools right of search bar 2021-02-26 13:04:30 +01:00
RumovZ
f5981e94bf Add group search context action 2021-02-25 21:24:11 +01:00
RumovZ
172133299b Handle search on event level
Instead of assigning each sidebar item a lambda, add a field for search
representation and handle searching in event handler.
2021-02-25 19:57:12 +01:00
RumovZ
47e1e62967 Make search first (default) mode 2021-02-25 19:28:29 +01:00
RumovZ
4a1e995934 Add edit mode in sidebar 2021-02-25 13:12:51 +01:00
RumovZ
0889972bb0 Save last sidebar tool 2021-02-25 12:20:54 +01:00
RumovZ
fd784adc31 Add select and search modes to sidebar 2021-02-25 11:06:59 +01:00
RumovZ
17afcb094f Add toolbar to sidebar 2021-02-25 11:05:04 +01:00
RumovZ
9d3da3b844 Add icons for sidebar tools 2021-02-25 11:02:17 +01:00
Henrik Giesel
8aa8174d4b Fix scrollbar issue in anki-editable component in two ways
- using :host-context(.nightMode) allows for applying the nightmode
  scroll bar inside the component
- apply max-width: 100% to all element within editable, not just images
2021-02-23 15:52:20 +01:00
Damien Elmes
f41ec183c2
Merge pull request #1034 from abdnh/clayout-cloze-shortcuts
Shortcuts to preview clozes in card layout screen
2021-02-22 10:07:16 +10:00
abdo
39f3b6ce93 Shortcuts to preview clozes in card layout screen
Assign Alt+{number} to select cloze cards.
2021-02-21 14:46:53 +03:00
Damien Elmes
13f5ee1ddc tweak update message
- Since we need to show this to new users until AnkiDroid is updated,
use a wording that doesn't seem so out of place to new users.
- Avoid mentioning syncing, since the user may not sync, and the
modSchema() call will allow the user to confirm anyway.
- Let the user know they can change their mind about AnkiDroid by
visiting the preferences.
2021-02-21 19:47:26 +10:00
Damien Elmes
5ae66af5d2 rework v2 scheduler upgrade; drop downgrade
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.

Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
bluegreenmagick
d6eac551b1 change _on_click_current to _on_click_index
fix bug where clicking on a blank space below sidebar item
would still trigger currentIndex item's click event
2021-02-20 22:58:02 +09:00
Damien Elmes
2941503bea tweak getFile() arguments in editor to be more readable 2021-02-19 10:18:40 +10:00
Damien Elmes
654f4d65f7 disable card shifting in reposition by default
https://forums.ankiweb.net/t/uncheck-shift-position-of-existing-cards-by-default/7550
2021-02-19 10:09:01 +10:00
Damien Elmes
ab1e59a04d use add-on id if name is blank
https://forums.ankiweb.net/t/support-for-rtl-layout-in-ankiweb-add-on-page/7522
2021-02-16 11:12:05 +10:00