mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Don't automatically disable add-ons
d7a0bc0d42 (commitcomment-130467314)
Also, make the pop-up non-modal so it can be left on screen as the user
navigates to the add-on screen.
This commit is contained in:
parent
7bc4c3b78f
commit
1b8f5496f9
2 changed files with 16 additions and 7 deletions
|
@ -5,9 +5,13 @@ addons-failed-to-load =
|
||||||
When loading '{ $name }':
|
When loading '{ $name }':
|
||||||
{ $traceback }
|
{ $traceback }
|
||||||
addons-failed-to-load2 =
|
addons-failed-to-load2 =
|
||||||
The following add-ons failed to load, so they have been disabled:
|
The following add-ons failed to load:
|
||||||
|
|
||||||
{ $addons }
|
{ $addons }
|
||||||
|
|
||||||
|
Use Tools>Add-ons to check for updates. For add-ons that don't have
|
||||||
|
an update available, you can disable or delete the add-on to prevent this
|
||||||
|
message from appearing.
|
||||||
|
addons-startup-failed = Add-on Startup Failed
|
||||||
# Shown in the add-on configuration screen (Tools>Add-ons>Config), in the title bar
|
# Shown in the add-on configuration screen (Tools>Add-ons>Config), in the title bar
|
||||||
addons-config-window-title = Configure '{ $name }'
|
addons-config-window-title = Configure '{ $name }'
|
||||||
addons-config-validation-error = There was a problem with the provided configuration: { $problem }, at path { $path }, against schema { $schema }.
|
addons-config-validation-error = There was a problem with the provided configuration: { $problem }, at path { $path }, against schema { $schema }.
|
||||||
|
|
|
@ -241,7 +241,6 @@ class AddonManager:
|
||||||
except AbortAddonImport:
|
except AbortAddonImport:
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
self.toggleEnabled(addon.dir_name, enable=False)
|
|
||||||
name = html.escape(addon.human_name())
|
name = html.escape(addon.human_name())
|
||||||
page = addon.page()
|
page = addon.page()
|
||||||
if page:
|
if page:
|
||||||
|
@ -252,16 +251,22 @@ class AddonManager:
|
||||||
|
|
||||||
if broken:
|
if broken:
|
||||||
addons = "\n\n- " + "\n- ".join(broken)
|
addons = "\n\n- " + "\n- ".join(broken)
|
||||||
addons = f"<div style='white-space: pre-wrap'>{addons}</div>"
|
|
||||||
error = tr.addons_failed_to_load2(
|
error = tr.addons_failed_to_load2(
|
||||||
addons=addons,
|
addons=addons,
|
||||||
)
|
)
|
||||||
txt = f"<h1>{tr.qt_misc_error()}</h1>{error}"
|
txt = f"# {tr.addons_startup_failed()}\n{error}"
|
||||||
showText(
|
html2 = markdown.markdown(txt)
|
||||||
txt,
|
print(html2)
|
||||||
|
(diag, _) = showText(
|
||||||
|
html2,
|
||||||
type="html",
|
type="html",
|
||||||
copyBtn=True,
|
copyBtn=True,
|
||||||
|
run=False,
|
||||||
)
|
)
|
||||||
|
from aqt import mw
|
||||||
|
|
||||||
|
# calling show immediately appears to crash
|
||||||
|
mw.progress.single_shot(1000, diag.show)
|
||||||
|
|
||||||
def onAddonsDialog(self) -> None:
|
def onAddonsDialog(self) -> None:
|
||||||
aqt.dialogs.open("AddonsDialog", self)
|
aqt.dialogs.open("AddonsDialog", self)
|
||||||
|
|
Loading…
Reference in a new issue