Commit graph

1837 commits

Author SHA1 Message Date
RumovZ
f303f24c47 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
8b3539b009 Ask before removing tags from collection 2021-03-07 11:40:11 +01:00
RumovZ
a4d030e7b4 Simplify multi deletion confirmation strings 2021-03-07 11:05:43 +01:00
RumovZ
f30510371b Only show edit actions with conform selection 2021-03-07 11:05:28 +01:00
RumovZ
7e622d05de Fix repainting in case of tree building exception 2021-03-07 09:47:17 +01:00
RumovZ
2d5baac35d 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
c8b5689e47 Fix children check in context tree actions 2021-03-05 10:27:44 +01:00
RumovZ
837c305ece Enable deleting via delete key 2021-03-04 18:31:35 +01:00
RumovZ
ca7e3a4ddd 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
873a1897d1 Ask for confirmation when overwriting saved search 2021-03-04 17:22:03 +01:00
RumovZ
3b1af18b4f Adjust sidebar tool icons to smaller size 2021-03-04 17:20:10 +01:00
RumovZ
ee00c341c3 Make renamed item current (don't just select) 2021-03-03 23:00:37 +01:00
RumovZ
a09c09e1c1 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
dc4f9edc29 Enable renaming templates from the sidebar 2021-03-03 18:09:53 +01:00
RumovZ
4a4b02a0ea Enable renaming notetypes 2021-03-03 15:18:50 +01:00
RumovZ
3fbb8e83f0 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
4c061b398b Make SidebarItem._is_extended a property 2021-03-03 11:43:31 +01:00
RumovZ
0eddf1100a Escape backslashes in re.sub()'s repl 2021-03-03 09:20:02 +01:00
RumovZ
9f10d465c6 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
526532ab44 Select and scroll to renamed/added sidebar item 2021-03-02 23:13:34 +01:00
RumovZ
8b9b9d2b1e Enable removal of multiple tags from the sidebar 2021-03-02 11:05:16 +01:00
RumovZ
16817c81e4 Enable deleting multiple saved searches 2021-03-01 09:41:41 +01:00
RumovZ
97cca52be0 Fix repainting when renaming tag via dialogue 2021-03-01 08:45:33 +01:00
RumovZ
5fb370dfa9 Enable extended selection in edit mode 2021-03-01 08:45:03 +01:00
RumovZ
c1a0977519 Fix Qt types 2021-02-28 22:36:31 +01:00
RumovZ
22d1146b02 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
5523a72253 Enable in-place editing of sidebar tags 2021-02-28 21:50:21 +01:00
RumovZ
670bb4531b Enable in-place editing of saved searches 2021-02-28 21:13:26 +01:00
RumovZ
6b9e2fa485 Enable in-place editing of sidebar deck items 2021-02-28 21:03:19 +01:00
RumovZ
47d96a32e6 Add support for multi deck deletion in python 2021-02-26 19:52:34 +01:00
RumovZ
b7b7cd4b20 Place sidebar tools right of search bar 2021-02-26 13:04:30 +01:00
RumovZ
b127fb0fb3 Add group search context action 2021-02-25 21:24:11 +01:00
RumovZ
afb6b88128 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
25a9d08833 Make search first (default) mode 2021-02-25 19:28:29 +01:00
RumovZ
b2964d65bb Add edit mode in sidebar 2021-02-25 13:12:51 +01:00
RumovZ
fc4a2c05dd Save last sidebar tool 2021-02-25 12:20:54 +01:00
RumovZ
79c2856201 Add select and search modes to sidebar 2021-02-25 11:06:59 +01:00
RumovZ
a41b639d27 Add toolbar to sidebar 2021-02-25 11:05:04 +01:00
RumovZ
5a2bed7d8e Add icons for sidebar tools 2021-02-25 11:02:17 +01:00
Henrik Giesel
e2bda7273e 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
abd9d42869 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
f137c21d02 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
c2c5174bd2 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
125c2b232a 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
8c5ffa5c19 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
be823c39f0 tweak getFile() arguments in editor to be more readable 2021-02-19 10:18:40 +10:00
Damien Elmes
17396dc89b 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
0b2ee8dcff 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
Henrik Giesel
c2410ded9c Remove unused imports 2021-02-12 02:16:05 +01:00
Henrik Giesel
72253e129f Allow for passing in custom note type and template 2021-02-12 02:12:03 +01:00