eric6/MicroPython/MicroPythonFileManagerWidget.py

branch
micropython
changeset 7095
8e10acb1cd85
parent 7089
9f9816b19aa4
child 7108
4f6133a01c6a
--- a/eric6/MicroPython/MicroPythonFileManagerWidget.py	Sun Jul 28 18:55:00 2019 +0200
+++ b/eric6/MicroPython/MicroPythonFileManagerWidget.py	Mon Jul 29 20:20:18 2019 +0200
@@ -26,7 +26,7 @@
 
 from .Ui_MicroPythonFileManagerWidget import Ui_MicroPythonFileManagerWidget
 
-from .MicroPythonFileSystem import MicroPythonFileManager
+from .MicroPythonFileManager import MicroPythonFileManager
 from .MicroPythonFileSystemUtilities import (
     mtime2string, mode2string, decoratedName, listdirStat
 )
@@ -43,12 +43,12 @@
     """
     Class implementing a file manager for MicroPython devices.
     """
-    def __init__(self, port, parent=None):
+    def __init__(self, commandsInterface, parent=None):
         """
         Constructor
         
-        @param port port name of the device
-        @type str
+        @param commandsInterface reference to the commands interface object
+        @type MicroPythonCommandsInterface
         @param parent reference to the parent widget
         @type QWidget
         """
@@ -72,7 +72,7 @@
             0, Qt.AscendingOrder)
         
         self.__progressInfoDialog = None
-        self.__fileManager = MicroPythonFileManager(port, self)
+        self.__fileManager = MicroPythonFileManager(commandsInterface, self)
         
         self.__fileManager.longListFiles.connect(self.__handleLongListFiles)
         self.__fileManager.currentDir.connect(self.__handleCurrentDir)
@@ -144,15 +144,8 @@
         """
         Public method to start the widget.
         """
-        ui = e5App().getObject("UserInterface")
+        dirname = ""
         vm = e5App().getObject("ViewManager")
-        
-        ui.preferencesChanged.connect(
-            self.__fileManager.handlePreferencesChanged)
-        
-        self.__fileManager.connectToDevice()
-        
-        dirname = ""
         aw = vm.activeWindow()
         if aw:
             dirname = os.path.dirname(aw.getFileName())
@@ -167,11 +160,7 @@
         """
         Public method to stop the widget.
         """
-        ui = e5App().getObject("UserInterface")
-        ui.preferencesChanged.disconnect(
-            self.__fileManager.handlePreferencesChanged)
-        
-        self.__fileManager.disconnectFromDevice()
+        pass
     
     @pyqtSlot(str, str)
     def __handleError(self, method, error):

eric ide

mercurial