eric6/Preferences/ConfigurationPages/MicroPythonPage.py

branch
micropython
changeset 7140
22f5fd76c10f
parent 7135
44fcfc99b864
child 7161
728018c32b09
--- a/eric6/Preferences/ConfigurationPages/MicroPythonPage.py	Thu Aug 15 17:19:28 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/MicroPythonPage.py	Fri Aug 16 17:17:32 2019 +0200
@@ -9,6 +9,8 @@
 
 from __future__ import unicode_literals
 
+from E5Gui.E5PathPicker import E5PathPickerModes
+
 from .ConfigurationPageBase import ConfigurationPageBase
 from .Ui_MicroPythonPage import Ui_MicroPythonPage
 
@@ -34,6 +36,9 @@
         
         self.colorSchemeComboBox.addItems(sorted(AnsiColorSchemes.keys()))
         
+        self.mpyCrossPicker.setMode(E5PathPickerModes.OpenFileMode)
+        self.mpyCrossPicker.setFilters(self.tr("All Files (*)"))
+        
         # set initial values
         self.timeoutSpinBox.setValue(
             Preferences.getMicroPython("SerialTimeout") / 1000)
@@ -45,6 +50,8 @@
                 Preferences.getMicroPython("ColorScheme")))
         self.replWrapCheckBox.setChecked(
             Preferences.getMicroPython("ReplLineWrap"))
+        self.mpyCrossPicker.setText(
+            Preferences.getMicroPython("MpyCrossCompiler"))
     
     def save(self):
         """
@@ -59,6 +66,8 @@
             "ColorScheme", self.colorSchemeComboBox.currentText())
         Preferences.setMicroPython(
             "ReplLineWrap", self.replWrapCheckBox.isChecked())
+        Preferences.setMicroPython(
+            "MpyCrossCompiler", self.mpyCrossPicker.text())
     
 
 def create(dlg):
@@ -68,5 +77,4 @@
     @param dlg reference to the configuration dialog
     @return reference to the instantiated page (ConfigurationPageBase)
     """
-    page = MicroPythonPage()
-    return page
+    return MicroPythonPage()

eric ide

mercurial