src/eric7/QScintilla/MiniEditor.py

branch
eric7
changeset 9576
be9f8e7e42e0
parent 9573
9960d19d66b5
child 9612
93b496cc3c88
equal deleted inserted replaced
9575:635b6c5a36e1 9576:be9f8e7e42e0
619 self, 619 self,
620 "vm_file_new", 620 "vm_file_new",
621 ) 621 )
622 self.newAct.setStatusTip(self.tr("Open an empty editor window")) 622 self.newAct.setStatusTip(self.tr("Open an empty editor window"))
623 self.newAct.setWhatsThis( 623 self.newAct.setWhatsThis(
624 self.tr( 624 self.tr("""<b>New</b><p>An empty editor window will be created.</p>""")
625 """<b>New</b><p>An empty editor window will be created.</p>"""
626 )
627 ) 625 )
628 self.newAct.triggered.connect(self.__newFile) 626 self.newAct.triggered.connect(self.__newFile)
629 self.fileActions.append(self.newAct) 627 self.fileActions.append(self.newAct)
630 628
631 self.openAct = EricAction( 629 self.openAct = EricAction(
871 self, 869 self,
872 "vm_edit_clear", 870 "vm_edit_clear",
873 ) 871 )
874 self.deleteAct.setStatusTip(self.tr("Clear all text")) 872 self.deleteAct.setStatusTip(self.tr("Clear all text"))
875 self.deleteAct.setWhatsThis( 873 self.deleteAct.setWhatsThis(
876 self.tr( 874 self.tr("""<b>Clear</b><p>Delete all text of the current editor.</p>""")
877 """<b>Clear</b><p>Delete all text of the current editor.</p>"""
878 )
879 ) 875 )
880 self.deleteAct.triggered.connect(self.__textEdit.clear) 876 self.deleteAct.triggered.connect(self.__textEdit.clear)
881 self.editActions.append(self.deleteAct) 877 self.editActions.append(self.deleteAct)
882 878
883 self.cutAct.setEnabled(False) 879 self.cutAct.setEnabled(False)
1403 self.editActions.append(act) 1399 self.editActions.append(act)
1404 1400
1405 act = EricAction( 1401 act = EricAction(
1406 QCoreApplication.translate( 1402 QCoreApplication.translate(
1407 "ViewManager", 1403 "ViewManager",
1408 "Extend selection to first visible character in document" " line", 1404 "Extend selection to first visible character in document line",
1409 ), 1405 ),
1410 QCoreApplication.translate( 1406 QCoreApplication.translate(
1411 "ViewManager", 1407 "ViewManager",
1412 "Extend selection to first visible character in document" " line", 1408 "Extend selection to first visible character in document line",
1413 ), 1409 ),
1414 0, 1410 0,
1415 0, 1411 0,
1416 self.editorActGrp, 1412 self.editorActGrp,
1417 "vm_edit_extend_selection_first_visible_char", 1413 "vm_edit_extend_selection_first_visible_char",
2327 2323
2328 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): 2324 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"):
2329 act = EricAction( 2325 act = EricAction(
2330 QCoreApplication.translate( 2326 QCoreApplication.translate(
2331 "ViewManager", 2327 "ViewManager",
2332 "Move to first visible character in display" " or document line", 2328 "Move to first visible character in display or document line",
2333 ), 2329 ),
2334 QCoreApplication.translate( 2330 QCoreApplication.translate(
2335 "ViewManager", 2331 "ViewManager",
2336 "Move to first visible character in display" " or document line", 2332 "Move to first visible character in display or document line",
2337 ), 2333 ),
2338 0, 2334 0,
2339 0, 2335 0,
2340 self.editorActGrp, 2336 self.editorActGrp,
2341 "vm_edit_move_first_visible_char_document_line", 2337 "vm_edit_move_first_visible_char_document_line",
3317 except (OSError, Utilities.CodingError, UnicodeError) as why: 3313 except (OSError, Utilities.CodingError, UnicodeError) as why:
3318 EricMessageBox.critical( 3314 EricMessageBox.critical(
3319 self, 3315 self,
3320 self.tr("Save File"), 3316 self.tr("Save File"),
3321 self.tr( 3317 self.tr(
3322 "<p>The file <b>{0}</b> could not be saved.<br/>" "Reason: {1}</p>" 3318 "<p>The file <b>{0}</b> could not be saved.<br/>Reason: {1}</p>"
3323 ).format(fileName, str(why)), 3319 ).format(fileName, str(why)),
3324 ) 3320 )
3325 return False 3321 return False
3326 3322
3327 self.__statusBar.showMessage(self.tr("File saved"), 2000) 3323 self.__statusBar.showMessage(self.tr("File saved"), 2000)

eric ide

mercurial