eric6/MicroPython/MicroPythonFileManagerWidget.py

branch
micropython
changeset 7108
4f6133a01c6a
parent 7095
8e10acb1cd85
child 7126
376deb7fefe7
--- a/eric6/MicroPython/MicroPythonFileManagerWidget.py	Tue Jul 30 19:44:27 2019 +0200
+++ b/eric6/MicroPython/MicroPythonFileManagerWidget.py	Wed Jul 31 20:41:39 2019 +0200
@@ -85,13 +85,7 @@
         self.__fileManager.removeDirectoryDone.connect(self.__newDeviceList)
         self.__fileManager.createDirectoryDone.connect(self.__newDeviceList)
         self.__fileManager.deleteFileDone.connect(self.__newDeviceList)
-        self.__fileManager.fsinfoDone.connect(self.__shownFsInfoResult)
-        self.__fileManager.synchTimeDone.connect(self.__timeSynchronized)
-        self.__fileManager.showTimeDone.connect(self.__deviceTimeReceived)
-        self.__fileManager.showVersionDone.connect(
-            self.__deviceVersionReceived)
-        self.__fileManager.showImplementationDone.connect(
-            self.__deviceImplementationReceived)
+        self.__fileManager.fsinfoDone.connect(self.__fsInfoResultReceived)
         
         self.__fileManager.error.connect(self.__handleError)
         
@@ -129,16 +123,6 @@
         self.__deviceMenu.addSeparator()
         self.__deviceMenu.addAction(
             self.tr("Show Filesystem Info"), self.__showFileSystemInfo)
-        self.__deviceMenu.addSeparator()
-        self.__deviceMenu.addAction(
-            self.tr("Synchronize Time"), self.__synchronizeTime)
-        self.__deviceMenu.addAction(
-            self.tr("Show Time"), self.__showDeviceTime)
-        self.__deviceMenu.addSeparator()
-        self.__deviceMenu.addAction(
-            self.tr("Show Version"), self.__showDeviceVersion)
-        self.__deviceMenu.addAction(
-            self.tr("Show Implementation"), self.__showImplementation)
     
     def start(self):
         """
@@ -744,9 +728,9 @@
         self.__fileManager.fileSystemInfo()
     
     @pyqtSlot(tuple)
-    def __shownFsInfoResult(self, fsinfo):
+    def __fsInfoResultReceived(self, fsinfo):
         """
-        Private slot to show the file systom information of the device.
+        Private slot to show the file system information of the device.
         
         @param fsinfo tuple of tuples containing the file system name, the
             total size, the used size and the free size
@@ -770,112 +754,3 @@
             self,
             self.tr("Filesystem Information"),
             msg)
-    
-    @pyqtSlot()
-    def __synchronizeTime(self):
-        """
-        Private slot to synchronize the local time to the device.
-        """
-        self.__fileManager.synchronizeTime()
-    
-    @pyqtSlot()
-    def __timeSynchronized(self):
-        """
-        Private slot handling the successful syncronization of the time.
-        """
-        E5MessageBox.information(
-            self,
-            self.tr("Synchronize Time"),
-            self.tr("The time of the connected device was synchronized with"
-                    " the local time."))
-    
-    @pyqtSlot()
-    def __showDeviceTime(self):
-        """
-        Private slot to show the date and time of the connected device.
-        """
-        self.__fileManager.showTime()
-    
-    @pyqtSlot(str)
-    def __deviceTimeReceived(self, dateTimeString):
-        """
-        Private slot handling the receipt of the device date and time.
-        
-        @param dateTimeString string containg the date and time of the device
-        @type str
-        """
-        try:
-            date, time = dateTimeString.strip().split(None, 1)
-            msg = self.tr(
-                "<h3>Device Date and Time</h3>"
-                "<table>"
-                "<tr><td><b>Date</b></td><td>{0}</td></tr>"
-                "<tr><td><b>Time</b></td><td>{1}</td></tr>"
-                "</table>"
-            ).format(date, time)
-        except ValueError:
-            msg = self.tr(
-                "<h3>Device Date and Time</h3>"
-                "<p>{0}</p>"
-            ).format(dateTimeString.strip())
-        E5MessageBox.information(
-            self,
-            self.tr("Device Date and Time"),
-            msg)
-    
-    @pyqtSlot()
-    def __showDeviceVersion(self):
-        """
-        Private slot to show some version info about MicroPython of the device.
-        """
-        self.__fileManager.showVersion()
-    
-    @pyqtSlot(dict)
-    def __deviceVersionReceived(self, versionInfo):
-        """
-        Private slot handling the receipt of the version info.
-        
-        @param versionInfo dictionary containing the version information
-        @type dict
-        """
-        if versionInfo:
-            msg = self.tr(
-                "<h3>Device Version Information</h3>"
-            )
-            msg += "<table>"
-            for key, value in versionInfo.items():
-                msg += "<tr><td><b>{0}</b></td><td>{1}</td></tr>".format(
-                    key.capitalize(), value)
-            msg += "</table>"
-        else:
-            msg = self.tr("No version information available.")
-        E5MessageBox.information(
-            self,
-            self.tr("Device Version Information"),
-            msg)
-    
-    @pyqtSlot()
-    def __showImplementation(self):
-        """
-        Private slot to show some implementation related information.
-        """
-        self.__fileManager.showImplementation()
-    
-    @pyqtSlot(str, str)
-    def __deviceImplementationReceived(self, name, version):
-        """
-        Private slot handling the receipt of implementation info.
-        
-        @param name name of the implementation
-        @type str
-        @param version version string of the implementation
-        @type str
-        """
-        E5MessageBox.information(
-            self,
-            self.tr("Device Implementation Information"),
-            self.tr(
-                "<h3>Device Implementation Information</h3>"
-                "<p>This device contains <b>{0} {1}</b>.</p>"
-            ).format(name, version)
-        )

eric ide

mercurial