eric6/MicroPython/MicroPythonWidget.py

changeset 7328
e2d85ef3fadb
parent 7325
f05a814aeddc
child 7360
9190402e4505
--- a/eric6/MicroPython/MicroPythonWidget.py	Sat Nov 02 18:21:01 2019 +0100
+++ b/eric6/MicroPython/MicroPythonWidget.py	Sat Nov 02 19:24:46 2019 +0100
@@ -1128,6 +1128,10 @@
             self.__device.addDeviceMenuEntries(self.__superMenu)
             self.__superMenu.addSeparator()
             act = self.__superMenu.addAction(
+                self.tr("Download Firmware"), self.__downloadFirmware)
+            act.setEnabled(self.__device.hasFirmwareUrl())
+            self.__superMenu.addSeparator()
+            act = self.__superMenu.addAction(
                 self.tr("Show Documentation"), self.__showDocumentation)
             act.setEnabled(self.__device.hasDocumentationUrl())
         self.__superMenu.addSeparator()
@@ -1452,6 +1456,18 @@
         e5App().getObject("UserInterface").launchHelpViewer(url)
     
     @pyqtSlot()
+    def __downloadFirmware(self):
+        """
+        Private slot to open the firmware download page.
+        """
+        if self.__device is None or not self.__device.hasFirmwareUrl():
+            # abort silently
+            return
+        
+        url = self.__device.getFirmwareUrl()
+        e5App().getObject("UserInterface").launchHelpViewer(url)
+    
+    @pyqtSlot()
     def __configure(self):
         """
         Private slot to open the MicroPython configuration page.

eric ide

mercurial