From 7ba523f20d9409e99eaa6b945d1573d078087554 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 6 Nov 2015 15:48:12 -0600 Subject: [PATCH] Reduce over long error msgs when editing personal.ini(plugin). --- calibre-plugin/dialogs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calibre-plugin/dialogs.py b/calibre-plugin/dialogs.py index 5fb402b..2f57a28 100644 --- a/calibre-plugin/dialogs.py +++ b/calibre-plugin/dialogs.py @@ -1457,6 +1457,8 @@ class ViewLog(SizePersistedDialog): ## error = (lineno, msg) for (lineno, error_msg) in errors: # print('adding label for error:%s: %s'%(lineno, error_msg)) + if len(error_msg) > 200: + error_msg=error_msg[:200]+" ..." label = QLabel('%s: %s'%(lineno, error_msg)) label.setWordWrap(True) label.setStyleSheet("QLabel { margin-left: 2em; color : blue; } QLabel:hover { color: red; }");