Tue, 06 May 2025 11:08:30 +0200
Changed the 'show()' logic of the Ethernet Status dialog.
--- a/src/eric7/APIs/Python3/eric7.api Tue May 06 11:07:12 2025 +0200 +++ b/src/eric7/APIs/Python3/eric7.api Tue May 06 11:08:30 2025 +0200 @@ -3192,6 +3192,7 @@ eric7.MicroPython.Devices.getSupportedDevices?4() eric7.MicroPython.EthernetDialogs.EthernetController.EthernetController.createMenu?4(menu) eric7.MicroPython.EthernetDialogs.EthernetController.EthernetController?1(microPython, parent=None) +eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.EthernetStatusDialog.show?4() eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.EthernetStatusDialog?1(microPython, parent=None) eric7.MicroPython.EthernetDialogs.HostnameDialog.HostnameDialog.getHostname?4() eric7.MicroPython.EthernetDialogs.HostnameDialog.HostnameDialog?1(parent=None)
--- a/src/eric7/Documentation/Help/source.qhp Tue May 06 11:07:12 2025 +0200 +++ b/src/eric7/Documentation/Help/source.qhp Tue May 06 11:08:30 2025 +0200 @@ -6960,6 +6960,7 @@ <keyword name="EthernetStatusDialog (Module)" id="EthernetStatusDialog (Module)" ref="eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html" /> <keyword name="EthernetStatusDialog.__createHeader" id="EthernetStatusDialog.__createHeader" ref="eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html#EthernetStatusDialog.__createHeader" /> <keyword name="EthernetStatusDialog.__showStatus" id="EthernetStatusDialog.__showStatus" ref="eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html#EthernetStatusDialog.__showStatus" /> + <keyword name="EthernetStatusDialog.show" id="EthernetStatusDialog.show" ref="eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html#EthernetStatusDialog.show" /> <keyword name="ExceptBaseExceptionVisitor" id="ExceptBaseExceptionVisitor" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.BugBearVisitor.html#ExceptBaseExceptionVisitor" /> <keyword name="ExceptBaseExceptionVisitor (Constructor)" id="ExceptBaseExceptionVisitor (Constructor)" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.BugBearVisitor.html#ExceptBaseExceptionVisitor.__init__" /> <keyword name="ExceptBaseExceptionVisitor.reRaised" id="ExceptBaseExceptionVisitor.reRaised" ref="eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.BugBearVisitor.html#ExceptBaseExceptionVisitor.reRaised" />
--- a/src/eric7/Documentation/Source/eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html Tue May 06 11:07:12 2025 +0200 +++ b/src/eric7/Documentation/Source/eric7.MicroPython.EthernetDialogs.EthernetStatusDialog.html Tue May 06 11:08:30 2025 +0200 @@ -63,6 +63,10 @@ <td><a href="#EthernetStatusDialog.__showStatus">__showStatus</a></td> <td>Private slot to show the current WiFi status.</td> </tr> +<tr> +<td><a href="#EthernetStatusDialog.show">show</a></td> +<td>Public slot to show the dialog and populate the status.</td> +</tr> </table> <h3>Static Methods</h3> @@ -130,6 +134,13 @@ Private slot to show the current WiFi status. </p> +<a NAME="EthernetStatusDialog.show" ID="EthernetStatusDialog.show"></a> +<h4>EthernetStatusDialog.show</h4> +<b>show</b>(<i></i>) +<p> + Public slot to show the dialog and populate the status. +</p> + <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>
--- a/src/eric7/MicroPython/EthernetDialogs/EthernetStatusDialog.py Tue May 06 11:07:12 2025 +0200 +++ b/src/eric7/MicroPython/EthernetDialogs/EthernetStatusDialog.py Tue May 06 11:08:30 2025 +0200 @@ -11,6 +11,7 @@ from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem from eric7.EricGui import EricPixmapCache +from eric7.EricGui.EricOverrideCursor import EricOverrideCursor from eric7.SystemUtilities.NetworkUtilities import ipv6AddressScope from .Ui_EthernetStatusDialog import Ui_EthernetStatusDialog @@ -41,6 +42,13 @@ self.__mpy = microPython + @pyqtSlot() + def show(self): + """ + Public slot to show the dialog and populate the status. + """ + super().show() + self.__showStatus() @pyqtSlot() @@ -52,11 +60,12 @@ self.statusTree.clear() # get the status - try: - status, addressInfo = self.__mpy.getDevice().getEthernetStatus() - except Exception as exc: - self.__mpy.showError("getEthernetStatus()", str(exc)) - return + with EricOverrideCursor(): + try: + status, addressInfo = self.__mpy.getDevice().getEthernetStatus() + except Exception as exc: + self.__mpy.showError("getEthernetStatus()", str(exc)) + return for topic, value in status: QTreeWidgetItem(self.statusTree, [topic, str(value)])