230 """ |
230 """ |
231 aw = e5App().getObject("ViewManager").activeWindow() |
231 aw = e5App().getObject("ViewManager").activeWindow() |
232 if not aw: |
232 if not aw: |
233 return |
233 return |
234 |
234 |
235 if not (aw.isPy3File() or aw.isPy2File()): |
235 if not (aw.isPyFile() or aw.isMicroPythonFile()): |
236 yes = E5MessageBox.yesNo( |
236 yes = E5MessageBox.yesNo( |
237 self.microPython, |
237 self.microPython, |
238 self.tr("Flash Script"), |
238 self.tr("Flash Script"), |
239 self.tr("""The current editor does not contain a Python""" |
239 self.tr("""The current editor does not contain a Python""" |
240 """ script. Flash it anyway?""")) |
240 """ script. Flash it anyway?""")) |
270 """ |
270 """ |
271 aw = e5App().getObject("ViewManager").activeWindow() |
271 aw = e5App().getObject("ViewManager").activeWindow() |
272 if not aw: |
272 if not aw: |
273 return |
273 return |
274 |
274 |
275 if not (aw.isPy3File() or aw.isPy2File()): |
275 if not (aw.isPyFile() or aw.isMicroPythonFile()): |
276 yes = E5MessageBox.yesNo( |
276 yes = E5MessageBox.yesNo( |
277 self.microPython, |
277 self.microPython, |
278 self.tr("Save Script as 'main.py'"), |
278 self.tr("Save Script as 'main.py'"), |
279 self.tr("""The current editor does not contain a Python""" |
279 self.tr("""The current editor does not contain a Python""" |
280 """ script. Write it anyway?""")) |
280 """ script. Write it anyway?""")) |