Damien Elmes
2264fe3f66
Merge pull request #527 from Arthur-Milchior/explode_on_bridge_cmd
...
Explode on bridge cmd
2020-03-27 15:22:14 +10:00
Arthur Milchior
c9496ef095
Ensure that focus, key and blur are treated as other commands
...
The reason to do that is that I can then call blur/key from other
method in add-on.
More precisely, I expect to create a method which captures the blur
command, ask anki to execute the standard version of the command, and
then execute more code once the note contains the new field value.
I should note that the code executed during blur/key/focus itself
didn't change. It's only it's location which changed.
2020-03-26 15:42:27 +01:00
Damien Elmes
fe327e32ca
fix progress dialog preventing schema mod
...
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48183062
This is an ugly hack - in the future the calling code should be updated
to perform the check prior to starting the operation instead.
2020-03-26 21:07:53 +10:00
Damien Elmes
65b8988817
reduce the chances of add-ons preventing collections from loading
...
https://anki.tenderapp.com/discussions/ankidesktop/39953-sync-fail-with-images#comment_48182205
2020-03-26 09:53:15 +10:00
Arthur Milchior
9f4c4ea355
Explode onBridgeCmd
...
This way, an add-on can catch a blur command, do its change and then
call self.blur
2020-03-25 08:17:48 +01:00
Damien Elmes
818b9193a8
Merge pull request #523 from Arthur-Milchior/hook_note_will_load
...
Hook editor_note_will_load
2020-03-25 09:43:16 +10:00
Arthur Milchior
c1a8c413b0
remove space in fields
2020-03-24 12:26:48 +01:00
Arthur Milchior
3799b8504f
strip to test whether field is empty
2020-03-24 11:55:55 +01:00
Arthur Milchior
31f18e3c94
Hook editor_note_will_load
...
A current problem I have is that there is nothing similar to hook
inside of javascript. It seems that it would be easier to be able to
add other methods in javascript and call them in loadNote. Currently I
simply redefined loadNote, which is far from perfect
2020-03-24 10:17:01 +01:00
Damien Elmes
6143a7e218
Merge pull request #525 from Hk-tang/change-to-more-pythonic
...
Change not not to bool
2020-03-24 16:01:15 +10:00
Damien Elmes
a51dba7255
Merge pull request #524 from Arthur-Milchior/indet_html
...
Ident html in editor
2020-03-24 16:00:57 +10:00
Damien Elmes
483d50cba8
Merge pull request #522 from Arthur-Milchior/editor_did_init
...
editor_did_init
2020-03-24 15:52:50 +10:00
evandrocoan
6c8b005cab
Deprecated eval usage on qt/tools/typecheck-setup.sh
2020-03-23 18:54:24 -03:00
evandrocoan
b1b3e5b87c
Merge remote-tracking branch 'danielelmes/master' into fix_tests_on_windows
...
# Conflicts:
# .github/scripts/trailing-newlines.sh
2020-03-23 18:44:11 -03:00
Hk-tang
521b0e9e14
Change not not to bool
2020-03-23 11:16:39 -06:00
Arthur Milchior
0c39c4f106
add an id to name tab
2020-03-23 16:52:24 +01:00
Damien Elmes
b1a8107aa1
formatting
2020-03-23 19:54:01 +10:00
Damien Elmes
84eaf43525
reduce the chances of a race condition in mplayer code
...
Not perfect, it may still happen.
https://anki.tenderapp.com/discussions/ankidesktop/39832-an-error-occurred-audio
2020-03-23 19:15:32 +10:00
Damien Elmes
f889616ef1
don't pop up network errors for media sync
...
log them instead
2020-03-23 19:06:13 +10:00
Damien Elmes
f429986246
fix collection_did_load() not being called, and remove dead code
...
https://anki.tenderapp.com/discussions/ankidesktop/39765-_colloadingstate-is-never-run-thus-collection_did_load-hook-is-never-triggered
2020-03-23 18:57:23 +10:00
Damien Elmes
7d94465256
cache dark mode value so UI doesn't break when it changes
...
https://anki.tenderapp.com/discussions/ankidesktop/39550-cant-deactivate-night-mode-on-2121-for-mac
2020-03-23 18:39:37 +10:00
Damien Elmes
7a4f3d0318
dump more info in card()/bcard()
2020-03-23 18:39:00 +10:00
Arthur Milchior
349d145014
Ident html in editor
...
Sometime I like to print html to understand why it bugs. And I really
prefer to have html indented if it's okay with you. There is no change
appart from the identation and quotes
2020-03-23 08:15:48 +01:00
Damien Elmes
c615342130
fix English being shown in prefs for fully qualified langs like zh-CN
...
https://anki.tenderapp.com/discussions/ankidesktop/39845-a-new-bug-has-been-found
2020-03-23 16:08:06 +10:00
Damien Elmes
75b7ebb156
add back new_timezone_enabled(), as it's used in the prefs screen
2020-03-23 07:40:50 +10:00
Arthur Milchior
f2f92fb0c3
editor_did_init
...
That would be useful to add elements in the editor, such as in multi
column editor
2020-03-22 17:15:47 +01:00
Damien Elmes
99416477ac
allow customizing search order
2020-03-21 17:38:09 +10:00
Damien Elmes
dfa7f5e142
fix reversing sort order
2020-03-21 16:57:33 +10:00
Damien Elmes
9afbcd4178
remove old finder code; add search hooks to browser & remove old one
2020-03-21 16:38:46 +10:00
Damien Elmes
63ce44aaa7
enable sorting on the extra browser columns
2020-03-21 07:55:53 +10:00
Damien Elmes
9ee82d55b1
disable word wrap in browser rows
2020-03-20 21:15:23 +10:00
Damien Elmes
13f3719650
ensure endReset() is called even if an exception is raised
2020-03-20 21:15:23 +10:00
Damien Elmes
1318118461
flush config on sort order change
2020-03-20 21:15:23 +10:00
Damien Elmes
55c9f5dbeb
wait for media sync to complete before unloading collection
2020-03-20 21:15:23 +10:00
Damien Elmes
d03e13a1bd
reuse the existing backend instead of creating a new one
2020-03-20 21:15:23 +10:00
Damien Elmes
ba17567617
drop the separate i18n backend
2020-03-20 21:15:23 +10:00
Damien Elmes
8d429cd192
import .colpkg in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
ad9dad8748
import .apkg files in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
231fa30a86
import mapped files like csv in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
53952ba131
export in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
fa12213e98
move .reopen() to mw; fix exporting
2020-03-20 21:15:23 +10:00
Damien Elmes
fe59d11047
fix mypy warning
2020-03-20 21:15:23 +10:00
Damien Elmes
0f38514ad7
drop the DB progress handler code
...
This code was an awful hack to provide some semblance of UI
responsiveness while executing DB statements on the main thread.
Instead, we can just run DB statements in a background thread now,
keeping the UI responsive.
2020-03-20 21:15:23 +10:00
Damien Elmes
90d4d62c48
use a timer to automatically show progress window
...
We were previously relying on the DB progress hook to cause the
progress window to display.
Qt's progress dialogs do have built in support for automatically
showing, but it's easier to add a timer than change the existing
code to use it.
2020-03-20 21:15:23 +10:00
Damien Elmes
32555b2857
run Check DB in a background thread
...
Since the DB is now stored behind a mutex, we're no longer limited
to accessing the database on the main thread.
2020-03-20 21:15:23 +10:00
Damien Elmes
ae06b9e446
add Collection struct, and get media check working again
...
- media check no longer needs collection to be closed
- use savepoints for operations initiated by Rust, so they are
atomic without forcing a commit
2020-03-20 21:15:23 +10:00
Damien Elmes
6db4418f05
drop log= argument from Collection
2020-03-20 21:15:23 +10:00
Damien Elmes
f4d4078537
drop named sql arguments
2020-03-20 21:15:23 +10:00
Damien Elmes
c8b9afac0c
drop progress handler and timeout arg
2020-03-20 21:15:23 +10:00
Damien Elmes
0d43e9dca3
tweak add-on wording
2020-03-20 21:00:21 +10:00