eric6/MicroPython/CircuitPythonFirmwareSelectionDialog.py

changeset 7595
5db6bfeff23e
parent 7360
9190402e4505
child 7596
1b1f401e1d70
diff -r ee35df230130 -r 5db6bfeff23e eric6/MicroPython/CircuitPythonFirmwareSelectionDialog.py
--- a/eric6/MicroPython/CircuitPythonFirmwareSelectionDialog.py	Tue May 12 17:32:16 2020 +0200
+++ b/eric6/MicroPython/CircuitPythonFirmwareSelectionDialog.py	Fri May 15 18:33:53 2020 +0200
@@ -48,6 +48,7 @@
         
         self.bootPicker.setMode(E5PathPickerModes.DirectoryShowFilesMode)
         
+        self.__manualMarker = "<manual>"
         boards = (
             ("", ""),           # indicator for no selection
             
@@ -63,7 +64,7 @@
             ("NeoTrelis M4 Express", "TRELM4BOOT"),
             ("Trinket M0", "TRINKETBOOT"),
             
-            ("Manual Select", "<manual>"),
+            (self.tr("Manual Select"), self.__manualMarker),
         )
         for boardName, bootVolume in boards:
             self.boardComboBox.addItem(boardName, bootVolume)
@@ -84,7 +85,7 @@
             enable = False
         else:
             volumeName = self.boardComboBox.currentData()
-            if volumeName and volumeName != "<manual>":
+            if volumeName and volumeName != self.__manualMarker:
                 # check if the user selected a board and the board is in
                 # bootloader mode
                 deviceDirectory = Utilities.findVolume(volumeName)
@@ -104,7 +105,7 @@
                         .format(volumeName)
                     )
             
-            elif volumeName == "<manual>":
+            elif volumeName == self.__manualMarker:
                 # select the device path manually
                 deviceDirectory = self.bootPicker.text()
                 enable = (bool(deviceDirectory) and
@@ -134,7 +135,7 @@
         @param index index of the selected board type
         @type int
         """
-        if self.boardComboBox.itemData(index) == "<manual>":
+        if self.boardComboBox.itemData(index) == self.__manualMarker:
             self.bootPicker.clear()
             self.bootPicker.setEnabled(True)
         else:

eric ide

mercurial