From 580d699161a74f6ed485085464d20151d0962860 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 16 Apr 2019 17:38:38 +1000 Subject: [PATCH] use dialog instead of tooltip if there's more than one log line --- aqt/addons.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/aqt/addons.py b/aqt/addons.py index c7a707eb4..da9107378 100644 --- a/aqt/addons.py +++ b/aqt/addons.py @@ -567,7 +567,11 @@ class AddonsDialog(QDialog): log, errs = self.mgr.processPackages(paths) if log: - tooltip("
".join(log), parent=self) + log_html = "
".join(log) + if len(log) == 1: + tooltip(log_html, parent=self) + else: + showInfo(log_html, parent=self, textFormat="rich") if errs: msg = _("Please report this to the respective add-on author(s).") showWarning("\n\n".join(errs + [msg]), parent=self, textFormat="plain") @@ -590,7 +594,11 @@ class AddonsDialog(QDialog): "\n" + "\n".join(names)): log, errs = self.mgr.downloadIds(updated) if log: - tooltip("
".join(log), parent=self) + log_html = "
".join(log) + if len(log) == 1: + tooltip(log_html, parent=self) + else: + showInfo(log_html, parent=self, textFormat="rich") if errs: showWarning("\n\n".join(errs), parent=self, textFormat="plain") @@ -648,7 +656,11 @@ class GetAddons(QDialog): log, errs = self.mgr.downloadIds(ids) if log: - tooltip("
".join(log), parent=self.addonsDlg) + log_html = "
".join(log) + if len(log) == 1: + tooltip(log_html, parent=self) + else: + showInfo(log_html, parent=self, textFormat="rich") if errs: showWarning("\n\n".join(errs), textFormat="plain")