Commit Graph

4487 Commits

Author SHA1 Message Date
Damien Elmes
6204a86879 tidy up sibling burying
closes #649
2020-06-01 13:48:15 +10:00
Damien Elmes
8516ed8655 handle images served from directory + svg content type
https://anki.tenderapp.com/discussions/ankidesktop/41974-win-linux-when-pasting-some-html-i-get-error-in-_run_command-ankirsbackendioerror-ioerror
2020-06-01 13:40:17 +10:00
Damien Elmes
caf95742da handle unicode hostnames
https://anki.tenderapp.com/discussions/ankidesktop/41915-something-wrong-and-i-cant-start-anki
2020-06-01 13:40:17 +10:00
Damien Elmes
f4004ad704
Merge pull request #648 from evandroforks/print_qt_context
Print qt context if it exists
2020-06-01 13:33:17 +10:00
Damien Elmes
8f9c6fbf95
Merge pull request #643 from evandroforks/add_repr_functions
Added __repr__ functions to common objects
2020-06-01 13:29:21 +10:00
Damien Elmes
859dbb7b49
Merge pull request #642 from evandroforks/add_card_debug_message
Say which card failed with an exception
2020-06-01 13:23:23 +10:00
evandrocoan
3318f23ff3 Say which card failed with an exception 2020-05-31 19:41:18 -03:00
evandrocoan
ef5c38dbc6 Added super().__repr__() to new __repr__() calls 2020-05-31 19:39:19 -03:00
evandrocoan
1e216e47ed Added __repr__ functions to common objects 2020-05-31 19:39:19 -03:00
evandrocoan
5bec874a7b Set to also print the correct QT log message category 2020-05-31 19:38:02 -03:00
evandrocoan
25ff525cc9 Print qt context if it exists
https://stackoverflow.com/questions/42561295/qt-error-is-printed-on-the-console-how-to-see-where-it-originates-from
https://stackoverflow.com/questions/35894171/redirect-qdebug-output-to-file-with-pyqt5
https://anki.tenderapp.com/discussions/ankidesktop/42070-anki-closes-without-warning-when-importing-conflicting-shared-deck
https://doc.qt.io/qt-5/qtglobal.html#qInstallMessageHandler
2020-05-31 19:38:02 -03:00
Damien Elmes
9594a3ef9b add some more names to about.py
If you've contributed and are missing from the list, please send me
a PR!
2020-06-01 06:27:14 +10:00
Damien Elmes
268edc237a
Merge pull request #645 from evandroforks/resize_clayout_editor_and_preview
Allow to resize clayout.py horizontal space between the text editor and the card preview
2020-06-01 05:53:40 +10:00
Damien Elmes
9e622294a0
Merge pull request #646 from evandroforks/restore_debug_console_geometry
Save and restore the debug console window geometry and splitter
2020-06-01 05:53:15 +10:00
evandrocoan
9257e75762 Save and restore the debug console window geometry and splitter 2020-05-30 20:58:55 -03:00
evandrocoan
6bd80fef67 Add saveSplitter and restoreSplitter to clayout.py
# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:57 -03:00
evandrocoan
a5fd8398c4 Allow to resize clayout.py horizontal space between the text editor
and the card preview.

# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:10 -03:00
Damien Elmes
cfc2a549f1
Merge pull request #641 from glutanimate/add-main-window-did-init-hook
Add main_window_did_init hook
2020-05-29 08:56:47 +10:00
Damien Elmes
36bc50d65f
Merge pull request #640 from evandroforks/fix_render_card_being_called_twice
Fixed previewer.py::render_card() being called twice in row
2020-05-29 08:48:35 +10:00
Damien Elmes
255ac3679b add maximize button to HTML editor
closes ankitects/help-wanted#1
2020-05-29 08:43:33 +10:00
Damien Elmes
f3a8bb28d5 fix progress window not disappearing when importing csv 2020-05-29 08:40:25 +10:00
Glutanimate
6147356330 Add main_window_did_init hook and clarify difference to profile_did_open 2020-05-28 13:30:22 +02:00
evandrocoan
f78166cda2 Fixed previewer.py::render_card() being called twice in row
Related to: https://github.com/ankitects/anki/pull 529
Ensuring "setNote" is called only once during changing of note type

After debugging the code, every time the cards changes, there are
two stacktraces generated and triggered when note cards change:

calling 1590591251.4621403
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 477, in <lambda>
    self.web.evalWithCallback("saveNow(%d)" % keepFocus, lambda res: callback())
  File "F:\anki\qt\aqt\browser.py", line 858, in <lambda>
    self.editor.saveNow(lambda: self._onRowChanged(current, previous))
  File "F:\anki\qt\aqt\browser.py", line 880, in _onRowChanged
    self._renderPreview(True)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )

calling 1590591251.4766161
   File "qt/runanki", line 4, in <module>
  File "F:\anki\qt\aqt\__init__.py", line 365, in run
    _run()
  File "F:\anki\qt\aqt\__init__.py", line 515, in _run
    app.exec()
  File "F:\anki\qt\aqt\webview.py", line 467, in handler
    cb(val)
  File "F:\anki\qt\aqt\editor.py", line 453, in oncallback
    gui_hooks.editor_did_load_note(self)
  File "F:\anki\qt\aqt\gui_hooks.py", line 1168, in __call__
    hook(editor)
  File "F:\anki\qt\aqt\browser.py", line 887, in onLoadNote
    self.refreshCurrentCard(editor.note)
  File "F:\anki\qt\aqt\browser.py", line 884, in refreshCurrentCard
    self._renderPreview(False)
  File "F:\anki\qt\aqt\browser.py", line 1576, in _renderPreview
    self._previewer.render_card(cardChanged)
  File "F:\anki\qt\aqt\previewer.py", line 136, in render_card
    print('calling', time.time(), "\n", "".join( traceback.format_stack() ) )
2020-05-27 14:41:07 -03:00
Damien Elmes
d60155bc92
Merge pull request #639 from sandersantema/master
add saveGeom and restoreGeom to htmlEditor and remove unused variable w
2020-05-27 21:30:51 +10:00
sandersantema
6a48add11f Add to contributors 2020-05-27 12:05:42 +02:00
sandersantema
8f993c8e31 remove unused variable 'w' from '_onHtmlEdit' 2020-05-27 12:04:49 +02:00
sandersantema
3407fb7b2b add saveGeom and restoreGeom to htmlEditor 2020-05-27 12:04:00 +02:00
Damien Elmes
835d1eb994
Merge pull request #637 from BlueGreenMagick/field-drag-drop-fix
fix drag drop field repositioning
2020-05-27 10:24:07 +10:00
Damien Elmes
4c89d0cc5e
Merge pull request #636 from BlueGreenMagick/typing-contextmenuevent
add evt type for contextMenuEvent method
2020-05-27 10:23:44 +10:00
Damien Elmes
7ef884d3b9
Merge pull request #635 from BlueGreenMagick/typing
add typehint for eventFilter method
2020-05-27 10:23:28 +10:00
Damien Elmes
befc75ce50
Merge pull request #634 from embe/master
don't install virtualenv
2020-05-27 10:22:54 +10:00
Damien Elmes
d04699ad06 try mpv on Windows again
https://github.com/ankitects/anki/pull/621
2020-05-27 09:21:41 +10:00
Damien Elmes
c37390ae14 apply mpv fix
c0d9544812
2020-05-27 09:19:20 +10:00
Damien Elmes
97618564f4 fix typechecking breaking with latest mypy_protobuf
the change that caused it:
https://github.com/dropbox/mypy-protobuf/issues/118

This is more awkward to handle now, as the types are only available
at type-checking time. Python's static typing is such a mess :-(
2020-05-27 09:14:02 +10:00
BlueGreenMagick
ce512014f2 do nothing if dropPos == idx
since such move won't change the field position
and when trying to move the field below itself
may lead to it being moved below the next field
2020-05-26 18:59:53 +09:00
BlueGreenMagick
6f3ebafc46 fix drag drop field repositioning 2020-05-26 18:27:38 +09:00
BlueGreenMagick
8f4469d5e9 add evt type for contextMenuEvent method 2020-05-26 17:12:39 +09:00
BlueGreenMagick
99663be358 add typehint for eventFilter method 2020-05-26 17:08:55 +09:00
Damien Elmes
f9f07a7d55 allow hook to modify search text 2020-05-25 16:54:57 +10:00
Damien Elmes
eb032c4efb update README.contributing 2020-05-25 15:43:26 +10:00
Damien Elmes
3e156911e7 avoid printing the original exception bytes
Prevents the "while processing this exception, another exception
occurred" message
2020-05-25 14:28:37 +10:00
Michał Bartoszkiewicz
08b49fc0df add myself to CONTRIBUTORS 2020-05-24 15:48:37 +02:00
Michał Bartoszkiewicz
50cf20aaae don't install virtualenv
virtualenv is not needed, as the built-in venv is actually used.
2020-05-24 14:58:41 +02:00
Damien Elmes
015de0c51f move generated methods into separate, gitignored file 2020-05-24 20:41:53 +10:00
Damien Elmes
c8d13209cd move dupe check to backend 2020-05-24 19:48:56 +10:00
Damien Elmes
d2dd619f18 fix rebuilding being done unnecessarily 2020-05-24 18:41:25 +10:00
Damien Elmes
6b05272ed4
Merge pull request #633 from hgiesel/dconf_hooks
Add three deck config hooks
2020-05-24 09:53:22 +10:00
Damien Elmes
38508c3ad7 use keyword args for calls with more than one argument 2020-05-24 09:12:47 +10:00
Damien Elmes
89dde3aeb0 migrate the remaining methods 2020-05-24 08:36:50 +10:00
Damien Elmes
4bf8175bcb migrate more scheduling/media/etc
almost there
2020-05-23 21:34:19 +10:00