Tue, 18 Sep 2018 19:23:07 +0200
CodeDocumentationViewer: simplified the front end handling
--- a/APIs/Python3/eric6.api Mon Sep 17 19:25:49 2018 +0200 +++ b/APIs/Python3/eric6.api Tue Sep 18 19:23:07 2018 +0200 @@ -9701,13 +9701,9 @@ eric6.UI.CodeDocumentationViewer.CodeDocumentationViewer.shutdown?4() eric6.UI.CodeDocumentationViewer.CodeDocumentationViewer.unregisterProvider?4(providerName) eric6.UI.CodeDocumentationViewer.CodeDocumentationViewer?1(parent=None) -eric6.UI.CodeDocumentationViewer.PlainTextDocumentationViewer.clear?4() -eric6.UI.CodeDocumentationViewer.PlainTextDocumentationViewer.preferencesChanged?4() -eric6.UI.CodeDocumentationViewer.PlainTextDocumentationViewer.setText?4(text) -eric6.UI.CodeDocumentationViewer.PlainTextDocumentationViewer?1(parent=None) -eric6.UI.CodeDocumentationViewer.WebViewDocumentationViewer.clear?4() -eric6.UI.CodeDocumentationViewer.WebViewDocumentationViewer.setHtml?4(html) -eric6.UI.CodeDocumentationViewer.WebViewDocumentationViewer?1(parent=None) +eric6.UI.CodeDocumentationViewer.DocumentationViewerWidget.clear?4() +eric6.UI.CodeDocumentationViewer.DocumentationViewerWidget.setHtml?4(html) +eric6.UI.CodeDocumentationViewer.DocumentationViewerWidget?1(parent=None) eric6.UI.CodeDocumentationViewerTemplate.prepareDocumentationViewerHtmlDocWarningDocument?4(text) eric6.UI.CodeDocumentationViewerTemplate.prepareDocumentationViewerHtmlDocument?4(documentationInfo) eric6.UI.CodeDocumentationViewerTemplate.prepareDocumentationViewerHtmlWarningDocument?4(text)
--- a/APIs/Python3/eric6.bas Mon Sep 17 19:25:49 2018 +0200 +++ b/APIs/Python3/eric6.bas Tue Sep 18 19:23:07 2018 +0200 @@ -143,6 +143,7 @@ DispositionParm str DispositionParmList UniqueNamespace DispositionType peg.List +DocumentationViewerWidget QWidget DotDesktopListSelectionDialog QDialog Ui_DotDesktopListSelectionDialog DotDesktopWizard QObject DotDesktopWizardDialog QDialog Ui_DotDesktopWizardDialog @@ -669,7 +670,6 @@ PipSelectionDialog QDialog Ui_PipSelectionDialog PixmapDiagram E5MainWindow PlainStrList list -PlainTextDocumentationViewer QWidget PluginActivationError PluginError PluginClassFormatError PluginError PluginDetailsDialog QDialog Ui_PluginDetailsDialog @@ -1011,7 +1011,6 @@ WebIconProvider QObject WebInspector QWebEngineView WebPluginFactory QWebPluginFactory -WebViewDocumentationViewer QWidget WidgetArea QMdiArea WidgetView QWidget WizardEricPluginWizard QObject
--- a/Documentation/Help/source.qhp Mon Sep 17 19:25:49 2018 +0200 +++ b/Documentation/Help/source.qhp Tue Sep 18 19:23:07 2018 +0200 @@ -2956,7 +2956,6 @@ <keyword name="CodeDocumentationViewer (Constructor)" id="CodeDocumentationViewer (Constructor)" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__init__" /> <keyword name="CodeDocumentationViewer (Module)" id="CodeDocumentationViewer (Module)" ref="eric6.UI.CodeDocumentationViewer.html" /> <keyword name="CodeDocumentationViewer.__selectProvider" id="CodeDocumentationViewer.__selectProvider" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__selectProvider" /> - <keyword name="CodeDocumentationViewer.__setHtml" id="CodeDocumentationViewer.__setHtml" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__setHtml" /> <keyword name="CodeDocumentationViewer.__setupUi" id="CodeDocumentationViewer.__setupUi" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__setupUi" /> <keyword name="CodeDocumentationViewer.__showDisabledMessage" id="CodeDocumentationViewer.__showDisabledMessage" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__showDisabledMessage" /> <keyword name="CodeDocumentationViewer.__unregisterTimerTimeout" id="CodeDocumentationViewer.__unregisterTimerTimeout" ref="eric6.UI.CodeDocumentationViewer.html#CodeDocumentationViewer.__unregisterTimerTimeout" /> @@ -4113,6 +4112,11 @@ <keyword name="DocStyleContext.start" id="DocStyleContext.start" ref="eric6.Plugins.CheckerPlugins.CodeStyleChecker.DocStyleChecker.html#DocStyleContext.start" /> <keyword name="DocumentationPlugins (Package)" id="DocumentationPlugins (Package)" ref="index-eric6.Plugins.DocumentationPlugins.html" /> <keyword name="DocumentationTools (Package)" id="DocumentationTools (Package)" ref="index-eric6.DocumentationTools.html" /> + <keyword name="DocumentationViewerWidget" id="DocumentationViewerWidget" ref="eric6.UI.CodeDocumentationViewer.html#DocumentationViewerWidget" /> + <keyword name="DocumentationViewerWidget (Constructor)" id="DocumentationViewerWidget (Constructor)" ref="eric6.UI.CodeDocumentationViewer.html#DocumentationViewerWidget.__init__" /> + <keyword name="DocumentationViewerWidget.__showLink" id="DocumentationViewerWidget.__showLink" ref="eric6.UI.CodeDocumentationViewer.html#DocumentationViewerWidget.__showLink" /> + <keyword name="DocumentationViewerWidget.clear" id="DocumentationViewerWidget.clear" ref="eric6.UI.CodeDocumentationViewer.html#DocumentationViewerWidget.clear" /> + <keyword name="DocumentationViewerWidget.setHtml" id="DocumentationViewerWidget.setHtml" ref="eric6.UI.CodeDocumentationViewer.html#DocumentationViewerWidget.setHtml" /> <keyword name="DotDesktopListSelectionDialog" id="DotDesktopListSelectionDialog" ref="eric6.Plugins.WizardPlugins.DotDesktopWizard.DotDesktopListSelectionDialog.html#DotDesktopListSelectionDialog" /> <keyword name="DotDesktopListSelectionDialog (Constructor)" id="DotDesktopListSelectionDialog (Constructor)" ref="eric6.Plugins.WizardPlugins.DotDesktopWizard.DotDesktopListSelectionDialog.html#DotDesktopListSelectionDialog.__init__" /> <keyword name="DotDesktopListSelectionDialog (Module)" id="DotDesktopListSelectionDialog (Module)" ref="eric6.Plugins.WizardPlugins.DotDesktopWizard.DotDesktopListSelectionDialog.html" /> @@ -12214,11 +12218,6 @@ <keyword name="PlainStrList.__convert" id="PlainStrList.__convert" ref="eric6.Globals.compatibility_fixes.html#PlainStrList.__convert" /> <keyword name="PlainStrList.__setitem__" id="PlainStrList.__setitem__" ref="eric6.Globals.compatibility_fixes.html#PlainStrList.__setitem__" /> <keyword name="PlainStrList.insert" id="PlainStrList.insert" ref="eric6.Globals.compatibility_fixes.html#PlainStrList.insert" /> - <keyword name="PlainTextDocumentationViewer" id="PlainTextDocumentationViewer" ref="eric6.UI.CodeDocumentationViewer.html#PlainTextDocumentationViewer" /> - <keyword name="PlainTextDocumentationViewer (Constructor)" id="PlainTextDocumentationViewer (Constructor)" ref="eric6.UI.CodeDocumentationViewer.html#PlainTextDocumentationViewer.__init__" /> - <keyword name="PlainTextDocumentationViewer.clear" id="PlainTextDocumentationViewer.clear" ref="eric6.UI.CodeDocumentationViewer.html#PlainTextDocumentationViewer.clear" /> - <keyword name="PlainTextDocumentationViewer.preferencesChanged" id="PlainTextDocumentationViewer.preferencesChanged" ref="eric6.UI.CodeDocumentationViewer.html#PlainTextDocumentationViewer.preferencesChanged" /> - <keyword name="PlainTextDocumentationViewer.setText" id="PlainTextDocumentationViewer.setText" ref="eric6.UI.CodeDocumentationViewer.html#PlainTextDocumentationViewer.setText" /> <keyword name="PlistReader" id="PlistReader" ref="eric6.Utilities.binplistlib.html#PlistReader" /> <keyword name="PlistReader (Constructor)" id="PlistReader (Constructor)" ref="eric6.Utilities.binplistlib.html#PlistReader.__init__" /> <keyword name="PlistReader.getSizedInteger" id="PlistReader.getSizedInteger" ref="eric6.Utilities.binplistlib.html#PlistReader.getSizedInteger" /> @@ -18279,11 +18278,6 @@ <keyword name="WebPluginInterface.isAnonymous" id="WebPluginInterface.isAnonymous" ref="eric6.Helpviewer.WebPlugins.WebPluginInterface.html#WebPluginInterface.isAnonymous" /> <keyword name="WebPluginInterface.metaPlugin" id="WebPluginInterface.metaPlugin" ref="eric6.Helpviewer.WebPlugins.WebPluginInterface.html#WebPluginInterface.metaPlugin" /> <keyword name="WebPlugins (Package)" id="WebPlugins (Package)" ref="index-eric6.Helpviewer.WebPlugins.html" /> - <keyword name="WebViewDocumentationViewer" id="WebViewDocumentationViewer" ref="eric6.UI.CodeDocumentationViewer.html#WebViewDocumentationViewer" /> - <keyword name="WebViewDocumentationViewer (Constructor)" id="WebViewDocumentationViewer (Constructor)" ref="eric6.UI.CodeDocumentationViewer.html#WebViewDocumentationViewer.__init__" /> - <keyword name="WebViewDocumentationViewer.__showLink" id="WebViewDocumentationViewer.__showLink" ref="eric6.UI.CodeDocumentationViewer.html#WebViewDocumentationViewer.__showLink" /> - <keyword name="WebViewDocumentationViewer.clear" id="WebViewDocumentationViewer.clear" ref="eric6.UI.CodeDocumentationViewer.html#WebViewDocumentationViewer.clear" /> - <keyword name="WebViewDocumentationViewer.setHtml" id="WebViewDocumentationViewer.setHtml" ref="eric6.UI.CodeDocumentationViewer.html#WebViewDocumentationViewer.setHtml" /> <keyword name="Whitespace" id="Whitespace" ref="eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html#Whitespace" /> <keyword name="Whitespace (Constructor)" id="Whitespace (Constructor)" ref="eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html#Whitespace.__init__" /> <keyword name="Whitespace.equal" id="Whitespace.equal" ref="eric6.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html#Whitespace.equal" />
--- a/Documentation/Source/eric6.UI.CodeDocumentationViewer.html Mon Sep 17 19:25:49 2018 +0200 +++ b/Documentation/Source/eric6.UI.CodeDocumentationViewer.html Tue Sep 18 19:23:07 2018 +0200 @@ -34,11 +34,8 @@ <td><a href="#CodeDocumentationViewer">CodeDocumentationViewer</a></td> <td>Class implementing a widget to show some source code information provided by plug-ins.</td> </tr><tr> -<td><a href="#PlainTextDocumentationViewer">PlainTextDocumentationViewer</a></td> -<td>Class implementing the plain text documentation viewer.</td> -</tr><tr> -<td><a href="#WebViewDocumentationViewer">WebViewDocumentationViewer</a></td> -<td>Class implementing the rich text documentation viewer.</td> +<td><a href="#DocumentationViewerWidget">DocumentationViewerWidget</a></td> +<td>Class implementing a rich text documentation viewer.</td> </tr> </table> <h3>Functions</h3> @@ -81,9 +78,6 @@ <td><a href="#CodeDocumentationViewer.__selectProvider">__selectProvider</a></td> <td>Private method to select a provider programmatically.</td> </tr><tr> -<td><a href="#CodeDocumentationViewer.__setHtml">__setHtml</a></td> -<td>Private slot to set the prepared HTML text.</td> -</tr><tr> <td><a href="#CodeDocumentationViewer.__setupUi">__setupUi</a></td> <td>Private method to generate the UI layout.</td> </tr><tr> @@ -148,16 +142,6 @@ <dd> name of the provider to be selected </dd> -</dl><a NAME="CodeDocumentationViewer.__setHtml" ID="CodeDocumentationViewer.__setHtml"></a> -<h4>CodeDocumentationViewer.__setHtml</h4> -<b>__setHtml</b>(<i>html</i>) -<p> - Private slot to set the prepared HTML text. -</p><dl> -<dt><i>html</i> (str)</dt> -<dd> -prepared HTML text -</dd> </dl><a NAME="CodeDocumentationViewer.__setupUi" ID="CodeDocumentationViewer.__setupUi"></a> <h4>CodeDocumentationViewer.__setupUi</h4> <b>__setupUi</b>(<i></i>) @@ -309,10 +293,10 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> -<a NAME="PlainTextDocumentationViewer" ID="PlainTextDocumentationViewer"></a> -<h2>PlainTextDocumentationViewer</h2> +<a NAME="DocumentationViewerWidget" ID="DocumentationViewerWidget"></a> +<h2>DocumentationViewerWidget</h2> <p> - Class implementing the plain text documentation viewer. + Class implementing a rich text documentation viewer. </p> <h3>Derived from</h3> QWidget @@ -327,26 +311,26 @@ <h3>Methods</h3> <table> <tr> -<td><a href="#PlainTextDocumentationViewer.__init__">PlainTextDocumentationViewer</a></td> +<td><a href="#DocumentationViewerWidget.__init__">DocumentationViewerWidget</a></td> <td>Constructor</td> </tr><tr> -<td><a href="#PlainTextDocumentationViewer.clear">clear</a></td> -<td>Public method to clear the contents.</td> +<td><a href="#DocumentationViewerWidget.__showLink">__showLink</a></td> +<td>Private slot to show the hovered link in a tooltip.</td> </tr><tr> -<td><a href="#PlainTextDocumentationViewer.preferencesChanged">preferencesChanged</a></td> -<td>Public slot to handle a change of preferences.</td> +<td><a href="#DocumentationViewerWidget.clear">clear</a></td> +<td>Public method to clear the shown contents.</td> </tr><tr> -<td><a href="#PlainTextDocumentationViewer.setText">setText</a></td> -<td>Public method to set the text to be shown.</td> +<td><a href="#DocumentationViewerWidget.setHtml">setHtml</a></td> +<td>Public method to set the HTML text of the widget.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> -<a NAME="PlainTextDocumentationViewer.__init__" ID="PlainTextDocumentationViewer.__init__"></a> -<h4>PlainTextDocumentationViewer (Constructor)</h4> -<b>PlainTextDocumentationViewer</b>(<i>parent=None</i>) +<a NAME="DocumentationViewerWidget.__init__" ID="DocumentationViewerWidget.__init__"></a> +<h4>DocumentationViewerWidget (Constructor)</h4> +<b>DocumentationViewerWidget</b>(<i>parent=None</i>) <p> Constructor </p><dl> @@ -354,76 +338,8 @@ <dd> reference to the parent widget </dd> -</dl><a NAME="PlainTextDocumentationViewer.clear" ID="PlainTextDocumentationViewer.clear"></a> -<h4>PlainTextDocumentationViewer.clear</h4> -<b>clear</b>(<i></i>) -<p> - Public method to clear the contents. -</p><a NAME="PlainTextDocumentationViewer.preferencesChanged" ID="PlainTextDocumentationViewer.preferencesChanged"></a> -<h4>PlainTextDocumentationViewer.preferencesChanged</h4> -<b>preferencesChanged</b>(<i></i>) -<p> - Public slot to handle a change of preferences. -</p><a NAME="PlainTextDocumentationViewer.setText" ID="PlainTextDocumentationViewer.setText"></a> -<h4>PlainTextDocumentationViewer.setText</h4> -<b>setText</b>(<i>text</i>) -<p> - Public method to set the text to be shown. -</p><dl> -<dt><i>text</i> (str)</dt> -<dd> -text to be shown -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="WebViewDocumentationViewer" ID="WebViewDocumentationViewer"></a> -<h2>WebViewDocumentationViewer</h2> -<p> - Class implementing the rich text documentation viewer. -</p> -<h3>Derived from</h3> -QWidget -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#WebViewDocumentationViewer.__init__">WebViewDocumentationViewer</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#WebViewDocumentationViewer.__showLink">__showLink</a></td> -<td>Private slot to show the hovered link in a tooltip.</td> -</tr><tr> -<td><a href="#WebViewDocumentationViewer.clear">clear</a></td> -<td>Public method to clear the shown contents.</td> -</tr><tr> -<td><a href="#WebViewDocumentationViewer.setHtml">setHtml</a></td> -<td>Public method to set the HTML text of the widget.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="WebViewDocumentationViewer.__init__" ID="WebViewDocumentationViewer.__init__"></a> -<h4>WebViewDocumentationViewer (Constructor)</h4> -<b>WebViewDocumentationViewer</b>(<i>parent=None</i>) -<p> - Constructor -</p><dl> -<dt><i>parent</i> (QWidget)</dt> -<dd> -reference to the parent widget -</dd> -</dl><a NAME="WebViewDocumentationViewer.__showLink" ID="WebViewDocumentationViewer.__showLink"></a> -<h4>WebViewDocumentationViewer.__showLink</h4> +</dl><a NAME="DocumentationViewerWidget.__showLink" ID="DocumentationViewerWidget.__showLink"></a> +<h4>DocumentationViewerWidget.__showLink</h4> <b>__showLink</b>(<i>urlStr</i>) <p> Private slot to show the hovered link in a tooltip. @@ -432,13 +348,13 @@ <dd> hovered URL </dd> -</dl><a NAME="WebViewDocumentationViewer.clear" ID="WebViewDocumentationViewer.clear"></a> -<h4>WebViewDocumentationViewer.clear</h4> +</dl><a NAME="DocumentationViewerWidget.clear" ID="DocumentationViewerWidget.clear"></a> +<h4>DocumentationViewerWidget.clear</h4> <b>clear</b>(<i></i>) <p> Public method to clear the shown contents. -</p><a NAME="WebViewDocumentationViewer.setHtml" ID="WebViewDocumentationViewer.setHtml"></a> -<h4>WebViewDocumentationViewer.setHtml</h4> +</p><a NAME="DocumentationViewerWidget.setHtml" ID="DocumentationViewerWidget.setHtml"></a> +<h4>DocumentationViewerWidget.setHtml</h4> <b>setHtml</b>(<i>html</i>) <p> Public method to set the HTML text of the widget.
--- a/UI/CodeDocumentationViewer.py Mon Sep 17 19:25:49 2018 +0200 +++ b/UI/CodeDocumentationViewer.py Tue Sep 18 19:23:07 2018 +0200 @@ -17,7 +17,7 @@ from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QTimer from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, \ - QComboBox, QSizePolicy, QLineEdit, QTextEdit, QToolTip + QComboBox, QSizePolicy, QLineEdit, QTextBrowser, QToolTip from E5Gui.E5TextEditSearchWidget import E5TextEditSearchWidget @@ -31,9 +31,9 @@ from .data import codeDocumentationViewer_rc # __IGNORE_WARNING__ -class PlainTextDocumentationViewer(QWidget): +class DocumentationViewerWidget(QWidget): """ - Class implementing the plain text documentation viewer. + Class implementing a rich text documentation viewer. """ def __init__(self, parent=None): """ @@ -42,66 +42,8 @@ @param parent reference to the parent widget @type QWidget """ - super(PlainTextDocumentationViewer, self).__init__(parent) - self.setObjectName("PlainTextDocumentationViewer") - - self.__verticalLayout = QVBoxLayout(self) - self.__verticalLayout.setObjectName("verticalLayout") - self.__verticalLayout.setContentsMargins(0, 0, 0, 0) - - self.__contents = QTextEdit(self) - self.__contents.setTabChangesFocus(True) - self.__contents.setReadOnly(True) - self.__contents.setLineWrapMode(QTextEdit.NoWrap) - self.__contents.setObjectName("contents") - self.__verticalLayout.addWidget(self.__contents) - - self.__searchWidget = E5TextEditSearchWidget(self, False) - self.__searchWidget.setFocusPolicy(Qt.WheelFocus) - self.__searchWidget.setObjectName("searchWidget") - self.__verticalLayout.addWidget(self.__searchWidget) - - self.__searchWidget.attachTextEdit(self.__contents, "QTextEdit") - - self.preferencesChanged() - - def clear(self): - """ - Public method to clear the contents. - """ - self.__contents.clear() - - def setText(self, text): - """ - Public method to set the text to be shown. - - @param text text to be shown - @type str - """ - self.__contents.setPlainText(text) - - def preferencesChanged(self): - """ - Public slot to handle a change of preferences. - """ - font = Preferences.getEditorOtherFonts("MonospacedFont") - self.__contents.setFontFamily(font.family()) - self.__contents.setFontPointSize(font.pointSize()) - - -class WebViewDocumentationViewer(QWidget): - """ - Class implementing the rich text documentation viewer. - """ - def __init__(self, parent=None): - """ - Constructor - - @param parent reference to the parent widget - @type QWidget - """ - super(WebViewDocumentationViewer, self).__init__(parent) - self.setObjectName("WebViewDocumentationViewer") + super(DocumentationViewerWidget, self).__init__(parent) + self.setObjectName("DocumentationViewerWidget") self.__verticalLayout = QVBoxLayout(self) self.__verticalLayout.setObjectName("verticalLayout") @@ -118,13 +60,18 @@ except AttributeError: # pre Qt 5.8 pass - self.__usesWebKit = False + self.__viewerType = "QWebEngineView" except ImportError: - from PyQt5.QtWebKitWidgets import QWebPage, QWebView - self.__contents = QWebView(self) - self.__contents.page().setLinkDelegationPolicy( - QWebPage.DelegateAllLinks) - self.__usesWebKit = True + try: + from PyQt5.QtWebKitWidgets import QWebPage, QWebView + self.__contents = QWebView(self) + self.__contents.page().setLinkDelegationPolicy( + QWebPage.DelegateAllLinks) + self.__viewerType = "QWebView" + except ImportError: + self.__contents = QTextBrowser(self) + self.__contents.setOpenExternalLinks(True) + self.__viewerType = "QTextEdit" sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) @@ -133,7 +80,8 @@ self.__contents.sizePolicy().hasHeightForWidth()) self.__contents.setSizePolicy(sizePolicy) self.__contents.setContextMenuPolicy(Qt.NoContextMenu) - self.__contents.setUrl(QUrl("about:blank")) + if self.__viewerType != "QTextEdit": + self.__contents.setUrl(QUrl("about:blank")) self.__verticalLayout.addWidget(self.__contents) self.__searchWidget = E5TextEditSearchWidget(self, False) @@ -142,9 +90,7 @@ self.__verticalLayout.addWidget(self.__searchWidget) self.__searchWidget.attachTextEdit( - self.__contents, - "QWebView" if self.__usesWebKit else "QWebEngineView", - ) + self.__contents, self.__viewerType) @pyqtSlot(str) def __showLink(self, urlStr): @@ -171,7 +117,10 @@ """ Public method to clear the shown contents. """ - self.__contents.setHtml("") + if self.__viewerType == "QTextEdit": + self.__contents.clear() + else: + self.__contents.setHtml("") class CodeDocumentationViewer(QWidget): @@ -256,27 +205,13 @@ self.verticalLayout.addLayout(self.horizontalLayout1) self.verticalLayout.addWidget(self.objectLineEdit) - try: - # Rich Text (Web) Viewer - self.__richTextViewer = WebViewDocumentationViewer(self) - self.__richTextViewer.setObjectName("__richTextViewer") - self.verticalLayout.addWidget(self.__richTextViewer) - - self.__plainTextViewer = None - - # backward compatibility for plug-ins before 2018-09-17 - Preferences.setDocuViewer("ShowInfoAsRichText", True) - except ImportError: - # neither QtWebEngineWidgets nor QtWebKitWidgets is available - self.__richTextViewer = None - - # Plain Text Viewer - self.__plainTextViewer = PlainTextDocumentationViewer(self) - self.__plainTextViewer.setObjectName("__plainTextViewer") - self.verticalLayout.addWidget(self.__plainTextViewer) - - # backward compatibility for plug-ins before 2018-09-17 - Preferences.setDocuViewer("ShowInfoAsRichText", False) + # Rich Text (Web) Viewer + self.__viewerWidget = DocumentationViewerWidget(self) + self.__viewerWidget.setObjectName("__viewerWidget") + self.verticalLayout.addWidget(self.__viewerWidget) + + # backward compatibility for plug-ins before 2018-09-17 + Preferences.setDocuViewer("ShowInfoAsRichText", True) self.providerComboBox.currentIndexChanged[int].connect( self.on_providerComboBox_currentIndexChanged) @@ -406,10 +341,7 @@ self.objectLineEdit.setText(word) if self.__selectedProvider != self.__disabledProvider: - if self.__richTextViewer: - self.__richTextViewer.clear() - else: - self.__plainTextViewer.clear() + self.__viewerWidget.clear() self.__providers[self.__selectedProvider][0](editor) def documentationReady(self, documentationInfo, isWarning=False, @@ -446,70 +378,18 @@ self.documentationReady(self.tr("No documentation available"), isDocWarning=True) else: - if self.__richTextViewer: - if isWarning: - html = prepareDocumentationViewerHtmlWarningDocument( - documentationInfo) - elif isDocWarning: - html = prepareDocumentationViewerHtmlDocWarningDocument( - documentationInfo) - elif isinstance(documentationInfo, dict): - html = prepareDocumentationViewerHtmlDocument( - documentationInfo) - else: - html = documentationInfo - self.__setHtml(html) + if isWarning: + html = prepareDocumentationViewerHtmlWarningDocument( + documentationInfo) + elif isDocWarning: + html = prepareDocumentationViewerHtmlDocWarningDocument( + documentationInfo) + elif isinstance(documentationInfo, dict): + html = prepareDocumentationViewerHtmlDocument( + documentationInfo) else: - if isinstance(documentationInfo, basestring): - fullText = documentationInfo - elif isinstance(documentationInfo, dict): - name = documentationInfo["name"] - if name: - title = "".join([name, "\n", - "=" * len(name), "\n\n"]) - - if "argspec" in documentationInfo and \ - documentationInfo["argspec"]: - definition = self.tr("Definition: {0}{1}\n")\ - .format(name, documentationInfo["argspec"]) - elif name: - definition = self.tr("Definition: {0}\n")\ - .format(name) - else: - definition = "" - - if "typ" in documentationInfo and \ - documentationInfo["typ"]: - typeInfo = self.tr("Type: {0}\n").format( - documentationInfo["typ"]) - else: - typeInfo = "" - - if "note" in documentationInfo and \ - documentationInfo["note"]: - note = self.tr("Note: {0}\n").format( - documentationInfo["note"]) - else: - note = "" - - header = "".join([title, definition, typeInfo, note]) - else: - header = "" - - if "docstring" not in documentationInfo or \ - not documentationInfo["docstring"]: - docString = self.tr( - "No further documentation available") - else: - if header: - docString = "\n----\n\n{0}".format( - documentationInfo["docstring"]) - else: - docString = documentationInfo["docstring"] - - fullText = "".join([header, docString]) - - self.__plainTextViewer.setText(fullText) + html = documentationInfo + self.__viewerWidget.setHtml(html) def __showDisabledMessage(self): """ @@ -525,16 +405,6 @@ self.tr("This function has been disabled."), isWarning=True) - def __setHtml(self, html): - """ - Private slot to set the prepared HTML text. - - @param html prepared HTML text - @type str - """ - if self.__richTextViewer: - self.__richTextViewer.setHtml(html) - @pyqtSlot(int) def on_providerComboBox_currentIndexChanged(self, index): """ @@ -544,10 +414,7 @@ @type int """ if not self.__shuttingDown and not self.__startingUp: - if self.__richTextViewer: - self.__richTextViewer.clear() - else: - self.__plainTextViewer.clear() + self.__viewerWidget.clear() self.objectLineEdit.clear() provider = self.providerComboBox.itemData(index)
--- a/i18n/eric6_cs.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_cs.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3072,44 +3072,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3131,18 +3119,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_de.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_de.ts Tue Sep 18 19:23:07 2018 +0200 @@ -2968,46 +2968,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation>Code Info Provider:</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation>Wähle den Code Info Provider</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation><deaktiviert></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation>Keine Dokumentation verfügbar</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation>Definition: {0}{1} -</translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation>Definition: {0} -</translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation>Es ist kein Provider für Code Dokumentation registriert. Diese Funktion wurde deaktiviert.</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation>Diese Funktion wurde deaktiviert.</translation> </message> @@ -3029,20 +3015,6 @@ <translation><p><b>Hinweis:</b> @NOTE@</p></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation>Typ: {0} -</translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation>Hinweis: {0} -</translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_empty.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_empty.ts Tue Sep 18 19:23:07 2018 +0200 @@ -2935,44 +2935,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -2994,18 +2982,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_en.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_en.ts Tue Sep 18 19:23:07 2018 +0200 @@ -2935,44 +2935,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -2994,18 +2982,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_es.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_es.ts Tue Sep 18 19:23:07 2018 +0200 @@ -2965,17 +2965,17 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation>Proveedor de Info del Código:</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation>Seleccionar el proveedor de info del código</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation><deshabilitado></translation> </message> @@ -2995,7 +2995,7 @@ <translation type="obsolete">Texto Plano</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation>No hay documentación disponible</translation> </message> @@ -3003,23 +3003,23 @@ <location filename="../UI/CodeDocumentationViewer.py" line="474"/> <source>Definition: {0}{1} </source> - <translation>Definición: {0}{1} + <translation type="obsolete">Definición: {0}{1} </translation> </message> <message> <location filename="../UI/CodeDocumentationViewer.py" line="477"/> <source>Definition: {0} </source> - <translation>Definición: {0} + <translation type="obsolete">Definición: {0} </translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation>No hay registrado ningún proveedor de documentación de código. Esta función se ha deshabilitado.</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation>Esta función se ha deshabilitado.</translation> </message> @@ -3044,14 +3044,14 @@ <location filename="../UI/CodeDocumentationViewer.py" line="485"/> <source>Type: {0} </source> - <translation>Tipo: {0} + <translation type="obsolete">Tipo: {0} </translation> </message> <message> <location filename="../UI/CodeDocumentationViewer.py" line="493"/> <source>Note: {0} </source> - <translation>Nota: {0} + <translation type="obsolete">Nota: {0} </translation> </message> <message>
--- a/i18n/eric6_fr.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_fr.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3088,44 +3088,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3147,18 +3135,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_it.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_it.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3001,44 +3001,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3060,18 +3048,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_pt.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_pt.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3102,44 +3102,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3161,18 +3149,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_ru.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_ru.ts Tue Sep 18 19:23:07 2018 +0200 @@ -2967,17 +2967,17 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation>Источник инфо для кода:</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation>Выберите источник инфо для кода</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation><disabled></translation> </message> @@ -2997,7 +2997,7 @@ <translation type="obsolete">Простой текст</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation>Документация недоступна</translation> </message> @@ -3005,23 +3005,23 @@ <location filename="../UI/CodeDocumentationViewer.py" line="474"/> <source>Definition: {0}{1} </source> - <translation>Определение: {0} {1} + <translation type="obsolete">Определение: {0} {1} </translation> </message> <message> <location filename="../UI/CodeDocumentationViewer.py" line="477"/> <source>Definition: {0} </source> - <translation>Определение: {0} + <translation type="obsolete">Определение: {0} </translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation>Поставщик документации для исходного кода не зарегистрирован. Эта функция отключена.</translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation>Эта функция отключена.</translation> </message> @@ -3046,14 +3046,14 @@ <location filename="../UI/CodeDocumentationViewer.py" line="485"/> <source>Type: {0} </source> - <translation>Тип: {0} + <translation type="obsolete">Тип: {0} </translation> </message> <message> <location filename="../UI/CodeDocumentationViewer.py" line="493"/> <source>Note: {0} </source> - <translation>Примечание: {0} + <translation type="obsolete">Примечание: {0} </translation> </message> <message>
--- a/i18n/eric6_tr.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_tr.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3071,44 +3071,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3130,18 +3118,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>
--- a/i18n/eric6_zh_CN.ts Mon Sep 17 19:25:49 2018 +0200 +++ b/i18n/eric6_zh_CN.ts Tue Sep 18 19:23:07 2018 +0200 @@ -3079,44 +3079,32 @@ <context> <name>CodeDocumentationViewer</name> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="234"/> + <location filename="../UI/CodeDocumentationViewer.py" line="183"/> <source>Code Info Provider:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="247"/> + <location filename="../UI/CodeDocumentationViewer.py" line="196"/> <source>Select the code info provider</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="249"/> + <location filename="../UI/CodeDocumentationViewer.py" line="198"/> <source><disabled></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="447"/> + <location filename="../UI/CodeDocumentationViewer.py" line="379"/> <source>No documentation available</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="474"/> - <source>Definition: {0}{1} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="477"/> - <source>Definition: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="524"/> + <location filename="../UI/CodeDocumentationViewer.py" line="400"/> <source>No source code documentation provider has been registered. This function has been disabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="529"/> + <location filename="../UI/CodeDocumentationViewer.py" line="405"/> <source>This function has been disabled.</source> <translation type="unfinished"></translation> </message> @@ -3138,18 +3126,6 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../UI/CodeDocumentationViewer.py" line="485"/> - <source>Type: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../UI/CodeDocumentationViewer.py" line="493"/> - <source>Note: {0} -</source> - <translation type="unfinished"></translation> - </message> - <message> <location filename="../UI/CodeDocumentationViewerTemplate.py" line="65"/> <source><p><b>Type:</b> @TYPE@</p></source> <comment>Just translate 'Type:' and leave the rest intact.</comment>