72 self.deviceReloadButton.setIcon(EricPixmapCache.getIcon("reload")) |
72 self.deviceReloadButton.setIcon(EricPixmapCache.getIcon("reload")) |
73 self.openButton.setIcon(EricPixmapCache.getIcon("open")) |
73 self.openButton.setIcon(EricPixmapCache.getIcon("open")) |
74 self.saveButton.setIcon(EricPixmapCache.getIcon("fileSave")) |
74 self.saveButton.setIcon(EricPixmapCache.getIcon("fileSave")) |
75 self.saveAsButton.setIcon(EricPixmapCache.getIcon("fileSaveAs")) |
75 self.saveAsButton.setIcon(EricPixmapCache.getIcon("fileSaveAs")) |
76 |
76 |
77 self.deviceUpButton.setEnabled(not self.__repl.isMicrobit()) |
77 isMicrobitDeviceWithMPy = self.__repl.isMicrobit() |
78 self.deviceHomeButton.setEnabled(not self.__repl.isMicrobit()) |
78 |
|
79 self.deviceUpButton.setEnabled(not isMicrobitDeviceWithMPy) |
|
80 self.deviceHomeButton.setEnabled(not isMicrobitDeviceWithMPy) |
79 |
81 |
80 self.putButton.setEnabled(False) |
82 self.putButton.setEnabled(False) |
81 self.putAsButton.setEnabled(False) |
83 self.putAsButton.setEnabled(False) |
82 self.getButton.setEnabled(False) |
84 self.getButton.setEnabled(False) |
83 self.getAsButton.setEnabled(False) |
85 self.getAsButton.setEnabled(False) |
138 act.setCheckable(True) |
140 act.setCheckable(True) |
139 act.setChecked(Preferences.getMicroPython("ShowHiddenLocal")) |
141 act.setChecked(Preferences.getMicroPython("ShowHiddenLocal")) |
140 act.triggered[bool].connect(self.__localHiddenChanged) |
142 act.triggered[bool].connect(self.__localHiddenChanged) |
141 |
143 |
142 self.__deviceMenu = QMenu(self) |
144 self.__deviceMenu = QMenu(self) |
143 if not self.__repl.isMicrobit(): |
145 if not isMicrobitDeviceWithMPy: |
144 self.__deviceMenu.addAction( |
146 self.__deviceMenu.addAction( |
145 self.tr("Change Directory"), self.__changeDeviceDirectory |
147 self.tr("Change Directory"), self.__changeDeviceDirectory |
146 ) |
148 ) |
147 self.__deviceMenu.addAction( |
149 self.__deviceMenu.addAction( |
148 self.tr("Create Directory"), self.__createDeviceDirectory |
150 self.tr("Create Directory"), self.__createDeviceDirectory |
161 self.__deviceMenu.addSeparator() |
163 self.__deviceMenu.addSeparator() |
162 act = self.__deviceMenu.addAction(self.tr("Show Hidden Files")) |
164 act = self.__deviceMenu.addAction(self.tr("Show Hidden Files")) |
163 act.setCheckable(True) |
165 act.setCheckable(True) |
164 act.setChecked(Preferences.getMicroPython("ShowHiddenDevice")) |
166 act.setChecked(Preferences.getMicroPython("ShowHiddenDevice")) |
165 act.triggered[bool].connect(self.__deviceHiddenChanged) |
167 act.triggered[bool].connect(self.__deviceHiddenChanged) |
166 if not parent.isMicrobit(): |
168 if not isMicrobitDeviceWithMPy: |
167 self.__deviceMenu.addSeparator() |
169 self.__deviceMenu.addSeparator() |
168 self.__deviceMenu.addAction( |
170 self.__deviceMenu.addAction( |
169 self.tr("Show Filesystem Info"), self.__showFileSystemInfo |
171 self.tr("Show Filesystem Info"), self.__showFileSystemInfo |
170 ) |
172 ) |
171 |
173 |