mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
use dialog instead of tooltip if there's more than one log line
This commit is contained in:
parent
3592365762
commit
580d699161
1 changed files with 15 additions and 3 deletions
|
@ -567,7 +567,11 @@ class AddonsDialog(QDialog):
|
||||||
log, errs = self.mgr.processPackages(paths)
|
log, errs = self.mgr.processPackages(paths)
|
||||||
|
|
||||||
if log:
|
if log:
|
||||||
tooltip("<br>".join(log), parent=self)
|
log_html = "<br>".join(log)
|
||||||
|
if len(log) == 1:
|
||||||
|
tooltip(log_html, parent=self)
|
||||||
|
else:
|
||||||
|
showInfo(log_html, parent=self, textFormat="rich")
|
||||||
if errs:
|
if errs:
|
||||||
msg = _("Please report this to the respective add-on author(s).")
|
msg = _("Please report this to the respective add-on author(s).")
|
||||||
showWarning("\n\n".join(errs + [msg]), parent=self, textFormat="plain")
|
showWarning("\n\n".join(errs + [msg]), parent=self, textFormat="plain")
|
||||||
|
@ -590,7 +594,11 @@ class AddonsDialog(QDialog):
|
||||||
"\n" + "\n".join(names)):
|
"\n" + "\n".join(names)):
|
||||||
log, errs = self.mgr.downloadIds(updated)
|
log, errs = self.mgr.downloadIds(updated)
|
||||||
if log:
|
if log:
|
||||||
tooltip("<br>".join(log), parent=self)
|
log_html = "<br>".join(log)
|
||||||
|
if len(log) == 1:
|
||||||
|
tooltip(log_html, parent=self)
|
||||||
|
else:
|
||||||
|
showInfo(log_html, parent=self, textFormat="rich")
|
||||||
if errs:
|
if errs:
|
||||||
showWarning("\n\n".join(errs), parent=self, textFormat="plain")
|
showWarning("\n\n".join(errs), parent=self, textFormat="plain")
|
||||||
|
|
||||||
|
@ -648,7 +656,11 @@ class GetAddons(QDialog):
|
||||||
log, errs = self.mgr.downloadIds(ids)
|
log, errs = self.mgr.downloadIds(ids)
|
||||||
|
|
||||||
if log:
|
if log:
|
||||||
tooltip("<br>".join(log), parent=self.addonsDlg)
|
log_html = "<br>".join(log)
|
||||||
|
if len(log) == 1:
|
||||||
|
tooltip(log_html, parent=self)
|
||||||
|
else:
|
||||||
|
showInfo(log_html, parent=self, textFormat="rich")
|
||||||
if errs:
|
if errs:
|
||||||
showWarning("\n\n".join(errs), textFormat="plain")
|
showWarning("\n\n".join(errs), textFormat="plain")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue