ViewManager/ViewManager.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3039
8dd0165d805d
child 3080
6c0a430b19df
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
243 sbEol, sbZoom): 243 sbEol, sbZoom):
244 """ 244 """
245 Public method to transfer statusbar info from the user interface to 245 Public method to transfer statusbar info from the user interface to
246 viewmanager. 246 viewmanager.
247 247
248 @param sbLine reference to the line number part of the statusbar 248 @param sbLine reference to the line number part of the statusbar
249 (QLabel) 249 (QLabel)
250 @param sbPos reference to the character position part of the statusbar 250 @param sbPos reference to the character position part of the statusbar
251 (QLabel) 251 (QLabel)
252 @param sbWritable reference to the writability indicator part of 252 @param sbWritable reference to the writability indicator part of
253 the statusbar (QLabel) 253 the statusbar (QLabel)
508 508
509 def __initFileActions(self): 509 def __initFileActions(self):
510 """ 510 """
511 Private method defining the user interface actions for file handling. 511 Private method defining the user interface actions for file handling.
512 """ 512 """
513 self.newAct = E5Action(QApplication.translate('ViewManager', 'New'), 513 self.newAct = E5Action(
514 QApplication.translate('ViewManager', 'New'),
514 UI.PixmapCache.getIcon("new.png"), 515 UI.PixmapCache.getIcon("new.png"),
515 QApplication.translate('ViewManager', '&New'), 516 QApplication.translate('ViewManager', '&New'),
516 QKeySequence( 517 QKeySequence(
517 QApplication.translate('ViewManager', "Ctrl+N", "File|New")), 518 QApplication.translate('ViewManager', "Ctrl+N", "File|New")),
518 0, self, 'vm_file_new') 519 0, self, 'vm_file_new')
519 self.newAct.setStatusTip( 520 self.newAct.setStatusTip(
520 QApplication.translate( 521 QApplication.translate(
521 'ViewManager', 'Open an empty editor window')) 522 'ViewManager', 'Open an empty editor window'))
522 self.newAct.setWhatsThis(QApplication.translate('ViewManager', 523 self.newAct.setWhatsThis(QApplication.translate(
524 'ViewManager',
523 """<b>New</b>""" 525 """<b>New</b>"""
524 """<p>An empty editor window will be created.</p>""" 526 """<p>An empty editor window will be created.</p>"""
525 )) 527 ))
526 self.newAct.triggered[()].connect(self.newEditor) 528 self.newAct.triggered[()].connect(self.newEditor)
527 self.fileActions.append(self.newAct) 529 self.fileActions.append(self.newAct)
528 530
529 self.openAct = E5Action(QApplication.translate('ViewManager', 'Open'), 531 self.openAct = E5Action(
532 QApplication.translate('ViewManager', 'Open'),
530 UI.PixmapCache.getIcon("open.png"), 533 UI.PixmapCache.getIcon("open.png"),
531 QApplication.translate('ViewManager', '&Open...'), 534 QApplication.translate('ViewManager', '&Open...'),
532 QKeySequence( 535 QKeySequence(
533 QApplication.translate('ViewManager', "Ctrl+O", "File|Open")), 536 QApplication.translate('ViewManager', "Ctrl+O", "File|Open")),
534 0, self, 'vm_file_open') 537 0, self, 'vm_file_open')
552 QKeySequence( 555 QKeySequence(
553 QApplication.translate('ViewManager', "Ctrl+W", "File|Close")), 556 QApplication.translate('ViewManager', "Ctrl+W", "File|Close")),
554 0, self.closeActGrp, 'vm_file_close') 557 0, self.closeActGrp, 'vm_file_close')
555 self.closeAct.setStatusTip( 558 self.closeAct.setStatusTip(
556 QApplication.translate('ViewManager', 'Close the current window')) 559 QApplication.translate('ViewManager', 'Close the current window'))
557 self.closeAct.setWhatsThis(QApplication.translate('ViewManager', 560 self.closeAct.setWhatsThis(QApplication.translate(
561 'ViewManager',
558 """<b>Close Window</b>""" 562 """<b>Close Window</b>"""
559 """<p>Close the current window.</p>""" 563 """<p>Close the current window.</p>"""
560 )) 564 ))
561 self.closeAct.triggered[()].connect(self.closeCurrentWindow) 565 self.closeAct.triggered[()].connect(self.closeCurrentWindow)
562 self.fileActions.append(self.closeAct) 566 self.fileActions.append(self.closeAct)
565 QApplication.translate('ViewManager', 'Close All'), 569 QApplication.translate('ViewManager', 'Close All'),
566 QApplication.translate('ViewManager', 'Clos&e All'), 570 QApplication.translate('ViewManager', 'Clos&e All'),
567 0, 0, self.closeActGrp, 'vm_file_close_all') 571 0, 0, self.closeActGrp, 'vm_file_close_all')
568 self.closeAllAct.setStatusTip( 572 self.closeAllAct.setStatusTip(
569 QApplication.translate('ViewManager', 'Close all editor windows')) 573 QApplication.translate('ViewManager', 'Close all editor windows'))
570 self.closeAllAct.setWhatsThis(QApplication.translate('ViewManager', 574 self.closeAllAct.setWhatsThis(QApplication.translate(
575 'ViewManager',
571 """<b>Close All Windows</b>""" 576 """<b>Close All Windows</b>"""
572 """<p>Close all editor windows.</p>""" 577 """<p>Close all editor windows.</p>"""
573 )) 578 ))
574 self.closeAllAct.triggered[()].connect(self.closeAllWindows) 579 self.closeAllAct.triggered[()].connect(self.closeAllWindows)
575 self.fileActions.append(self.closeAllAct) 580 self.fileActions.append(self.closeAllAct)
585 QKeySequence(QApplication.translate( 590 QKeySequence(QApplication.translate(
586 'ViewManager', "Ctrl+S", "File|Save")), 591 'ViewManager', "Ctrl+S", "File|Save")),
587 0, self.saveActGrp, 'vm_file_save') 592 0, self.saveActGrp, 'vm_file_save')
588 self.saveAct.setStatusTip( 593 self.saveAct.setStatusTip(
589 QApplication.translate('ViewManager', 'Save the current file')) 594 QApplication.translate('ViewManager', 'Save the current file'))
590 self.saveAct.setWhatsThis(QApplication.translate('ViewManager', 595 self.saveAct.setWhatsThis(QApplication.translate(
596 'ViewManager',
591 """<b>Save File</b>""" 597 """<b>Save File</b>"""
592 """<p>Save the contents of current editor window.</p>""" 598 """<p>Save the contents of current editor window.</p>"""
593 )) 599 ))
594 self.saveAct.triggered[()].connect(self.saveCurrentEditor) 600 self.saveAct.triggered[()].connect(self.saveCurrentEditor)
595 self.fileActions.append(self.saveAct) 601 self.fileActions.append(self.saveAct)
596 602
597 self.saveAsAct = E5Action( 603 self.saveAsAct = E5Action(
598 QApplication.translate('ViewManager', 'Save as'), 604 QApplication.translate('ViewManager', 'Save as'),
599 UI.PixmapCache.getIcon("fileSaveAs.png"), 605 UI.PixmapCache.getIcon("fileSaveAs.png"),
600 QApplication.translate('ViewManager', 'Save &as...'), 606 QApplication.translate('ViewManager', 'Save &as...'),
601 QKeySequence(QApplication.translate('ViewManager', 607 QKeySequence(QApplication.translate(
602 "Shift+Ctrl+S", "File|Save As")), 608 'ViewManager', "Shift+Ctrl+S", "File|Save As")),
603 0, self.saveActGrp, 'vm_file_save_as') 609 0, self.saveActGrp, 'vm_file_save_as')
604 self.saveAsAct.setStatusTip(QApplication.translate('ViewManager', 610 self.saveAsAct.setStatusTip(QApplication.translate(
605 'Save the current file to a new one')) 611 'ViewManager', 'Save the current file to a new one'))
606 self.saveAsAct.setWhatsThis(QApplication.translate('ViewManager', 612 self.saveAsAct.setWhatsThis(QApplication.translate(
613 'ViewManager',
607 """<b>Save File as</b>""" 614 """<b>Save File as</b>"""
608 """<p>Save the contents of current editor window to a new file.""" 615 """<p>Save the contents of current editor window to a new file."""
609 """ The file can be entered in a file selection dialog.</p>""" 616 """ The file can be entered in a file selection dialog.</p>"""
610 )) 617 ))
611 self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor) 618 self.saveAsAct.triggered[()].connect(self.saveAsCurrentEditor)
614 self.saveAllAct = E5Action( 621 self.saveAllAct = E5Action(
615 QApplication.translate('ViewManager', 'Save all'), 622 QApplication.translate('ViewManager', 'Save all'),
616 UI.PixmapCache.getIcon("fileSaveAll.png"), 623 UI.PixmapCache.getIcon("fileSaveAll.png"),
617 QApplication.translate('ViewManager', 'Save a&ll'), 624 QApplication.translate('ViewManager', 'Save a&ll'),
618 0, 0, self.saveActGrp, 'vm_file_save_all') 625 0, 0, self.saveActGrp, 'vm_file_save_all')
619 self.saveAllAct.setStatusTip(QApplication.translate('ViewManager', 626 self.saveAllAct.setStatusTip(QApplication.translate(
620 'Save all files')) 627 'ViewManager', 'Save all files'))
621 self.saveAllAct.setWhatsThis(QApplication.translate('ViewManager', 628 self.saveAllAct.setWhatsThis(QApplication.translate(
629 'ViewManager',
622 """<b>Save All Files</b>""" 630 """<b>Save All Files</b>"""
623 """<p>Save the contents of all editor windows.</p>""" 631 """<p>Save the contents of all editor windows.</p>"""
624 )) 632 ))
625 self.saveAllAct.triggered[()].connect(self.saveAllEditors) 633 self.saveAllAct.triggered[()].connect(self.saveAllEditors)
626 self.fileActions.append(self.saveAllAct) 634 self.fileActions.append(self.saveAllAct)
629 637
630 self.printAct = E5Action( 638 self.printAct = E5Action(
631 QApplication.translate('ViewManager', 'Print'), 639 QApplication.translate('ViewManager', 'Print'),
632 UI.PixmapCache.getIcon("print.png"), 640 UI.PixmapCache.getIcon("print.png"),
633 QApplication.translate('ViewManager', '&Print'), 641 QApplication.translate('ViewManager', '&Print'),
634 QKeySequence(QApplication.translate('ViewManager', 642 QKeySequence(QApplication.translate(
635 "Ctrl+P", "File|Print")), 643 'ViewManager', "Ctrl+P", "File|Print")),
636 0, self, 'vm_file_print') 644 0, self, 'vm_file_print')
637 self.printAct.setStatusTip(QApplication.translate('ViewManager', 645 self.printAct.setStatusTip(QApplication.translate(
638 'Print the current file')) 646 'ViewManager', 'Print the current file'))
639 self.printAct.setWhatsThis(QApplication.translate('ViewManager', 647 self.printAct.setWhatsThis(QApplication.translate(
648 'ViewManager',
640 """<b>Print File</b>""" 649 """<b>Print File</b>"""
641 """<p>Print the contents of current editor window.</p>""" 650 """<p>Print the contents of current editor window.</p>"""
642 )) 651 ))
643 self.printAct.triggered[()].connect(self.printCurrentEditor) 652 self.printAct.triggered[()].connect(self.printCurrentEditor)
644 self.printAct.setEnabled(False) 653 self.printAct.setEnabled(False)
645 self.fileActions.append(self.printAct) 654 self.fileActions.append(self.printAct)
646 655
647 self.printPreviewAct = \ 656 self.printPreviewAct = E5Action(
648 E5Action(QApplication.translate('ViewManager', 'Print Preview'), 657 QApplication.translate('ViewManager', 'Print Preview'),
649 UI.PixmapCache.getIcon("printPreview.png"), 658 UI.PixmapCache.getIcon("printPreview.png"),
650 QApplication.translate('ViewManager', 'Print Preview'), 659 QApplication.translate('ViewManager', 'Print Preview'),
651 0, 0, self, 'vm_file_print_preview') 660 0, 0, self, 'vm_file_print_preview')
652 self.printPreviewAct.setStatusTip(QApplication.translate('ViewManager', 661 self.printPreviewAct.setStatusTip(QApplication.translate(
653 'Print preview of the current file')) 662 'ViewManager', 'Print preview of the current file'))
654 self.printPreviewAct.setWhatsThis(QApplication.translate('ViewManager', 663 self.printPreviewAct.setWhatsThis(QApplication.translate(
664 'ViewManager',
655 """<b>Print Preview</b>""" 665 """<b>Print Preview</b>"""
656 """<p>Print preview of the current editor window.</p>""" 666 """<p>Print preview of the current editor window.</p>"""
657 )) 667 ))
658 self.printPreviewAct.triggered[()].connect( 668 self.printPreviewAct.triggered[()].connect(
659 self.printPreviewCurrentEditor) 669 self.printPreviewCurrentEditor)
660 self.printPreviewAct.setEnabled(False) 670 self.printPreviewAct.setEnabled(False)
661 self.fileActions.append(self.printPreviewAct) 671 self.fileActions.append(self.printPreviewAct)
662 672
663 self.findFileNameAct = E5Action(QApplication.translate('ViewManager', 673 self.findFileNameAct = E5Action(
664 'Search File'), 674 QApplication.translate('ViewManager', 'Search File'),
665 QApplication.translate('ViewManager', 'Search &File...'), 675 QApplication.translate('ViewManager', 'Search &File...'),
666 QKeySequence(QApplication.translate('ViewManager', 676 QKeySequence(QApplication.translate(
667 "Alt+Ctrl+F", "File|Search File")), 677 'ViewManager', "Alt+Ctrl+F", "File|Search File")),
668 0, self, 'vm_file_search_file') 678 0, self, 'vm_file_search_file')
669 self.findFileNameAct.setStatusTip(QApplication.translate('ViewManager', 679 self.findFileNameAct.setStatusTip(QApplication.translate(
670 'Search for a file')) 680 'ViewManager', 'Search for a file'))
671 self.findFileNameAct.setWhatsThis(QApplication.translate('ViewManager', 681 self.findFileNameAct.setWhatsThis(QApplication.translate(
682 'ViewManager',
672 """<b>Search File</b>""" 683 """<b>Search File</b>"""
673 """<p>Search for a file.</p>""" 684 """<p>Search for a file.</p>"""
674 )) 685 ))
675 self.findFileNameAct.triggered[()].connect(self.__findFileName) 686 self.findFileNameAct.triggered[()].connect(self.__findFileName)
676 self.fileActions.append(self.findFileNameAct) 687 self.fileActions.append(self.findFileNameAct)
680 Public method to create the File menu. 691 Public method to create the File menu.
681 692
682 @return the generated menu 693 @return the generated menu
683 """ 694 """
684 menu = QMenu(QApplication.translate('ViewManager', '&File'), self.ui) 695 menu = QMenu(QApplication.translate('ViewManager', '&File'), self.ui)
685 self.recentMenu = QMenu(QApplication.translate('ViewManager', 696 self.recentMenu = QMenu(
686 'Open &Recent Files'), menu) 697 QApplication.translate('ViewManager', 'Open &Recent Files'),
687 self.bookmarkedMenu = QMenu(QApplication.translate('ViewManager', 698 menu)
688 'Open &Bookmarked Files'), menu) 699 self.bookmarkedMenu = QMenu(
700 QApplication.translate('ViewManager', 'Open &Bookmarked Files'),
701 menu)
689 self.exportersMenu = self.__initContextMenuExporters() 702 self.exportersMenu = self.__initContextMenuExporters()
690 menu.setTearOffEnabled(True) 703 menu.setTearOffEnabled(True)
691 704
692 menu.addAction(self.newAct) 705 menu.addAction(self.newAct)
693 menu.addAction(self.openAct) 706 menu.addAction(self.openAct)
772 Private method defining the user interface actions for the edit 785 Private method defining the user interface actions for the edit
773 commands. 786 commands.
774 """ 787 """
775 self.editActGrp = createActionGroup(self) 788 self.editActGrp = createActionGroup(self)
776 789
777 self.undoAct = E5Action(QApplication.translate('ViewManager', 'Undo'), 790 self.undoAct = E5Action(
778 UI.PixmapCache.getIcon("editUndo.png"), 791 QApplication.translate('ViewManager', 'Undo'),
779 QApplication.translate('ViewManager', '&Undo'), 792 UI.PixmapCache.getIcon("editUndo.png"),
780 QKeySequence(QApplication.translate('ViewManager', 793 QApplication.translate('ViewManager', '&Undo'),
781 "Ctrl+Z", "Edit|Undo")), 794 QKeySequence(QApplication.translate(
782 QKeySequence(QApplication.translate('ViewManager', 795 'ViewManager', "Ctrl+Z", "Edit|Undo")),
783 "Alt+Backspace", "Edit|Undo")), 796 QKeySequence(QApplication.translate(
784 self.editActGrp, 'vm_edit_undo') 797 'ViewManager', "Alt+Backspace", "Edit|Undo")),
785 self.undoAct.setStatusTip(QApplication.translate('ViewManager', 798 self.editActGrp, 'vm_edit_undo')
786 'Undo the last change')) 799 self.undoAct.setStatusTip(QApplication.translate(
787 self.undoAct.setWhatsThis(QApplication.translate('ViewManager', 800 'ViewManager', 'Undo the last change'))
801 self.undoAct.setWhatsThis(QApplication.translate(
802 'ViewManager',
788 """<b>Undo</b>""" 803 """<b>Undo</b>"""
789 """<p>Undo the last change done in the current editor.</p>""" 804 """<p>Undo the last change done in the current editor.</p>"""
790 )) 805 ))
791 self.undoAct.triggered[()].connect(self.__editUndo) 806 self.undoAct.triggered[()].connect(self.__editUndo)
792 self.editActions.append(self.undoAct) 807 self.editActions.append(self.undoAct)
793 808
794 self.redoAct = E5Action(QApplication.translate('ViewManager', 'Redo'), 809 self.redoAct = E5Action(
795 UI.PixmapCache.getIcon("editRedo.png"), 810 QApplication.translate('ViewManager', 'Redo'),
796 QApplication.translate('ViewManager', '&Redo'), 811 UI.PixmapCache.getIcon("editRedo.png"),
797 QKeySequence(QApplication.translate('ViewManager', 812 QApplication.translate('ViewManager', '&Redo'),
798 "Ctrl+Shift+Z", "Edit|Redo")), 813 QKeySequence(QApplication.translate(
799 0, 814 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")),
800 self.editActGrp, 'vm_edit_redo') 815 0,
801 self.redoAct.setStatusTip(QApplication.translate('ViewManager', 816 self.editActGrp, 'vm_edit_redo')
802 'Redo the last change')) 817 self.redoAct.setStatusTip(QApplication.translate(
803 self.redoAct.setWhatsThis(QApplication.translate('ViewManager', 818 'ViewManager', 'Redo the last change'))
819 self.redoAct.setWhatsThis(QApplication.translate(
820 'ViewManager',
804 """<b>Redo</b>""" 821 """<b>Redo</b>"""
805 """<p>Redo the last change done in the current editor.</p>""" 822 """<p>Redo the last change done in the current editor.</p>"""
806 )) 823 ))
807 self.redoAct.triggered[()].connect(self.__editRedo) 824 self.redoAct.triggered[()].connect(self.__editRedo)
808 self.editActions.append(self.redoAct) 825 self.editActions.append(self.redoAct)
809 826
810 self.revertAct = E5Action(QApplication.translate('ViewManager', 827 self.revertAct = E5Action(
811 'Revert to last saved state'), 828 QApplication.translate(
812 QApplication.translate( 829 'ViewManager', 'Revert to last saved state'),
813 'ViewManager', 'Re&vert to last saved state'), 830 QApplication.translate(
814 QKeySequence(QApplication.translate('ViewManager', 831 'ViewManager', 'Re&vert to last saved state'),
815 "Ctrl+Y", "Edit|Revert")), 832 QKeySequence(QApplication.translate(
816 0, 833 'ViewManager', "Ctrl+Y", "Edit|Revert")),
817 self.editActGrp, 'vm_edit_revert') 834 0,
818 self.revertAct.setStatusTip(QApplication.translate('ViewManager', 835 self.editActGrp, 'vm_edit_revert')
819 'Revert to last saved state')) 836 self.revertAct.setStatusTip(QApplication.translate(
820 self.revertAct.setWhatsThis(QApplication.translate('ViewManager', 837 'ViewManager', 'Revert to last saved state'))
838 self.revertAct.setWhatsThis(QApplication.translate(
839 'ViewManager',
821 """<b>Revert to last saved state</b>""" 840 """<b>Revert to last saved state</b>"""
822 """<p>Undo all changes up to the last saved state""" 841 """<p>Undo all changes up to the last saved state"""
823 """ of the current editor.</p>""" 842 """ of the current editor.</p>"""
824 )) 843 ))
825 self.revertAct.triggered[()].connect(self.__editRevert) 844 self.revertAct.triggered[()].connect(self.__editRevert)
826 self.editActions.append(self.revertAct) 845 self.editActions.append(self.revertAct)
827 846
828 self.copyActGrp = createActionGroup(self.editActGrp) 847 self.copyActGrp = createActionGroup(self.editActGrp)
829 848
830 self.cutAct = E5Action(QApplication.translate('ViewManager', 'Cut'), 849 self.cutAct = E5Action(
831 UI.PixmapCache.getIcon("editCut.png"), 850 QApplication.translate('ViewManager', 'Cut'),
832 QApplication.translate('ViewManager', 'Cu&t'), 851 UI.PixmapCache.getIcon("editCut.png"),
833 QKeySequence(QApplication.translate('ViewManager', 852 QApplication.translate('ViewManager', 'Cu&t'),
834 "Ctrl+X", "Edit|Cut")), 853 QKeySequence(QApplication.translate(
835 QKeySequence(QApplication.translate('ViewManager', 854 'ViewManager', "Ctrl+X", "Edit|Cut")),
836 "Shift+Del", "Edit|Cut")), 855 QKeySequence(QApplication.translate(
837 self.copyActGrp, 'vm_edit_cut') 856 'ViewManager', "Shift+Del", "Edit|Cut")),
838 self.cutAct.setStatusTip(QApplication.translate('ViewManager', 857 self.copyActGrp, 'vm_edit_cut')
839 'Cut the selection')) 858 self.cutAct.setStatusTip(QApplication.translate(
840 self.cutAct.setWhatsThis(QApplication.translate('ViewManager', 859 'ViewManager', 'Cut the selection'))
860 self.cutAct.setWhatsThis(QApplication.translate(
861 'ViewManager',
841 """<b>Cut</b>""" 862 """<b>Cut</b>"""
842 """<p>Cut the selected text of the current editor to the""" 863 """<p>Cut the selected text of the current editor to the"""
843 """ clipboard.</p>""" 864 """ clipboard.</p>"""
844 )) 865 ))
845 self.cutAct.triggered[()].connect(self.__editCut) 866 self.cutAct.triggered[()].connect(self.__editCut)
846 self.editActions.append(self.cutAct) 867 self.editActions.append(self.cutAct)
847 868
848 self.copyAct = E5Action(QApplication.translate('ViewManager', 'Copy'), 869 self.copyAct = E5Action(
849 UI.PixmapCache.getIcon("editCopy.png"), 870 QApplication.translate('ViewManager', 'Copy'),
850 QApplication.translate('ViewManager', '&Copy'), 871 UI.PixmapCache.getIcon("editCopy.png"),
851 QKeySequence(QApplication.translate('ViewManager', 872 QApplication.translate('ViewManager', '&Copy'),
852 "Ctrl+C", "Edit|Copy")), 873 QKeySequence(QApplication.translate(
853 QKeySequence(QApplication.translate('ViewManager', 874 'ViewManager', "Ctrl+C", "Edit|Copy")),
854 "Ctrl+Ins", "Edit|Copy")), 875 QKeySequence(QApplication.translate(
855 self.copyActGrp, 'vm_edit_copy') 876 'ViewManager', "Ctrl+Ins", "Edit|Copy")),
856 self.copyAct.setStatusTip(QApplication.translate('ViewManager', 877 self.copyActGrp, 'vm_edit_copy')
857 'Copy the selection')) 878 self.copyAct.setStatusTip(QApplication.translate(
858 self.copyAct.setWhatsThis(QApplication.translate('ViewManager', 879 'ViewManager', 'Copy the selection'))
880 self.copyAct.setWhatsThis(QApplication.translate(
881 'ViewManager',
859 """<b>Copy</b>""" 882 """<b>Copy</b>"""
860 """<p>Copy the selected text of the current editor to the""" 883 """<p>Copy the selected text of the current editor to the"""
861 """ clipboard.</p>""" 884 """ clipboard.</p>"""
862 )) 885 ))
863 self.copyAct.triggered[()].connect(self.__editCopy) 886 self.copyAct.triggered[()].connect(self.__editCopy)
865 888
866 self.pasteAct = E5Action( 889 self.pasteAct = E5Action(
867 QApplication.translate('ViewManager', 'Paste'), 890 QApplication.translate('ViewManager', 'Paste'),
868 UI.PixmapCache.getIcon("editPaste.png"), 891 UI.PixmapCache.getIcon("editPaste.png"),
869 QApplication.translate('ViewManager', '&Paste'), 892 QApplication.translate('ViewManager', '&Paste'),
870 QKeySequence(QApplication.translate('ViewManager', 893 QKeySequence(QApplication.translate(
871 "Ctrl+V", "Edit|Paste")), 894 'ViewManager', "Ctrl+V", "Edit|Paste")),
872 QKeySequence(QApplication.translate('ViewManager', 895 QKeySequence(QApplication.translate(
873 "Shift+Ins", "Edit|Paste")), 896 'ViewManager', "Shift+Ins", "Edit|Paste")),
874 self.copyActGrp, 'vm_edit_paste') 897 self.copyActGrp, 'vm_edit_paste')
875 self.pasteAct.setStatusTip(QApplication.translate('ViewManager', 898 self.pasteAct.setStatusTip(QApplication.translate(
876 'Paste the last cut/copied text')) 899 'ViewManager', 'Paste the last cut/copied text'))
877 self.pasteAct.setWhatsThis(QApplication.translate('ViewManager', 900 self.pasteAct.setWhatsThis(QApplication.translate(
901 'ViewManager',
878 """<b>Paste</b>""" 902 """<b>Paste</b>"""
879 """<p>Paste the last cut/copied text from the clipboard to""" 903 """<p>Paste the last cut/copied text from the clipboard to"""
880 """ the current editor.</p>""" 904 """ the current editor.</p>"""
881 )) 905 ))
882 self.pasteAct.triggered[()].connect(self.__editPaste) 906 self.pasteAct.triggered[()].connect(self.__editPaste)
884 908
885 self.deleteAct = E5Action( 909 self.deleteAct = E5Action(
886 QApplication.translate('ViewManager', 'Clear'), 910 QApplication.translate('ViewManager', 'Clear'),
887 UI.PixmapCache.getIcon("editDelete.png"), 911 UI.PixmapCache.getIcon("editDelete.png"),
888 QApplication.translate('ViewManager', 'Clear'), 912 QApplication.translate('ViewManager', 'Clear'),
889 QKeySequence(QApplication.translate('ViewManager', 913 QKeySequence(QApplication.translate(
890 "Alt+Shift+C", "Edit|Clear")), 914 'ViewManager', "Alt+Shift+C", "Edit|Clear")),
891 0, 915 0,
892 self.copyActGrp, 'vm_edit_clear') 916 self.copyActGrp, 'vm_edit_clear')
893 self.deleteAct.setStatusTip(QApplication.translate('ViewManager', 917 self.deleteAct.setStatusTip(QApplication.translate(
894 'Clear all text')) 918 'ViewManager', 'Clear all text'))
895 self.deleteAct.setWhatsThis(QApplication.translate('ViewManager', 919 self.deleteAct.setWhatsThis(QApplication.translate(
920 'ViewManager',
896 """<b>Clear</b>""" 921 """<b>Clear</b>"""
897 """<p>Delete all text of the current editor.</p>""" 922 """<p>Delete all text of the current editor.</p>"""
898 )) 923 ))
899 self.deleteAct.triggered[()].connect(self.__editDelete) 924 self.deleteAct.triggered[()].connect(self.__editDelete)
900 self.editActions.append(self.deleteAct) 925 self.editActions.append(self.deleteAct)
901 926
902 self.joinAct = E5Action( 927 self.joinAct = E5Action(
903 QApplication.translate('ViewManager', 'Join Lines'), 928 QApplication.translate('ViewManager', 'Join Lines'),
904 QApplication.translate('ViewManager', 'Join Lines'), 929 QApplication.translate('ViewManager', 'Join Lines'),
905 QKeySequence(QApplication.translate('ViewManager', 930 QKeySequence(QApplication.translate(
906 "Ctrl+J", "Edit|Join Lines")), 931 'ViewManager', "Ctrl+J", "Edit|Join Lines")),
907 0, 932 0,
908 self.copyActGrp, 'vm_edit_join_lines') 933 self.copyActGrp, 'vm_edit_join_lines')
909 self.joinAct.setStatusTip(QApplication.translate('ViewManager', 934 self.joinAct.setStatusTip(QApplication.translate(
910 'Join Lines')) 935 'ViewManager', 'Join Lines'))
911 self.joinAct.setWhatsThis(QApplication.translate('ViewManager', 936 self.joinAct.setWhatsThis(QApplication.translate(
937 'ViewManager',
912 """<b>Join Lines</b>""" 938 """<b>Join Lines</b>"""
913 """<p>Join the current and the next lines.</p>""" 939 """<p>Join the current and the next lines.</p>"""
914 )) 940 ))
915 self.joinAct.triggered[()].connect(self.__editJoin) 941 self.joinAct.triggered[()].connect(self.__editJoin)
916 self.editActions.append(self.joinAct) 942 self.editActions.append(self.joinAct)
917 943
918 self.indentAct = E5Action( 944 self.indentAct = E5Action(
919 QApplication.translate('ViewManager', 'Indent'), 945 QApplication.translate('ViewManager', 'Indent'),
920 UI.PixmapCache.getIcon("editIndent.png"), 946 UI.PixmapCache.getIcon("editIndent.png"),
921 QApplication.translate('ViewManager', '&Indent'), 947 QApplication.translate('ViewManager', '&Indent'),
922 QKeySequence(QApplication.translate('ViewManager', 948 QKeySequence(QApplication.translate(
923 "Ctrl+I", "Edit|Indent")), 949 'ViewManager', "Ctrl+I", "Edit|Indent")),
924 0, 950 0,
925 self.editActGrp, 'vm_edit_indent') 951 self.editActGrp, 'vm_edit_indent')
926 self.indentAct.setStatusTip(QApplication.translate('ViewManager', 952 self.indentAct.setStatusTip(QApplication.translate(
927 'Indent line')) 953 'ViewManager', 'Indent line'))
928 self.indentAct.setWhatsThis(QApplication.translate('ViewManager', 954 self.indentAct.setWhatsThis(QApplication.translate(
955 'ViewManager',
929 """<b>Indent</b>""" 956 """<b>Indent</b>"""
930 """<p>Indents the current line or the lines of the""" 957 """<p>Indents the current line or the lines of the"""
931 """ selection by one level.</p>""" 958 """ selection by one level.</p>"""
932 )) 959 ))
933 self.indentAct.triggered[()].connect(self.__editIndent) 960 self.indentAct.triggered[()].connect(self.__editIndent)
935 962
936 self.unindentAct = E5Action( 963 self.unindentAct = E5Action(
937 QApplication.translate('ViewManager', 'Unindent'), 964 QApplication.translate('ViewManager', 'Unindent'),
938 UI.PixmapCache.getIcon("editUnindent.png"), 965 UI.PixmapCache.getIcon("editUnindent.png"),
939 QApplication.translate('ViewManager', 'U&nindent'), 966 QApplication.translate('ViewManager', 'U&nindent'),
940 QKeySequence(QApplication.translate('ViewManager', 967 QKeySequence(QApplication.translate(
941 "Ctrl+Shift+I", "Edit|Unindent")), 968 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")),
942 0, 969 0,
943 self.editActGrp, 'vm_edit_unindent') 970 self.editActGrp, 'vm_edit_unindent')
944 self.unindentAct.setStatusTip(QApplication.translate('ViewManager', 971 self.unindentAct.setStatusTip(QApplication.translate(
945 'Unindent line')) 972 'ViewManager', 'Unindent line'))
946 self.unindentAct.setWhatsThis(QApplication.translate('ViewManager', 973 self.unindentAct.setWhatsThis(QApplication.translate(
974 'ViewManager',
947 """<b>Unindent</b>""" 975 """<b>Unindent</b>"""
948 """<p>Unindents the current line or the lines of the""" 976 """<p>Unindents the current line or the lines of the"""
949 """ selection by one level.</p>""" 977 """ selection by one level.</p>"""
950 )) 978 ))
951 self.unindentAct.triggered[()].connect(self.__editUnindent) 979 self.unindentAct.triggered[()].connect(self.__editUnindent)
952 self.editActions.append(self.unindentAct) 980 self.editActions.append(self.unindentAct)
953 981
954 self.smartIndentAct = E5Action(QApplication.translate('ViewManager', 982 self.smartIndentAct = E5Action(
955 'Smart indent'), 983 QApplication.translate('ViewManager', 'Smart indent'),
956 UI.PixmapCache.getIcon("editSmartIndent.png"), 984 UI.PixmapCache.getIcon("editSmartIndent.png"),
957 QApplication.translate('ViewManager', 'Smart indent'), 985 QApplication.translate('ViewManager', 'Smart indent'),
958 QKeySequence(QApplication.translate('ViewManager', 986 QKeySequence(QApplication.translate(
959 "Ctrl+Alt+I", "Edit|Smart indent")), 987 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")),
960 0, 988 0,
961 self.editActGrp, 'vm_edit_smart_indent') 989 self.editActGrp, 'vm_edit_smart_indent')
962 self.smartIndentAct.setStatusTip(QApplication.translate('ViewManager', 990 self.smartIndentAct.setStatusTip(QApplication.translate(
963 'Smart indent Line or Selection')) 991 'ViewManager', 'Smart indent Line or Selection'))
964 self.smartIndentAct.setWhatsThis(QApplication.translate('ViewManager', 992 self.smartIndentAct.setWhatsThis(QApplication.translate(
993 'ViewManager',
965 """<b>Smart indent</b>""" 994 """<b>Smart indent</b>"""
966 """<p>Indents the current line or the lines of the""" 995 """<p>Indents the current line or the lines of the"""
967 """ current selection smartly.</p>""" 996 """ current selection smartly.</p>"""
968 )) 997 ))
969 self.smartIndentAct.triggered[()].connect(self.__editSmartIndent) 998 self.smartIndentAct.triggered[()].connect(self.__editSmartIndent)
971 1000
972 self.commentAct = E5Action( 1001 self.commentAct = E5Action(
973 QApplication.translate('ViewManager', 'Comment'), 1002 QApplication.translate('ViewManager', 'Comment'),
974 UI.PixmapCache.getIcon("editComment.png"), 1003 UI.PixmapCache.getIcon("editComment.png"),
975 QApplication.translate('ViewManager', 'C&omment'), 1004 QApplication.translate('ViewManager', 'C&omment'),
976 QKeySequence(QApplication.translate('ViewManager', 1005 QKeySequence(QApplication.translate(
977 "Ctrl+M", "Edit|Comment")), 1006 'ViewManager', "Ctrl+M", "Edit|Comment")),
978 0, 1007 0,
979 self.editActGrp, 'vm_edit_comment') 1008 self.editActGrp, 'vm_edit_comment')
980 self.commentAct.setStatusTip(QApplication.translate('ViewManager', 1009 self.commentAct.setStatusTip(QApplication.translate(
981 'Comment Line or Selection')) 1010 'ViewManager', 'Comment Line or Selection'))
982 self.commentAct.setWhatsThis(QApplication.translate('ViewManager', 1011 self.commentAct.setWhatsThis(QApplication.translate(
1012 'ViewManager',
983 """<b>Comment</b>""" 1013 """<b>Comment</b>"""
984 """<p>Comments the current line or the lines of the""" 1014 """<p>Comments the current line or the lines of the"""
985 """ current selection.</p>""" 1015 """ current selection.</p>"""
986 )) 1016 ))
987 self.commentAct.triggered[()].connect(self.__editComment) 1017 self.commentAct.triggered[()].connect(self.__editComment)
989 1019
990 self.uncommentAct = E5Action( 1020 self.uncommentAct = E5Action(
991 QApplication.translate('ViewManager', 'Uncomment'), 1021 QApplication.translate('ViewManager', 'Uncomment'),
992 UI.PixmapCache.getIcon("editUncomment.png"), 1022 UI.PixmapCache.getIcon("editUncomment.png"),
993 QApplication.translate('ViewManager', 'Unco&mment'), 1023 QApplication.translate('ViewManager', 'Unco&mment'),
994 QKeySequence(QApplication.translate('ViewManager', 1024 QKeySequence(QApplication.translate(
995 "Alt+Ctrl+M", "Edit|Uncomment")), 1025 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")),
996 0, 1026 0,
997 self.editActGrp, 'vm_edit_uncomment') 1027 self.editActGrp, 'vm_edit_uncomment')
998 self.uncommentAct.setStatusTip(QApplication.translate('ViewManager', 1028 self.uncommentAct.setStatusTip(QApplication.translate(
999 'Uncomment Line or Selection')) 1029 'ViewManager', 'Uncomment Line or Selection'))
1000 self.uncommentAct.setWhatsThis(QApplication.translate('ViewManager', 1030 self.uncommentAct.setWhatsThis(QApplication.translate(
1031 'ViewManager',
1001 """<b>Uncomment</b>""" 1032 """<b>Uncomment</b>"""
1002 """<p>Uncomments the current line or the lines of the""" 1033 """<p>Uncomments the current line or the lines of the"""
1003 """ current selection.</p>""" 1034 """ current selection.</p>"""
1004 )) 1035 ))
1005 self.uncommentAct.triggered[()].connect(self.__editUncomment) 1036 self.uncommentAct.triggered[()].connect(self.__editUncomment)
1006 self.editActions.append(self.uncommentAct) 1037 self.editActions.append(self.uncommentAct)
1007 1038
1008 self.toggleCommentAct = E5Action( 1039 self.toggleCommentAct = E5Action(
1009 QApplication.translate('ViewManager', 'Toggle Comment'), 1040 QApplication.translate('ViewManager', 'Toggle Comment'),
1010 UI.PixmapCache.getIcon("editToggleComment.png"), 1041 UI.PixmapCache.getIcon("editToggleComment.png"),
1011 QApplication.translate('ViewManager', 'Toggle Comment'), 1042 QApplication.translate('ViewManager', 'Toggle Comment'),
1012 QKeySequence(QApplication.translate('ViewManager', 1043 QKeySequence(QApplication.translate(
1013 "Ctrl+Shift+M", "Edit|Toggle Comment")), 1044 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")),
1014 0, 1045 0,
1015 self.editActGrp, 'vm_edit_toggle_comment') 1046 self.editActGrp, 'vm_edit_toggle_comment')
1016 self.toggleCommentAct.setStatusTip(QApplication.translate( 1047 self.toggleCommentAct.setStatusTip(QApplication.translate(
1017 'ViewManager', 1048 'ViewManager',
1018 'Toggle the comment of the current line, selection or' 1049 'Toggle the comment of the current line, selection or'
1019 ' comment block')) 1050 ' comment block'))
1020 self.toggleCommentAct.setWhatsThis(QApplication.translate( 1051 self.toggleCommentAct.setWhatsThis(QApplication.translate(
1021 'ViewManager', 1052 'ViewManager',
1022 """<b>Toggle Comment</b>""" 1053 """<b>Toggle Comment</b>"""
1023 """<p>If the current line does not start with a block comment,""" 1054 """<p>If the current line does not start with a block comment,"""
1024 """ the current line or selection is commented. If it is already""" 1055 """ the current line or selection is commented. If it is already"""
1042 """ selection.</p>""" 1073 """ selection.</p>"""
1043 )) 1074 ))
1044 self.streamCommentAct.triggered[()].connect(self.__editStreamComment) 1075 self.streamCommentAct.triggered[()].connect(self.__editStreamComment)
1045 self.editActions.append(self.streamCommentAct) 1076 self.editActions.append(self.streamCommentAct)
1046 1077
1047 self.boxCommentAct = E5Action(QApplication.translate('ViewManager', 1078 self.boxCommentAct = E5Action(
1048 'Box Comment'), 1079 QApplication.translate('ViewManager', 'Box Comment'),
1049 QApplication.translate('ViewManager', 'Box Comment'), 1080 QApplication.translate('ViewManager', 'Box Comment'),
1050 0, 0, 1081 0, 0,
1051 self.editActGrp, 'vm_edit_box_comment') 1082 self.editActGrp, 'vm_edit_box_comment')
1052 self.boxCommentAct.setStatusTip(QApplication.translate('ViewManager', 1083 self.boxCommentAct.setStatusTip(QApplication.translate(
1053 'Box Comment Line or Selection')) 1084 'ViewManager', 'Box Comment Line or Selection'))
1054 self.boxCommentAct.setWhatsThis(QApplication.translate('ViewManager', 1085 self.boxCommentAct.setWhatsThis(QApplication.translate(
1086 'ViewManager',
1055 """<b>Box Comment</b>""" 1087 """<b>Box Comment</b>"""
1056 """<p>Box comments the current line or the lines of the""" 1088 """<p>Box comments the current line or the lines of the"""
1057 """ current selection.</p>""" 1089 """ current selection.</p>"""
1058 )) 1090 ))
1059 self.boxCommentAct.triggered[()].connect(self.__editBoxComment) 1091 self.boxCommentAct.triggered[()].connect(self.__editBoxComment)
1060 self.editActions.append(self.boxCommentAct) 1092 self.editActions.append(self.boxCommentAct)
1061 1093
1062 self.selectBraceAct = E5Action(QApplication.translate('ViewManager', 1094 self.selectBraceAct = E5Action(
1063 'Select to brace'), 1095 QApplication.translate('ViewManager', 'Select to brace'),
1064 QApplication.translate('ViewManager', 'Select to &brace'), 1096 QApplication.translate('ViewManager', 'Select to &brace'),
1065 QKeySequence(QApplication.translate('ViewManager', 1097 QKeySequence(QApplication.translate(
1066 "Ctrl+E", "Edit|Select to brace")), 1098 'ViewManager', "Ctrl+E", "Edit|Select to brace")),
1067 0, 1099 0,
1068 self.editActGrp, 'vm_edit_select_to_brace') 1100 self.editActGrp, 'vm_edit_select_to_brace')
1069 self.selectBraceAct.setStatusTip(QApplication.translate('ViewManager', 1101 self.selectBraceAct.setStatusTip(QApplication.translate(
1070 'Select text to the matching brace')) 1102 'ViewManager', 'Select text to the matching brace'))
1071 self.selectBraceAct.setWhatsThis(QApplication.translate('ViewManager', 1103 self.selectBraceAct.setWhatsThis(QApplication.translate(
1104 'ViewManager',
1072 """<b>Select to brace</b>""" 1105 """<b>Select to brace</b>"""
1073 """<p>Select text of the current editor to the matching""" 1106 """<p>Select text of the current editor to the matching"""
1074 """ brace.</p>""" 1107 """ brace.</p>"""
1075 )) 1108 ))
1076 self.selectBraceAct.triggered[()].connect(self.__editSelectBrace) 1109 self.selectBraceAct.triggered[()].connect(self.__editSelectBrace)
1077 self.editActions.append(self.selectBraceAct) 1110 self.editActions.append(self.selectBraceAct)
1078 1111
1079 self.selectAllAct = E5Action( 1112 self.selectAllAct = E5Action(
1080 QApplication.translate('ViewManager', 'Select all'), 1113 QApplication.translate('ViewManager', 'Select all'),
1081 QApplication.translate('ViewManager', '&Select all'), 1114 QApplication.translate('ViewManager', '&Select all'),
1082 QKeySequence(QApplication.translate('ViewManager', 1115 QKeySequence(QApplication.translate(
1083 "Ctrl+A", "Edit|Select all")), 1116 'ViewManager', "Ctrl+A", "Edit|Select all")),
1084 0, 1117 0,
1085 self.editActGrp, 'vm_edit_select_all') 1118 self.editActGrp, 'vm_edit_select_all')
1086 self.selectAllAct.setStatusTip(QApplication.translate('ViewManager', 1119 self.selectAllAct.setStatusTip(QApplication.translate(
1087 'Select all text')) 1120 'ViewManager', 'Select all text'))
1088 self.selectAllAct.setWhatsThis(QApplication.translate('ViewManager', 1121 self.selectAllAct.setWhatsThis(QApplication.translate(
1122 'ViewManager',
1089 """<b>Select All</b>""" 1123 """<b>Select All</b>"""
1090 """<p>Select all text of the current editor.</p>""" 1124 """<p>Select all text of the current editor.</p>"""
1091 )) 1125 ))
1092 self.selectAllAct.triggered[()].connect(self.__editSelectAll) 1126 self.selectAllAct.triggered[()].connect(self.__editSelectAll)
1093 self.editActions.append(self.selectAllAct) 1127 self.editActions.append(self.selectAllAct)
1094 1128
1095 self.deselectAllAct = E5Action(QApplication.translate('ViewManager', 1129 self.deselectAllAct = E5Action(
1096 'Deselect all'), 1130 QApplication.translate('ViewManager', 'Deselect all'),
1097 QApplication.translate('ViewManager', '&Deselect all'), 1131 QApplication.translate('ViewManager', '&Deselect all'),
1098 QKeySequence(QApplication.translate('ViewManager', 1132 QKeySequence(QApplication.translate(
1099 "Alt+Ctrl+A", "Edit|Deselect all")), 1133 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")),
1100 0, 1134 0,
1101 self.editActGrp, 'vm_edit_deselect_all') 1135 self.editActGrp, 'vm_edit_deselect_all')
1102 self.deselectAllAct.setStatusTip(QApplication.translate('ViewManager', 1136 self.deselectAllAct.setStatusTip(QApplication.translate(
1103 'Deselect all text')) 1137 'ViewManager', 'Deselect all text'))
1104 self.deselectAllAct.setWhatsThis(QApplication.translate('ViewManager', 1138 self.deselectAllAct.setWhatsThis(QApplication.translate(
1139 'ViewManager',
1105 """<b>Deselect All</b>""" 1140 """<b>Deselect All</b>"""
1106 """<p>Deselect all text of the current editor.</p>""" 1141 """<p>Deselect all text of the current editor.</p>"""
1107 )) 1142 ))
1108 self.deselectAllAct.triggered[()].connect(self.__editDeselectAll) 1143 self.deselectAllAct.triggered[()].connect(self.__editDeselectAll)
1109 self.editActions.append(self.deselectAllAct) 1144 self.editActions.append(self.deselectAllAct)
1113 'ViewManager', 'Convert Line End Characters'), 1148 'ViewManager', 'Convert Line End Characters'),
1114 QApplication.translate( 1149 QApplication.translate(
1115 'ViewManager', 'Convert &Line End Characters'), 1150 'ViewManager', 'Convert &Line End Characters'),
1116 0, 0, 1151 0, 0,
1117 self.editActGrp, 'vm_edit_convert_eol') 1152 self.editActGrp, 'vm_edit_convert_eol')
1118 self.convertEOLAct.setStatusTip(QApplication.translate('ViewManager', 1153 self.convertEOLAct.setStatusTip(QApplication.translate(
1119 'Convert Line End Characters')) 1154 'ViewManager', 'Convert Line End Characters'))
1120 self.convertEOLAct.setWhatsThis(QApplication.translate('ViewManager', 1155 self.convertEOLAct.setWhatsThis(QApplication.translate(
1156 'ViewManager',
1121 """<b>Convert Line End Characters</b>""" 1157 """<b>Convert Line End Characters</b>"""
1122 """<p>Convert the line end characters to the currently set""" 1158 """<p>Convert the line end characters to the currently set"""
1123 """ type.</p>""" 1159 """ type.</p>"""
1124 )) 1160 ))
1125 self.convertEOLAct.triggered[()].connect(self.__convertEOL) 1161 self.convertEOLAct.triggered[()].connect(self.__convertEOL)
1126 self.editActions.append(self.convertEOLAct) 1162 self.editActions.append(self.convertEOLAct)
1127 1163
1128 self.shortenEmptyAct = E5Action(QApplication.translate('ViewManager', 1164 self.shortenEmptyAct = E5Action(
1129 'Shorten empty lines'), 1165 QApplication.translate('ViewManager', 'Shorten empty lines'),
1130 QApplication.translate('ViewManager', 'Shorten empty lines'), 1166 QApplication.translate('ViewManager', 'Shorten empty lines'),
1131 0, 0, 1167 0, 0,
1132 self.editActGrp, 'vm_edit_shorten_empty_lines') 1168 self.editActGrp, 'vm_edit_shorten_empty_lines')
1133 self.shortenEmptyAct.setStatusTip(QApplication.translate('ViewManager', 1169 self.shortenEmptyAct.setStatusTip(QApplication.translate(
1134 'Shorten empty lines')) 1170 'ViewManager', 'Shorten empty lines'))
1135 self.shortenEmptyAct.setWhatsThis(QApplication.translate('ViewManager', 1171 self.shortenEmptyAct.setWhatsThis(QApplication.translate(
1172 'ViewManager',
1136 """<b>Shorten empty lines</b>""" 1173 """<b>Shorten empty lines</b>"""
1137 """<p>Shorten lines consisting solely of whitespace""" 1174 """<p>Shorten lines consisting solely of whitespace"""
1138 """ characters.</p>""" 1175 """ characters.</p>"""
1139 )) 1176 ))
1140 self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines) 1177 self.shortenEmptyAct.triggered[()].connect(self.__shortenEmptyLines)
1141 self.editActions.append(self.shortenEmptyAct) 1178 self.editActions.append(self.shortenEmptyAct)
1142 1179
1143 self.autoCompleteAct = E5Action(QApplication.translate('ViewManager', 1180 self.autoCompleteAct = E5Action(
1144 'Autocomplete'), 1181 QApplication.translate('ViewManager', 'Autocomplete'),
1145 QApplication.translate('ViewManager', '&Autocomplete'), 1182 QApplication.translate('ViewManager', '&Autocomplete'),
1146 QKeySequence(QApplication.translate('ViewManager', 1183 QKeySequence(QApplication.translate(
1147 "Ctrl+Space", "Edit|Autocomplete")), 1184 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")),
1148 0, 1185 0,
1149 self.editActGrp, 'vm_edit_autocomplete') 1186 self.editActGrp, 'vm_edit_autocomplete')
1150 self.autoCompleteAct.setStatusTip(QApplication.translate('ViewManager', 1187 self.autoCompleteAct.setStatusTip(QApplication.translate(
1151 'Autocomplete current word')) 1188 'ViewManager', 'Autocomplete current word'))
1152 self.autoCompleteAct.setWhatsThis(QApplication.translate('ViewManager', 1189 self.autoCompleteAct.setWhatsThis(QApplication.translate(
1190 'ViewManager',
1153 """<b>Autocomplete</b>""" 1191 """<b>Autocomplete</b>"""
1154 """<p>Performs an autocompletion of the word containing""" 1192 """<p>Performs an autocompletion of the word containing"""
1155 """ the cursor.</p>""" 1193 """ the cursor.</p>"""
1156 )) 1194 ))
1157 self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete) 1195 self.autoCompleteAct.triggered[()].connect(self.__editAutoComplete)
1222 )) 1260 ))
1223 self.autoCompleteFromAllAct.triggered[()].connect( 1261 self.autoCompleteFromAllAct.triggered[()].connect(
1224 self.__editAutoCompleteFromAll) 1262 self.__editAutoCompleteFromAll)
1225 self.editActions.append(self.autoCompleteFromAllAct) 1263 self.editActions.append(self.autoCompleteFromAllAct)
1226 1264
1227 self.calltipsAct = E5Action(QApplication.translate('ViewManager', 1265 self.calltipsAct = E5Action(
1228 'Calltip'), 1266 QApplication.translate('ViewManager', 'Calltip'),
1229 QApplication.translate('ViewManager', '&Calltip'), 1267 QApplication.translate('ViewManager', '&Calltip'),
1230 QKeySequence(QApplication.translate('ViewManager', 1268 QKeySequence(QApplication.translate(
1231 "Alt+Space", "Edit|Calltip")), 1269 'ViewManager', "Alt+Space", "Edit|Calltip")),
1232 0, 1270 0,
1233 self.editActGrp, 'vm_edit_calltip') 1271 self.editActGrp, 'vm_edit_calltip')
1234 self.calltipsAct.setStatusTip(QApplication.translate('ViewManager', 1272 self.calltipsAct.setStatusTip(QApplication.translate(
1235 'Show Calltips')) 1273 'ViewManager', 'Show Calltips'))
1236 self.calltipsAct.setWhatsThis(QApplication.translate('ViewManager', 1274 self.calltipsAct.setWhatsThis(QApplication.translate(
1275 'ViewManager',
1237 """<b>Calltip</b>""" 1276 """<b>Calltip</b>"""
1238 """<p>Show calltips based on the characters immediately to the""" 1277 """<p>Show calltips based on the characters immediately to the"""
1239 """ left of the cursor.</p>""" 1278 """ left of the cursor.</p>"""
1240 )) 1279 ))
1241 self.calltipsAct.triggered[()].connect(self.__editShowCallTips) 1280 self.calltipsAct.triggered[()].connect(self.__editShowCallTips)
1242 self.editActions.append(self.calltipsAct) 1281 self.editActions.append(self.calltipsAct)
1243 1282
1244 self.sortAct = E5Action(QApplication.translate('ViewManager', 'Sort'), 1283 self.sortAct = E5Action(
1245 QApplication.translate('ViewManager', 'Sort'), 1284 QApplication.translate('ViewManager', 'Sort'),
1246 QKeySequence(QApplication.translate('ViewManager', 1285 QApplication.translate('ViewManager', 'Sort'),
1247 "Ctrl+Alt+S", "Edit|Sort")), 1286 QKeySequence(QApplication.translate(
1248 0, 1287 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")),
1249 self.editActGrp, 'vm_edit_sort') 1288 0,
1250 self.sortAct.setStatusTip(QApplication.translate('ViewManager', 1289 self.editActGrp, 'vm_edit_sort')
1290 self.sortAct.setStatusTip(QApplication.translate(
1291 'ViewManager',
1251 'Sort the lines containing the rectangular selection')) 1292 'Sort the lines containing the rectangular selection'))
1252 self.sortAct.setWhatsThis(QApplication.translate('ViewManager', 1293 self.sortAct.setWhatsThis(QApplication.translate(
1294 'ViewManager',
1253 """<b>Sort</b>""" 1295 """<b>Sort</b>"""
1254 """<p>Sort the lines spanned by a rectangular selection based on""" 1296 """<p>Sort the lines spanned by a rectangular selection based on"""
1255 """ the selection ignoring leading and trailing whitespace.</p>""" 1297 """ the selection ignoring leading and trailing whitespace.</p>"""
1256 )) 1298 ))
1257 self.sortAct.triggered[()].connect(self.__editSortSelectedLines) 1299 self.sortAct.triggered[()].connect(self.__editSortSelectedLines)
1366 QApplication.translate('ViewManager', 'Ctrl+Right'))) 1408 QApplication.translate('ViewManager', 'Ctrl+Right')))
1367 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) 1409 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT)
1368 act.triggered[()].connect(self.esm.map) 1410 act.triggered[()].connect(self.esm.map)
1369 self.editActions.append(act) 1411 self.editActions.append(act)
1370 1412
1371 act = E5Action(QApplication.translate('ViewManager', 1413 act = E5Action(
1372 'Move to first visible character in document line'), 1414 QApplication.translate(
1373 QApplication.translate('ViewManager', 1415 'ViewManager',
1374 'Move to first visible character in document line'), 1416 'Move to first visible character in document line'),
1375 0, 0, 1417 QApplication.translate(
1376 self.editorActGrp, 'vm_edit_move_first_visible_char') 1418 'ViewManager',
1419 'Move to first visible character in document line'),
1420 0, 0,
1421 self.editorActGrp, 'vm_edit_move_first_visible_char')
1377 if not isMacPlatform(): 1422 if not isMacPlatform():
1378 act.setShortcut(QKeySequence( 1423 act.setShortcut(QKeySequence(
1379 QApplication.translate('ViewManager', 'Home'))) 1424 QApplication.translate('ViewManager', 'Home')))
1380 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) 1425 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME)
1381 act.triggered[()].connect(self.esm.map) 1426 act.triggered[()].connect(self.esm.map)
1382 self.editActions.append(act) 1427 self.editActions.append(act)
1383 1428
1384 act = E5Action(QApplication.translate('ViewManager', 1429 act = E5Action(
1385 'Move to start of display line'), 1430 QApplication.translate(
1386 QApplication.translate('ViewManager', 1431 'ViewManager', 'Move to start of display line'),
1387 'Move to start of display line'), 1432 QApplication.translate(
1388 0, 0, 1433 'ViewManager', 'Move to start of display line'),
1389 self.editorActGrp, 'vm_edit_move_start_line') 1434 0, 0,
1435 self.editorActGrp, 'vm_edit_move_start_line')
1390 if isMacPlatform(): 1436 if isMacPlatform():
1391 act.setShortcut(QKeySequence( 1437 act.setShortcut(QKeySequence(
1392 QApplication.translate('ViewManager', 'Ctrl+Left'))) 1438 QApplication.translate('ViewManager', 'Ctrl+Left')))
1393 else: 1439 else:
1394 act.setShortcut(QKeySequence( 1440 act.setShortcut(QKeySequence(
1395 QApplication.translate('ViewManager', 'Alt+Home'))) 1441 QApplication.translate('ViewManager', 'Alt+Home')))
1396 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) 1442 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY)
1397 act.triggered[()].connect(self.esm.map) 1443 act.triggered[()].connect(self.esm.map)
1398 self.editActions.append(act) 1444 self.editActions.append(act)
1399 1445
1400 act = E5Action(QApplication.translate('ViewManager', 1446 act = E5Action(
1401 'Move to end of document line'), 1447 QApplication.translate(
1402 QApplication.translate('ViewManager', 1448 'ViewManager', 'Move to end of document line'),
1403 'Move to end of document line'), 1449 QApplication.translate(
1404 0, 0, 1450 'ViewManager', 'Move to end of document line'),
1405 self.editorActGrp, 'vm_edit_move_end_line') 1451 0, 0,
1452 self.editorActGrp, 'vm_edit_move_end_line')
1406 if isMacPlatform(): 1453 if isMacPlatform():
1407 act.setShortcut(QKeySequence( 1454 act.setShortcut(QKeySequence(
1408 QApplication.translate('ViewManager', 'Meta+E'))) 1455 QApplication.translate('ViewManager', 'Meta+E')))
1409 else: 1456 else:
1410 act.setShortcut(QKeySequence( 1457 act.setShortcut(QKeySequence(
1605 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 1652 QApplication.translate('ViewManager', 'Alt+Shift+Right')))
1606 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) 1653 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND)
1607 act.triggered[()].connect(self.esm.map) 1654 act.triggered[()].connect(self.esm.map)
1608 self.editActions.append(act) 1655 self.editActions.append(act)
1609 1656
1610 act = E5Action(QApplication.translate('ViewManager', 1657 act = E5Action(
1611 'Extend selection left one word'), 1658 QApplication.translate(
1612 QApplication.translate('ViewManager', 1659 'ViewManager', 'Extend selection left one word'),
1613 'Extend selection left one word'), 1660 QApplication.translate(
1614 0, 0, 1661 'ViewManager', 'Extend selection left one word'),
1615 self.editorActGrp, 'vm_edit_extend_selection_left_word') 1662 0, 0,
1663 self.editorActGrp, 'vm_edit_extend_selection_left_word')
1616 if isMacPlatform(): 1664 if isMacPlatform():
1617 act.setShortcut(QKeySequence( 1665 act.setShortcut(QKeySequence(
1618 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) 1666 QApplication.translate('ViewManager', 'Alt+Shift+Left')))
1619 else: 1667 else:
1620 act.setShortcut(QKeySequence( 1668 act.setShortcut(QKeySequence(
1621 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) 1669 QApplication.translate('ViewManager', 'Ctrl+Shift+Left')))
1622 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) 1670 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND)
1623 act.triggered[()].connect(self.esm.map) 1671 act.triggered[()].connect(self.esm.map)
1624 self.editActions.append(act) 1672 self.editActions.append(act)
1625 1673
1626 act = E5Action(QApplication.translate('ViewManager', 1674 act = E5Action(
1627 'Extend selection right one word'), 1675 QApplication.translate(
1628 QApplication.translate('ViewManager', 1676 'ViewManager', 'Extend selection right one word'),
1629 'Extend selection right one word'), 1677 QApplication.translate(
1630 0, 0, 1678 'ViewManager', 'Extend selection right one word'),
1631 self.editorActGrp, 'vm_edit_extend_selection_right_word') 1679 0, 0,
1680 self.editorActGrp, 'vm_edit_extend_selection_right_word')
1632 if isMacPlatform(): 1681 if isMacPlatform():
1633 act.setShortcut(QKeySequence( 1682 act.setShortcut(QKeySequence(
1634 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 1683 QApplication.translate('ViewManager', 'Alt+Shift+Right')))
1635 else: 1684 else:
1636 act.setShortcut(QKeySequence( 1685 act.setShortcut(QKeySequence(
1655 QApplication.translate('ViewManager', 'Shift+Home'))) 1704 QApplication.translate('ViewManager', 'Shift+Home')))
1656 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) 1705 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND)
1657 act.triggered[()].connect(self.esm.map) 1706 act.triggered[()].connect(self.esm.map)
1658 self.editActions.append(act) 1707 self.editActions.append(act)
1659 1708
1660 act = E5Action(QApplication.translate('ViewManager', 1709 act = E5Action(
1661 'Extend selection to end of document line'), 1710 QApplication.translate(
1662 QApplication.translate('ViewManager', 1711 'ViewManager', 'Extend selection to end of document line'),
1663 'Extend selection to end of document line'), 1712 QApplication.translate(
1664 0, 0, 1713 'ViewManager', 'Extend selection to end of document line'),
1665 self.editorActGrp, 'vm_edit_extend_selection_end_line') 1714 0, 0,
1715 self.editorActGrp, 'vm_edit_extend_selection_end_line')
1666 if isMacPlatform(): 1716 if isMacPlatform():
1667 act.setShortcut(QKeySequence( 1717 act.setShortcut(QKeySequence(
1668 QApplication.translate('ViewManager', 'Meta+Shift+E'))) 1718 QApplication.translate('ViewManager', 'Meta+Shift+E')))
1669 else: 1719 else:
1670 act.setShortcut(QKeySequence( 1720 act.setShortcut(QKeySequence(
1684 self.editorActGrp, 'vm_edit_extend_selection_up_para') 1734 self.editorActGrp, 'vm_edit_extend_selection_up_para')
1685 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) 1735 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND)
1686 act.triggered[()].connect(self.esm.map) 1736 act.triggered[()].connect(self.esm.map)
1687 self.editActions.append(act) 1737 self.editActions.append(act)
1688 1738
1689 act = E5Action(QApplication.translate('ViewManager', 1739 act = E5Action(
1690 'Extend selection down one paragraph'), 1740 QApplication.translate(
1691 QApplication.translate('ViewManager', 1741 'ViewManager', 'Extend selection down one paragraph'),
1692 'Extend selection down one paragraph'), 1742 QApplication.translate(
1693 QKeySequence(QApplication.translate('ViewManager', 1743 'ViewManager', 'Extend selection down one paragraph'),
1694 'Alt+Shift+Down')), 1744 QKeySequence(QApplication.translate(
1695 0, 1745 'ViewManager', 'Alt+Shift+Down')),
1696 self.editorActGrp, 'vm_edit_extend_selection_down_para') 1746 0,
1747 self.editorActGrp, 'vm_edit_extend_selection_down_para')
1697 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) 1748 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND)
1698 act.triggered[()].connect(self.esm.map) 1749 act.triggered[()].connect(self.esm.map)
1699 self.editActions.append(act) 1750 self.editActions.append(act)
1700 1751
1701 act = E5Action( 1752 act = E5Action(
1724 QApplication.translate('ViewManager', 'Meta+Shift+V'))) 1775 QApplication.translate('ViewManager', 'Meta+Shift+V')))
1725 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) 1776 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND)
1726 act.triggered[()].connect(self.esm.map) 1777 act.triggered[()].connect(self.esm.map)
1727 self.editActions.append(act) 1778 self.editActions.append(act)
1728 1779
1729 act = E5Action(QApplication.translate('ViewManager', 1780 act = E5Action(
1730 'Extend selection to start of document'), 1781 QApplication.translate(
1731 QApplication.translate('ViewManager', 1782 'ViewManager', 'Extend selection to start of document'),
1732 'Extend selection to start of document'), 1783 QApplication.translate(
1733 0, 0, 1784 'ViewManager', 'Extend selection to start of document'),
1734 self.editorActGrp, 'vm_edit_extend_selection_start_text') 1785 0, 0,
1786 self.editorActGrp, 'vm_edit_extend_selection_start_text')
1735 if isMacPlatform(): 1787 if isMacPlatform():
1736 act.setShortcut(QKeySequence( 1788 act.setShortcut(QKeySequence(
1737 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) 1789 QApplication.translate('ViewManager', 'Ctrl+Shift+Up')))
1738 else: 1790 else:
1739 act.setShortcut(QKeySequence( 1791 act.setShortcut(QKeySequence(
1740 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) 1792 QApplication.translate('ViewManager', 'Ctrl+Shift+Home')))
1741 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) 1793 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND)
1742 act.triggered[()].connect(self.esm.map) 1794 act.triggered[()].connect(self.esm.map)
1743 self.editActions.append(act) 1795 self.editActions.append(act)
1744 1796
1745 act = E5Action(QApplication.translate('ViewManager', 1797 act = E5Action(
1746 'Extend selection to end of document'), 1798 QApplication.translate(
1747 QApplication.translate('ViewManager', 1799 'ViewManager', 'Extend selection to end of document'),
1748 'Extend selection to end of document'), 1800 QApplication.translate(
1749 0, 0, 1801 'ViewManager', 'Extend selection to end of document'),
1750 self.editorActGrp, 'vm_edit_extend_selection_end_text') 1802 0, 0,
1803 self.editorActGrp, 'vm_edit_extend_selection_end_text')
1751 if isMacPlatform(): 1804 if isMacPlatform():
1752 act.setShortcut(QKeySequence( 1805 act.setShortcut(QKeySequence(
1753 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) 1806 QApplication.translate('ViewManager', 'Ctrl+Shift+Down')))
1754 else: 1807 else:
1755 act.setShortcut(QKeySequence( 1808 act.setShortcut(QKeySequence(
1926 self.editorActGrp, 'vm_edit_toggle_insert_overtype') 1979 self.editorActGrp, 'vm_edit_toggle_insert_overtype')
1927 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) 1980 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE)
1928 act.triggered[()].connect(self.esm.map) 1981 act.triggered[()].connect(self.esm.map)
1929 self.editActions.append(act) 1982 self.editActions.append(act)
1930 1983
1931 act = E5Action(QApplication.translate('ViewManager', 1984 act = E5Action(
1932 'Move to end of display line'), 1985 QApplication.translate(
1933 QApplication.translate('ViewManager', 1986 'ViewManager', 'Move to end of display line'),
1934 'Move to end of display line'), 1987 QApplication.translate(
1935 0, 0, 1988 'ViewManager', 'Move to end of display line'),
1936 self.editorActGrp, 'vm_edit_move_end_displayed_line') 1989 0, 0,
1990 self.editorActGrp, 'vm_edit_move_end_displayed_line')
1937 if isMacPlatform(): 1991 if isMacPlatform():
1938 act.setShortcut(QKeySequence( 1992 act.setShortcut(QKeySequence(
1939 QApplication.translate('ViewManager', 'Ctrl+Right'))) 1993 QApplication.translate('ViewManager', 'Ctrl+Right')))
1940 else: 1994 else:
1941 act.setShortcut(QKeySequence( 1995 act.setShortcut(QKeySequence(
1956 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) 2010 QApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
1957 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) 2011 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND)
1958 act.triggered[()].connect(self.esm.map) 2012 act.triggered[()].connect(self.esm.map)
1959 self.editActions.append(act) 2013 self.editActions.append(act)
1960 2014
1961 act = E5Action(QApplication.translate('ViewManager', 'Formfeed'), 2015 act = E5Action(
1962 QApplication.translate('ViewManager', 'Formfeed'), 2016 QApplication.translate('ViewManager', 'Formfeed'),
1963 0, 0, 2017 QApplication.translate('ViewManager', 'Formfeed'),
1964 self.editorActGrp, 'vm_edit_formfeed') 2018 0, 0,
2019 self.editorActGrp, 'vm_edit_formfeed')
1965 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) 2020 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED)
1966 act.triggered[()].connect(self.esm.map) 2021 act.triggered[()].connect(self.esm.map)
1967 self.editActions.append(act) 2022 self.editActions.append(act)
1968 2023
1969 act = E5Action( 2024 act = E5Action(
2040 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) 2095 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F')))
2041 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) 2096 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND)
2042 act.triggered[()].connect(self.esm.map) 2097 act.triggered[()].connect(self.esm.map)
2043 self.editActions.append(act) 2098 self.editActions.append(act)
2044 2099
2045 act = E5Action(QApplication.translate('ViewManager', 2100 act = E5Action(
2046 'Extend rectangular selection to first' 2101 QApplication.translate(
2047 ' visible character in document line'), 2102 'ViewManager',
2048 QApplication.translate('ViewManager', 2103 'Extend rectangular selection to first visible character in'
2049 'Extend rectangular selection to first' 2104 ' document line'),
2050 ' visible character in document line'), 2105 QApplication.translate(
2051 0, 0, 2106 'ViewManager',
2052 self.editorActGrp, 2107 'Extend rectangular selection to first visible character in'
2053 'vm_edit_extend_rect_selection_first_visible_char') 2108 ' document line'),
2109 0, 0,
2110 self.editorActGrp,
2111 'vm_edit_extend_rect_selection_first_visible_char')
2054 if not isMacPlatform(): 2112 if not isMacPlatform():
2055 act.setShortcut(QKeySequence( 2113 act.setShortcut(QKeySequence(
2056 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) 2114 QApplication.translate('ViewManager', 'Alt+Shift+Home')))
2057 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) 2115 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND)
2058 act.triggered[()].connect(self.esm.map) 2116 act.triggered[()].connect(self.esm.map)
2122 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) 2180 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE)
2123 act.triggered[()].connect(self.esm.map) 2181 act.triggered[()].connect(self.esm.map)
2124 self.editActions.append(act) 2182 self.editActions.append(act)
2125 2183
2126 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): 2184 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"):
2127 act = E5Action(QApplication.translate('ViewManager', 2185 act = E5Action(
2128 'Scroll to start of document'), 2186 QApplication.translate(
2129 QApplication.translate('ViewManager', 2187 'ViewManager', 'Scroll to start of document'),
2130 'Scroll to start of document'), 2188 QApplication.translate(
2131 0, 0, 2189 'ViewManager', 'Scroll to start of document'),
2132 self.editorActGrp, 'vm_edit_scroll_start_text') 2190 0, 0,
2191 self.editorActGrp, 'vm_edit_scroll_start_text')
2133 if isMacPlatform(): 2192 if isMacPlatform():
2134 act.setShortcut(QKeySequence( 2193 act.setShortcut(QKeySequence(
2135 QApplication.translate('ViewManager', 'Home'))) 2194 QApplication.translate('ViewManager', 'Home')))
2136 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) 2195 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART)
2137 act.triggered[()].connect(self.esm.map) 2196 act.triggered[()].connect(self.esm.map)
2138 self.editActions.append(act) 2197 self.editActions.append(act)
2139 2198
2140 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): 2199 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"):
2141 act = E5Action(QApplication.translate('ViewManager', 2200 act = E5Action(
2142 'Scroll to end of document'), 2201 QApplication.translate(
2143 QApplication.translate('ViewManager', 2202 'ViewManager', 'Scroll to end of document'),
2144 'Scroll to end of document'), 2203 QApplication.translate(
2145 0, 0, 2204 'ViewManager', 'Scroll to end of document'),
2146 self.editorActGrp, 'vm_edit_scroll_end_text') 2205 0, 0,
2206 self.editorActGrp, 'vm_edit_scroll_end_text')
2147 if isMacPlatform(): 2207 if isMacPlatform():
2148 act.setShortcut(QKeySequence( 2208 act.setShortcut(QKeySequence(
2149 QApplication.translate('ViewManager', 'End'))) 2209 QApplication.translate('ViewManager', 'End')))
2150 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) 2210 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND)
2151 act.triggered[()].connect(self.esm.map) 2211 act.triggered[()].connect(self.esm.map)
2152 self.editActions.append(act) 2212 self.editActions.append(act)
2153 2213
2154 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): 2214 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"):
2155 act = E5Action(QApplication.translate('ViewManager', 2215 act = E5Action(
2156 'Scroll vertically to center current line'), 2216 QApplication.translate(
2157 QApplication.translate('ViewManager', 2217 'ViewManager', 'Scroll vertically to center current line'),
2158 'Scroll vertically to center current line'), 2218 QApplication.translate(
2159 0, 0, 2219 'ViewManager', 'Scroll vertically to center current line'),
2160 self.editorActGrp, 'vm_edit_scroll_vertically_center') 2220 0, 0,
2221 self.editorActGrp, 'vm_edit_scroll_vertically_center')
2161 if isMacPlatform(): 2222 if isMacPlatform():
2162 act.setShortcut(QKeySequence( 2223 act.setShortcut(QKeySequence(
2163 QApplication.translate('ViewManager', 'Meta+L'))) 2224 QApplication.translate('ViewManager', 'Meta+L')))
2164 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) 2225 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET)
2165 act.triggered[()].connect(self.esm.map) 2226 act.triggered[()].connect(self.esm.map)
2166 self.editActions.append(act) 2227 self.editActions.append(act)
2167 2228
2168 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): 2229 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"):
2169 act = E5Action(QApplication.translate('ViewManager', 2230 act = E5Action(
2170 'Move to end of next word'), 2231 QApplication.translate(
2171 QApplication.translate('ViewManager', 2232 'ViewManager', 'Move to end of next word'),
2172 'Move to end of next word'), 2233 QApplication.translate(
2173 0, 0, 2234 'ViewManager', 'Move to end of next word'),
2174 self.editorActGrp, 'vm_edit_move_end_next_word') 2235 0, 0,
2236 self.editorActGrp, 'vm_edit_move_end_next_word')
2175 if isMacPlatform(): 2237 if isMacPlatform():
2176 act.setShortcut(QKeySequence( 2238 act.setShortcut(QKeySequence(
2177 QApplication.translate('ViewManager', 'Alt+Right'))) 2239 QApplication.translate('ViewManager', 'Alt+Right')))
2178 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) 2240 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND)
2179 act.triggered[()].connect(self.esm.map) 2241 act.triggered[()].connect(self.esm.map)
2180 self.editActions.append(act) 2242 self.editActions.append(act)
2181 2243
2182 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): 2244 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"):
2183 act = E5Action(QApplication.translate('ViewManager', 2245 act = E5Action(
2184 'Extend selection to end of next word'), 2246 QApplication.translate(
2185 QApplication.translate('ViewManager', 2247 'ViewManager', 'Extend selection to end of next word'),
2186 'Extend selection to end of next word'), 2248 QApplication.translate(
2187 0, 0, 2249 'ViewManager', 'Extend selection to end of next word'),
2188 self.editorActGrp, 'vm_edit_select_end_next_word') 2250 0, 0,
2251 self.editorActGrp, 'vm_edit_select_end_next_word')
2189 if isMacPlatform(): 2252 if isMacPlatform():
2190 act.setShortcut(QKeySequence( 2253 act.setShortcut(QKeySequence(
2191 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 2254 QApplication.translate('ViewManager', 'Alt+Shift+Right')))
2192 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) 2255 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND)
2193 act.triggered[()].connect(self.esm.map) 2256 act.triggered[()].connect(self.esm.map)
2194 self.editActions.append(act) 2257 self.editActions.append(act)
2195 2258
2196 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): 2259 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"):
2197 act = E5Action(QApplication.translate('ViewManager', 2260 act = E5Action(
2198 'Move to end of previous word'), 2261 QApplication.translate(
2199 QApplication.translate('ViewManager', 2262 'ViewManager', 'Move to end of previous word'),
2200 'Move to end of previous word'), 2263 QApplication.translate(
2201 0, 0, 2264 'ViewManager', 'Move to end of previous word'),
2202 self.editorActGrp, 'vm_edit_move_end_previous_word') 2265 0, 0,
2266 self.editorActGrp, 'vm_edit_move_end_previous_word')
2203 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) 2267 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND)
2204 act.triggered[()].connect(self.esm.map) 2268 act.triggered[()].connect(self.esm.map)
2205 self.editActions.append(act) 2269 self.editActions.append(act)
2206 2270
2207 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): 2271 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"):
2208 act = E5Action(QApplication.translate('ViewManager', 2272 act = E5Action(
2209 'Extend selection to end of previous word'), 2273 QApplication.translate(
2210 QApplication.translate('ViewManager', 2274 'ViewManager', 'Extend selection to end of previous word'),
2211 'Extend selection to end of previous word'), 2275 QApplication.translate(
2212 0, 0, 2276 'ViewManager', 'Extend selection to end of previous word'),
2213 self.editorActGrp, 'vm_edit_select_end_previous_word') 2277 0, 0,
2278 self.editorActGrp, 'vm_edit_select_end_previous_word')
2214 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) 2279 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND)
2215 act.triggered[()].connect(self.esm.map) 2280 act.triggered[()].connect(self.esm.map)
2216 self.editActions.append(act) 2281 self.editActions.append(act)
2217 2282
2218 if hasattr(QsciScintilla, "SCI_HOME"): 2283 if hasattr(QsciScintilla, "SCI_HOME"):
2219 act = E5Action(QApplication.translate('ViewManager', 2284 act = E5Action(
2220 'Move to start of document line'), 2285 QApplication.translate(
2221 QApplication.translate('ViewManager', 2286 'ViewManager', 'Move to start of document line'),
2222 'Move to start of document line'), 2287 QApplication.translate(
2223 0, 0, 2288 'ViewManager', 'Move to start of document line'),
2224 self.editorActGrp, 'vm_edit_move_start_document_line') 2289 0, 0,
2290 self.editorActGrp, 'vm_edit_move_start_document_line')
2225 if isMacPlatform(): 2291 if isMacPlatform():
2226 act.setShortcut(QKeySequence( 2292 act.setShortcut(QKeySequence(
2227 QApplication.translate('ViewManager', 'Meta+A'))) 2293 QApplication.translate('ViewManager', 'Meta+A')))
2228 self.esm.setMapping(act, QsciScintilla.SCI_HOME) 2294 self.esm.setMapping(act, QsciScintilla.SCI_HOME)
2229 act.triggered[()].connect(self.esm.map) 2295 act.triggered[()].connect(self.esm.map)
2310 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND) 2376 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND)
2311 act.triggered[()].connect(self.esm.map) 2377 act.triggered[()].connect(self.esm.map)
2312 self.editActions.append(act) 2378 self.editActions.append(act)
2313 2379
2314 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): 2380 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"):
2315 act = E5Action(QApplication.translate('ViewManager', 2381 act = E5Action(
2316 'Move to first visible character in display' 2382 QApplication.translate(
2317 ' or document line'), 2383 'ViewManager',
2318 QApplication.translate('ViewManager', 2384 'Move to first visible character in display or document'
2319 'Move to first visible character in display' 2385 ' line'),
2320 ' or document line'), 2386 QApplication.translate(
2321 0, 0, 2387 'ViewManager',
2322 self.editorActGrp, 2388 'Move to first visible character in display or document'
2323 'vm_edit_move_first_visible_char_document_line') 2389 ' line'),
2390 0, 0,
2391 self.editorActGrp,
2392 'vm_edit_move_first_visible_char_document_line')
2324 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) 2393 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP)
2325 act.triggered[()].connect(self.esm.map) 2394 act.triggered[()].connect(self.esm.map)
2326 self.editActions.append(act) 2395 self.editActions.append(act)
2327 2396
2328 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): 2397 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"):
2370 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND) 2439 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND)
2371 act.triggered[()].connect(self.esm.map) 2440 act.triggered[()].connect(self.esm.map)
2372 self.editActions.append(act) 2441 self.editActions.append(act)
2373 2442
2374 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): 2443 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"):
2375 act = E5Action(QApplication.translate('ViewManager', 2444 act = E5Action(
2376 'Stuttered move up one page'), 2445 QApplication.translate(
2377 QApplication.translate('ViewManager', 2446 'ViewManager', 'Stuttered move up one page'),
2378 'Stuttered move up one page'), 2447 QApplication.translate(
2379 0, 0, 2448 'ViewManager', 'Stuttered move up one page'),
2380 self.editorActGrp, 'vm_edit_stuttered_move_up_page') 2449 0, 0,
2450 self.editorActGrp, 'vm_edit_stuttered_move_up_page')
2381 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) 2451 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP)
2382 act.triggered[()].connect(self.esm.map) 2452 act.triggered[()].connect(self.esm.map)
2383 self.editActions.append(act) 2453 self.editActions.append(act)
2384 2454
2385 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): 2455 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"):
2394 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) 2464 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND)
2395 act.triggered[()].connect(self.esm.map) 2465 act.triggered[()].connect(self.esm.map)
2396 self.editActions.append(act) 2466 self.editActions.append(act)
2397 2467
2398 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): 2468 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"):
2399 act = E5Action(QApplication.translate('ViewManager', 2469 act = E5Action(
2400 'Stuttered move down one page'), 2470 QApplication.translate(
2401 QApplication.translate('ViewManager', 2471 'ViewManager', 'Stuttered move down one page'),
2402 'Stuttered move down one page'), 2472 QApplication.translate(
2403 0, 0, 2473 'ViewManager', 'Stuttered move down one page'),
2404 self.editorActGrp, 'vm_edit_stuttered_move_down_page') 2474 0, 0,
2475 self.editorActGrp, 'vm_edit_stuttered_move_down_page')
2405 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) 2476 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN)
2406 act.triggered[()].connect(self.esm.map) 2477 act.triggered[()].connect(self.esm.map)
2407 self.editActions.append(act) 2478 self.editActions.append(act)
2408 2479
2409 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): 2480 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"):
2611 2682
2612 self.searchAct = E5Action( 2683 self.searchAct = E5Action(
2613 QApplication.translate('ViewManager', 'Search'), 2684 QApplication.translate('ViewManager', 'Search'),
2614 UI.PixmapCache.getIcon("find.png"), 2685 UI.PixmapCache.getIcon("find.png"),
2615 QApplication.translate('ViewManager', '&Search...'), 2686 QApplication.translate('ViewManager', '&Search...'),
2616 QKeySequence(QApplication.translate('ViewManager', 2687 QKeySequence(QApplication.translate(
2617 "Ctrl+F", "Search|Search")), 2688 'ViewManager', "Ctrl+F", "Search|Search")),
2618 0, 2689 0,
2619 self.searchActGrp, 'vm_search') 2690 self.searchActGrp, 'vm_search')
2620 self.searchAct.setStatusTip(QApplication.translate('ViewManager', 2691 self.searchAct.setStatusTip(QApplication.translate(
2621 'Search for a text')) 2692 'ViewManager', 'Search for a text'))
2622 self.searchAct.setWhatsThis(QApplication.translate('ViewManager', 2693 self.searchAct.setWhatsThis(QApplication.translate(
2694 'ViewManager',
2623 """<b>Search</b>""" 2695 """<b>Search</b>"""
2624 """<p>Search for some text in the current editor. A""" 2696 """<p>Search for some text in the current editor. A"""
2625 """ dialog is shown to enter the searchtext and options""" 2697 """ dialog is shown to enter the searchtext and options"""
2626 """ for the search.</p>""" 2698 """ for the search.</p>"""
2627 )) 2699 ))
2631 self.searchNextAct = E5Action( 2703 self.searchNextAct = E5Action(
2632 QApplication.translate( 2704 QApplication.translate(
2633 'ViewManager', 'Search next'), 2705 'ViewManager', 'Search next'),
2634 UI.PixmapCache.getIcon("findNext.png"), 2706 UI.PixmapCache.getIcon("findNext.png"),
2635 QApplication.translate('ViewManager', 'Search &next'), 2707 QApplication.translate('ViewManager', 'Search &next'),
2636 QKeySequence(QApplication.translate('ViewManager', 2708 QKeySequence(QApplication.translate(
2637 "F3", "Search|Search next")), 2709 'ViewManager', "F3", "Search|Search next")),
2638 0, 2710 0,
2639 self.searchActGrp, 'vm_search_next') 2711 self.searchActGrp, 'vm_search_next')
2640 self.searchNextAct.setStatusTip(QApplication.translate('ViewManager', 2712 self.searchNextAct.setStatusTip(QApplication.translate(
2641 'Search next occurrence of text')) 2713 'ViewManager', 'Search next occurrence of text'))
2642 self.searchNextAct.setWhatsThis(QApplication.translate('ViewManager', 2714 self.searchNextAct.setWhatsThis(QApplication.translate(
2715 'ViewManager',
2643 """<b>Search next</b>""" 2716 """<b>Search next</b>"""
2644 """<p>Search the next occurrence of some text in the current""" 2717 """<p>Search the next occurrence of some text in the current"""
2645 """ editor. The previously entered searchtext and options are""" 2718 """ editor. The previously entered searchtext and options are"""
2646 """ reused.</p>""" 2719 """ reused.</p>"""
2647 )) 2720 ))
2650 2723
2651 self.searchPrevAct = E5Action( 2724 self.searchPrevAct = E5Action(
2652 QApplication.translate('ViewManager', 'Search previous'), 2725 QApplication.translate('ViewManager', 'Search previous'),
2653 UI.PixmapCache.getIcon("findPrev.png"), 2726 UI.PixmapCache.getIcon("findPrev.png"),
2654 QApplication.translate('ViewManager', 'Search &previous'), 2727 QApplication.translate('ViewManager', 'Search &previous'),
2655 QKeySequence(QApplication.translate('ViewManager', 2728 QKeySequence(QApplication.translate(
2656 "Shift+F3", "Search|Search previous")), 2729 'ViewManager', "Shift+F3", "Search|Search previous")),
2657 0, 2730 0,
2658 self.searchActGrp, 'vm_search_previous') 2731 self.searchActGrp, 'vm_search_previous')
2659 self.searchPrevAct.setStatusTip(QApplication.translate('ViewManager', 2732 self.searchPrevAct.setStatusTip(QApplication.translate(
2660 'Search previous occurrence of text')) 2733 'ViewManager', 'Search previous occurrence of text'))
2661 self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager', 2734 self.searchPrevAct.setWhatsThis(QApplication.translate(
2735 'ViewManager',
2662 """<b>Search previous</b>""" 2736 """<b>Search previous</b>"""
2663 """<p>Search the previous occurrence of some text in the current""" 2737 """<p>Search the previous occurrence of some text in the current"""
2664 """ editor. The previously entered searchtext and options are""" 2738 """ editor. The previously entered searchtext and options are"""
2665 """ reused.</p>""" 2739 """ reused.</p>"""
2666 )) 2740 ))
2669 2743
2670 self.searchClearMarkersAct = E5Action( 2744 self.searchClearMarkersAct = E5Action(
2671 QApplication.translate('ViewManager', 'Clear search markers'), 2745 QApplication.translate('ViewManager', 'Clear search markers'),
2672 UI.PixmapCache.getIcon("findClear.png"), 2746 UI.PixmapCache.getIcon("findClear.png"),
2673 QApplication.translate('ViewManager', 'Clear search markers'), 2747 QApplication.translate('ViewManager', 'Clear search markers'),
2674 QKeySequence(QApplication.translate('ViewManager', 2748 QKeySequence(QApplication.translate(
2675 "Ctrl+3", "Search|Clear search markers")), 2749 'ViewManager', "Ctrl+3", "Search|Clear search markers")),
2676 0, 2750 0,
2677 self.searchActGrp, 'vm_clear_search_markers') 2751 self.searchActGrp, 'vm_clear_search_markers')
2678 self.searchClearMarkersAct.setStatusTip(QApplication.translate( 2752 self.searchClearMarkersAct.setStatusTip(QApplication.translate(
2679 'ViewManager', 2753 'ViewManager', 'Clear all displayed search markers'))
2680 'Clear all displayed search markers'))
2681 self.searchClearMarkersAct.setWhatsThis(QApplication.translate( 2754 self.searchClearMarkersAct.setWhatsThis(QApplication.translate(
2682 'ViewManager', 2755 'ViewManager',
2683 """<b>Clear search markers</b>""" 2756 """<b>Clear search markers</b>"""
2684 """<p>Clear all displayed search markers.</p>""" 2757 """<p>Clear all displayed search markers.</p>"""
2685 )) 2758 ))
2691 QApplication.translate( 2764 QApplication.translate(
2692 'ViewManager', 'Search current word forward'), 2765 'ViewManager', 'Search current word forward'),
2693 UI.PixmapCache.getIcon("findWordNext.png"), 2766 UI.PixmapCache.getIcon("findWordNext.png"),
2694 QApplication.translate( 2767 QApplication.translate(
2695 'ViewManager', 'Search current word forward'), 2768 'ViewManager', 'Search current word forward'),
2696 QKeySequence(QApplication.translate('ViewManager', 2769 QKeySequence(QApplication.translate(
2770 'ViewManager',
2697 "Ctrl+.", "Search|Search current word forward")), 2771 "Ctrl+.", "Search|Search current word forward")),
2698 0, 2772 0,
2699 self.searchActGrp, 'vm_search_word_next') 2773 self.searchActGrp, 'vm_search_word_next')
2700 self.searchNextWordAct.setStatusTip(QApplication.translate( 2774 self.searchNextWordAct.setStatusTip(QApplication.translate(
2701 'ViewManager', 2775 'ViewManager',
2713 QApplication.translate( 2787 QApplication.translate(
2714 'ViewManager', 'Search current word backward'), 2788 'ViewManager', 'Search current word backward'),
2715 UI.PixmapCache.getIcon("findWordPrev.png"), 2789 UI.PixmapCache.getIcon("findWordPrev.png"),
2716 QApplication.translate( 2790 QApplication.translate(
2717 'ViewManager', 'Search current word backward'), 2791 'ViewManager', 'Search current word backward'),
2718 QKeySequence(QApplication.translate('ViewManager', 2792 QKeySequence(QApplication.translate(
2793 'ViewManager',
2719 "Ctrl+,", "Search|Search current word backward")), 2794 "Ctrl+,", "Search|Search current word backward")),
2720 0, 2795 0,
2721 self.searchActGrp, 'vm_search_word_previous') 2796 self.searchActGrp, 'vm_search_word_previous')
2722 self.searchPrevWordAct.setStatusTip(QApplication.translate( 2797 self.searchPrevWordAct.setStatusTip(QApplication.translate(
2723 'ViewManager', 2798 'ViewManager',
2732 self.searchActions.append(self.searchPrevWordAct) 2807 self.searchActions.append(self.searchPrevWordAct)
2733 2808
2734 self.replaceAct = E5Action( 2809 self.replaceAct = E5Action(
2735 QApplication.translate('ViewManager', 'Replace'), 2810 QApplication.translate('ViewManager', 'Replace'),
2736 QApplication.translate('ViewManager', '&Replace...'), 2811 QApplication.translate('ViewManager', '&Replace...'),
2737 QKeySequence(QApplication.translate('ViewManager', 2812 QKeySequence(QApplication.translate(
2738 "Ctrl+R", "Search|Replace")), 2813 'ViewManager', "Ctrl+R", "Search|Replace")),
2739 0, 2814 0,
2740 self.searchActGrp, 'vm_search_replace') 2815 self.searchActGrp, 'vm_search_replace')
2741 self.replaceAct.setStatusTip(QApplication.translate('ViewManager', 2816 self.replaceAct.setStatusTip(QApplication.translate(
2742 'Replace some text')) 2817 'ViewManager', 'Replace some text'))
2743 self.replaceAct.setWhatsThis(QApplication.translate('ViewManager', 2818 self.replaceAct.setWhatsThis(QApplication.translate(
2819 'ViewManager',
2744 """<b>Replace</b>""" 2820 """<b>Replace</b>"""
2745 """<p>Search for some text in the current editor and replace it.""" 2821 """<p>Search for some text in the current editor and replace it."""
2746 """ A dialog is shown to enter the searchtext, the replacement""" 2822 """ A dialog is shown to enter the searchtext, the replacement"""
2747 """ text and options for the search and replace.</p>""" 2823 """ text and options for the search and replace.</p>"""
2748 )) 2824 ))
2749 self.replaceAct.triggered[()].connect(self.__replace) 2825 self.replaceAct.triggered[()].connect(self.__replace)
2750 self.searchActions.append(self.replaceAct) 2826 self.searchActions.append(self.replaceAct)
2751 2827
2752 self.quickSearchAct = E5Action(QApplication.translate('ViewManager', 2828 self.quickSearchAct = E5Action(
2753 'Quicksearch'), 2829 QApplication.translate('ViewManager', 'Quicksearch'),
2754 UI.PixmapCache.getIcon("quickFindNext.png"), 2830 UI.PixmapCache.getIcon("quickFindNext.png"),
2755 QApplication.translate('ViewManager', '&Quicksearch'), 2831 QApplication.translate('ViewManager', '&Quicksearch'),
2756 QKeySequence(QApplication.translate('ViewManager', 2832 QKeySequence(QApplication.translate(
2757 "Ctrl+Shift+K", "Search|Quicksearch")), 2833 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")),
2758 0, 2834 0,
2759 self.searchActGrp, 'vm_quicksearch') 2835 self.searchActGrp, 'vm_quicksearch')
2760 self.quickSearchAct.setStatusTip(QApplication.translate('ViewManager', 2836 self.quickSearchAct.setStatusTip(QApplication.translate(
2761 'Perform a quicksearch')) 2837 'ViewManager', 'Perform a quicksearch'))
2762 self.quickSearchAct.setWhatsThis(QApplication.translate('ViewManager', 2838 self.quickSearchAct.setWhatsThis(QApplication.translate(
2839 'ViewManager',
2763 """<b>Quicksearch</b>""" 2840 """<b>Quicksearch</b>"""
2764 """<p>This activates the quicksearch function of the IDE by""" 2841 """<p>This activates the quicksearch function of the IDE by"""
2765 """ giving focus to the quicksearch entry field. If this field""" 2842 """ giving focus to the quicksearch entry field. If this field"""
2766 """ is already active and contains text, it searches for the""" 2843 """ is already active and contains text, it searches for the"""
2767 """ next occurrence of this text.</p>""" 2844 """ next occurrence of this text.</p>"""
2771 2848
2772 self.quickSearchBackAct = E5Action( 2849 self.quickSearchBackAct = E5Action(
2773 QApplication.translate('ViewManager', 'Quicksearch backwards'), 2850 QApplication.translate('ViewManager', 'Quicksearch backwards'),
2774 UI.PixmapCache.getIcon("quickFindPrev.png"), 2851 UI.PixmapCache.getIcon("quickFindPrev.png"),
2775 QApplication.translate('ViewManager', 'Quicksearch &backwards'), 2852 QApplication.translate('ViewManager', 'Quicksearch &backwards'),
2776 QKeySequence(QApplication.translate('ViewManager', 2853 QKeySequence(QApplication.translate(
2854 'ViewManager',
2777 "Ctrl+Shift+J", "Search|Quicksearch backwards")), 2855 "Ctrl+Shift+J", "Search|Quicksearch backwards")),
2778 0, self.searchActGrp, 'vm_quicksearch_backwards') 2856 0, self.searchActGrp, 'vm_quicksearch_backwards')
2779 self.quickSearchBackAct.setStatusTip(QApplication.translate( 2857 self.quickSearchBackAct.setStatusTip(QApplication.translate(
2780 'ViewManager', 2858 'ViewManager',
2781 'Perform a quicksearch backwards')) 2859 'Perform a quicksearch backwards'))
2790 2868
2791 self.quickSearchExtendAct = E5Action( 2869 self.quickSearchExtendAct = E5Action(
2792 QApplication.translate('ViewManager', 'Quicksearch extend'), 2870 QApplication.translate('ViewManager', 'Quicksearch extend'),
2793 UI.PixmapCache.getIcon("quickFindExtend.png"), 2871 UI.PixmapCache.getIcon("quickFindExtend.png"),
2794 QApplication.translate('ViewManager', 'Quicksearch e&xtend'), 2872 QApplication.translate('ViewManager', 'Quicksearch e&xtend'),
2795 QKeySequence(QApplication.translate('ViewManager', 2873 QKeySequence(QApplication.translate(
2796 "Ctrl+Shift+H", "Search|Quicksearch extend")), 2874 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")),
2797 0, 2875 0,
2798 self.searchActGrp, 'vm_quicksearch_extend') 2876 self.searchActGrp, 'vm_quicksearch_extend')
2799 self.quickSearchExtendAct.setStatusTip(QApplication.translate( 2877 self.quickSearchExtendAct.setStatusTip(QApplication.translate(
2800 'ViewManager', \ 2878 'ViewManager',
2801 'Extend the quicksearch to the end of the current word')) 2879 'Extend the quicksearch to the end of the current word'))
2802 self.quickSearchExtendAct.setWhatsThis(QApplication.translate( 2880 self.quickSearchExtendAct.setWhatsThis(QApplication.translate(
2803 'ViewManager', 2881 'ViewManager',
2804 """<b>Quicksearch extend</b>""" 2882 """<b>Quicksearch extend</b>"""
2805 """<p>This extends the quicksearch text to the end of the word""" 2883 """<p>This extends the quicksearch text to the end of the word"""
2811 2889
2812 self.gotoAct = E5Action( 2890 self.gotoAct = E5Action(
2813 QApplication.translate('ViewManager', 'Goto Line'), 2891 QApplication.translate('ViewManager', 'Goto Line'),
2814 UI.PixmapCache.getIcon("goto.png"), 2892 UI.PixmapCache.getIcon("goto.png"),
2815 QApplication.translate('ViewManager', '&Goto Line...'), 2893 QApplication.translate('ViewManager', '&Goto Line...'),
2816 QKeySequence(QApplication.translate('ViewManager', 2894 QKeySequence(QApplication.translate(
2817 "Ctrl+G", "Search|Goto Line")), 2895 'ViewManager', "Ctrl+G", "Search|Goto Line")),
2818 0, 2896 0,
2819 self.searchActGrp, 'vm_search_goto_line') 2897 self.searchActGrp, 'vm_search_goto_line')
2820 self.gotoAct.setStatusTip(QApplication.translate( 2898 self.gotoAct.setStatusTip(QApplication.translate(
2821 'ViewManager', 'Goto Line')) 2899 'ViewManager', 'Goto Line'))
2822 self.gotoAct.setWhatsThis(QApplication.translate( 2900 self.gotoAct.setWhatsThis(QApplication.translate(
2830 2908
2831 self.gotoBraceAct = E5Action( 2909 self.gotoBraceAct = E5Action(
2832 QApplication.translate('ViewManager', 'Goto Brace'), 2910 QApplication.translate('ViewManager', 'Goto Brace'),
2833 UI.PixmapCache.getIcon("gotoBrace.png"), 2911 UI.PixmapCache.getIcon("gotoBrace.png"),
2834 QApplication.translate('ViewManager', 'Goto &Brace'), 2912 QApplication.translate('ViewManager', 'Goto &Brace'),
2835 QKeySequence(QApplication.translate('ViewManager', 2913 QKeySequence(QApplication.translate(
2836 "Ctrl+L", "Search|Goto Brace")), 2914 'ViewManager', "Ctrl+L", "Search|Goto Brace")),
2837 0, 2915 0,
2838 self.searchActGrp, 'vm_search_goto_brace') 2916 self.searchActGrp, 'vm_search_goto_brace')
2839 self.gotoBraceAct.setStatusTip(QApplication.translate( 2917 self.gotoBraceAct.setStatusTip(QApplication.translate(
2840 'ViewManager', 'Goto Brace')) 2918 'ViewManager', 'Goto Brace'))
2841 self.gotoBraceAct.setWhatsThis(QApplication.translate( 2919 self.gotoBraceAct.setWhatsThis(QApplication.translate(
2848 2926
2849 self.gotoLastEditAct = E5Action( 2927 self.gotoLastEditAct = E5Action(
2850 QApplication.translate('ViewManager', 'Goto Last Edit Location'), 2928 QApplication.translate('ViewManager', 'Goto Last Edit Location'),
2851 UI.PixmapCache.getIcon("gotoLastEditPosition.png"), 2929 UI.PixmapCache.getIcon("gotoLastEditPosition.png"),
2852 QApplication.translate('ViewManager', 'Goto Last &Edit Location'), 2930 QApplication.translate('ViewManager', 'Goto Last &Edit Location'),
2853 QKeySequence(QApplication.translate('ViewManager', 2931 QKeySequence(QApplication.translate(
2932 'ViewManager',
2854 "Ctrl+Shift+G", "Search|Goto Last Edit Location")), 2933 "Ctrl+Shift+G", "Search|Goto Last Edit Location")),
2855 0, 2934 0,
2856 self.searchActGrp, 'vm_search_goto_last_edit_location') 2935 self.searchActGrp, 'vm_search_goto_last_edit_location')
2857 self.gotoLastEditAct.setStatusTip( 2936 self.gotoLastEditAct.setStatusTip(
2858 QApplication.translate('ViewManager', 'Goto Last Edit Location')) 2937 QApplication.translate('ViewManager', 'Goto Last Edit Location'))
2859 self.gotoLastEditAct.setWhatsThis(QApplication.translate('ViewManager', 2938 self.gotoLastEditAct.setWhatsThis(QApplication.translate(
2939 'ViewManager',
2860 """<b>Goto Last Edit Location</b>""" 2940 """<b>Goto Last Edit Location</b>"""
2861 """<p>Go to the location of the last edit in the current""" 2941 """<p>Go to the location of the last edit in the current"""
2862 """ editor.</p>""" 2942 """ editor.</p>"""
2863 )) 2943 ))
2864 self.gotoLastEditAct.triggered[()].connect(self.__gotoLastEditPosition) 2944 self.gotoLastEditAct.triggered[()].connect(self.__gotoLastEditPosition)
2889 self.searchActions.append(self.gotoPreviousDefAct) 2969 self.searchActions.append(self.gotoPreviousDefAct)
2890 2970
2891 self.gotoNextDefAct = E5Action( 2971 self.gotoNextDefAct = E5Action(
2892 QApplication.translate('ViewManager', 'Goto Next Method or Class'), 2972 QApplication.translate('ViewManager', 'Goto Next Method or Class'),
2893 QApplication.translate('ViewManager', 'Goto Next Method or Class'), 2973 QApplication.translate('ViewManager', 'Goto Next Method or Class'),
2894 QKeySequence(QApplication.translate('ViewManager', 2974 QKeySequence(QApplication.translate(
2975 'ViewManager',
2895 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")), 2976 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")),
2896 0, 2977 0,
2897 self.searchActGrp, 'vm_search_goto_next_method_or_class') 2978 self.searchActGrp, 'vm_search_goto_next_method_or_class')
2898 self.gotoNextDefAct.setStatusTip(QApplication.translate( 2979 self.gotoNextDefAct.setStatusTip(QApplication.translate(
2899 'ViewManager', 'Go to the next method or class definition')) 2980 'ViewManager', 'Go to the next method or class definition'))
2900 self.gotoNextDefAct.setWhatsThis(QApplication.translate('ViewManager', 2981 self.gotoNextDefAct.setWhatsThis(QApplication.translate(
2982 'ViewManager',
2901 """<b>Goto Next Method or Class</b>""" 2983 """<b>Goto Next Method or Class</b>"""
2902 """<p>Goes to the line of the next method or class definition""" 2984 """<p>Goes to the line of the next method or class definition"""
2903 """ and highlights the name.</p>""" 2985 """ and highlights the name.</p>"""
2904 )) 2986 ))
2905 self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass) 2987 self.gotoNextDefAct.triggered[()].connect(self.__gotoNextMethodClass)
2906 self.searchActions.append(self.gotoNextDefAct) 2988 self.searchActions.append(self.gotoNextDefAct)
2907 2989
2908 self.searchActGrp.setEnabled(False) 2990 self.searchActGrp.setEnabled(False)
2909 2991
2910 self.searchFilesAct = E5Action(QApplication.translate('ViewManager', 2992 self.searchFilesAct = E5Action(
2911 'Search in Files'), 2993 QApplication.translate('ViewManager', 'Search in Files'),
2912 UI.PixmapCache.getIcon("projectFind.png"), 2994 UI.PixmapCache.getIcon("projectFind.png"),
2913 QApplication.translate('ViewManager', 'Search in &Files...'), 2995 QApplication.translate('ViewManager', 'Search in &Files...'),
2914 QKeySequence(QApplication.translate('ViewManager', 2996 QKeySequence(QApplication.translate(
2915 "Shift+Ctrl+F", "Search|Search Files")), 2997 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")),
2916 0, 2998 0,
2917 self, 'vm_search_in_files') 2999 self, 'vm_search_in_files')
2918 self.searchFilesAct.setStatusTip(QApplication.translate('ViewManager', 3000 self.searchFilesAct.setStatusTip(QApplication.translate(
2919 'Search for a text in files')) 3001 'ViewManager', 'Search for a text in files'))
2920 self.searchFilesAct.setWhatsThis(QApplication.translate('ViewManager', 3002 self.searchFilesAct.setWhatsThis(QApplication.translate(
3003 'ViewManager',
2921 """<b>Search in Files</b>""" 3004 """<b>Search in Files</b>"""
2922 """<p>Search for some text in the files of a directory tree""" 3005 """<p>Search for some text in the files of a directory tree"""
2923 """ or the project. A dialog is shown to enter the searchtext""" 3006 """ or the project. A dialog is shown to enter the searchtext"""
2924 """ and options for the search and to display the result.</p>""" 3007 """ and options for the search and to display the result.</p>"""
2925 )) 3008 ))
2926 self.searchFilesAct.triggered[()].connect(self.__searchFiles) 3009 self.searchFilesAct.triggered[()].connect(self.__searchFiles)
2927 self.searchActions.append(self.searchFilesAct) 3010 self.searchActions.append(self.searchFilesAct)
2928 3011
2929 self.replaceFilesAct = E5Action(QApplication.translate('ViewManager', 3012 self.replaceFilesAct = E5Action(
2930 'Replace in Files'), 3013 QApplication.translate('ViewManager', 'Replace in Files'),
2931 QApplication.translate('ViewManager', 'Replace in F&iles...'), 3014 QApplication.translate('ViewManager', 'Replace in F&iles...'),
2932 QKeySequence(QApplication.translate('ViewManager', 3015 QKeySequence(QApplication.translate(
2933 "Shift+Ctrl+R", "Search|Replace in Files")), 3016 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")),
2934 0, 3017 0,
2935 self, 'vm_replace_in_files') 3018 self, 'vm_replace_in_files')
2936 self.replaceFilesAct.setStatusTip(QApplication.translate('ViewManager', 3019 self.replaceFilesAct.setStatusTip(QApplication.translate(
2937 'Search for a text in files and replace it')) 3020 'ViewManager', 'Search for a text in files and replace it'))
2938 self.replaceFilesAct.setWhatsThis(QApplication.translate('ViewManager', 3021 self.replaceFilesAct.setWhatsThis(QApplication.translate(
3022 'ViewManager',
2939 """<b>Replace in Files</b>""" 3023 """<b>Replace in Files</b>"""
2940 """<p>Search for some text in the files of a directory tree""" 3024 """<p>Search for some text in the files of a directory tree"""
2941 """ or the project and replace it. A dialog is shown to enter""" 3025 """ or the project and replace it. A dialog is shown to enter"""
2942 """ the searchtext, the replacement text and options for the""" 3026 """ the searchtext, the replacement text and options for the"""
2943 """ search and to display the result.</p>""" 3027 """ search and to display the result.</p>"""
2947 3031
2948 self.searchOpenFilesAct = E5Action( 3032 self.searchOpenFilesAct = E5Action(
2949 QApplication.translate('ViewManager', 'Search in Open Files'), 3033 QApplication.translate('ViewManager', 'Search in Open Files'),
2950 UI.PixmapCache.getIcon("documentFind.png"), 3034 UI.PixmapCache.getIcon("documentFind.png"),
2951 QApplication.translate('ViewManager', 'Search in Open Files...'), 3035 QApplication.translate('ViewManager', 'Search in Open Files...'),
2952 QKeySequence(QApplication.translate('ViewManager', 3036 QKeySequence(QApplication.translate(
3037 'ViewManager',
2953 "Meta+Ctrl+Alt+F", "Search|Search Open Files")), 3038 "Meta+Ctrl+Alt+F", "Search|Search Open Files")),
2954 0, 3039 0,
2955 self.searchActGrp, 'vm_search_in_open_files') 3040 self.searchActGrp, 'vm_search_in_open_files')
2956 self.searchOpenFilesAct.setStatusTip(QApplication.translate( 3041 self.searchOpenFilesAct.setStatusTip(QApplication.translate(
2957 'ViewManager', 'Search for a text in open files')) 3042 'ViewManager', 'Search for a text in open files'))
2966 self.searchActions.append(self.searchOpenFilesAct) 3051 self.searchActions.append(self.searchOpenFilesAct)
2967 3052
2968 self.replaceOpenFilesAct = E5Action( 3053 self.replaceOpenFilesAct = E5Action(
2969 QApplication.translate('ViewManager', 'Replace in Open Files'), 3054 QApplication.translate('ViewManager', 'Replace in Open Files'),
2970 QApplication.translate('ViewManager', 'Replace in Open Files...'), 3055 QApplication.translate('ViewManager', 'Replace in Open Files...'),
2971 QKeySequence(QApplication.translate('ViewManager', 3056 QKeySequence(QApplication.translate(
3057 'ViewManager',
2972 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")), 3058 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")),
2973 0, 3059 0,
2974 self.searchActGrp, 'vm_replace_in_open_files') 3060 self.searchActGrp, 'vm_replace_in_open_files')
2975 self.replaceOpenFilesAct.setStatusTip(QApplication.translate( 3061 self.replaceOpenFilesAct.setStatusTip(QApplication.translate(
2976 'ViewManager', 'Search for a text in open files and replace it')) 3062 'ViewManager', 'Search for a text in open files and replace it'))
3098 3184
3099 self.zoomInAct = E5Action( 3185 self.zoomInAct = E5Action(
3100 QApplication.translate('ViewManager', 'Zoom in'), 3186 QApplication.translate('ViewManager', 'Zoom in'),
3101 UI.PixmapCache.getIcon("zoomIn.png"), 3187 UI.PixmapCache.getIcon("zoomIn.png"),
3102 QApplication.translate('ViewManager', 'Zoom &in'), 3188 QApplication.translate('ViewManager', 'Zoom &in'),
3103 QKeySequence(QApplication.translate('ViewManager', 3189 QKeySequence(QApplication.translate(
3104 "Ctrl++", "View|Zoom in")), 3190 'ViewManager', "Ctrl++", "View|Zoom in")),
3105 QKeySequence(QApplication.translate('ViewManager', 3191 QKeySequence(QApplication.translate(
3106 "Zoom In", "View|Zoom in")), 3192 'ViewManager', "Zoom In", "View|Zoom in")),
3107 self.viewActGrp, 'vm_view_zoom_in') 3193 self.viewActGrp, 'vm_view_zoom_in')
3108 self.zoomInAct.setStatusTip(QApplication.translate('ViewManager', 3194 self.zoomInAct.setStatusTip(QApplication.translate(
3109 'Zoom in on the text')) 3195 'ViewManager', 'Zoom in on the text'))
3110 self.zoomInAct.setWhatsThis(QApplication.translate('ViewManager', 3196 self.zoomInAct.setWhatsThis(QApplication.translate(
3111 """<b>Zoom in</b>""" 3197 'ViewManager',
3112 """<p>Zoom in on the text. This makes the text bigger.</p>""" 3198 """<b>Zoom in</b>"""
3113 )) 3199 """<p>Zoom in on the text. This makes the text bigger.</p>"""
3200 ))
3114 self.zoomInAct.triggered[()].connect(self.__zoomIn) 3201 self.zoomInAct.triggered[()].connect(self.__zoomIn)
3115 self.viewActions.append(self.zoomInAct) 3202 self.viewActions.append(self.zoomInAct)
3116 3203
3117 self.zoomOutAct = E5Action( 3204 self.zoomOutAct = E5Action(
3118 QApplication.translate('ViewManager', 'Zoom out'), 3205 QApplication.translate('ViewManager', 'Zoom out'),
3119 UI.PixmapCache.getIcon("zoomOut.png"), 3206 UI.PixmapCache.getIcon("zoomOut.png"),
3120 QApplication.translate('ViewManager', 'Zoom &out'), 3207 QApplication.translate('ViewManager', 'Zoom &out'),
3121 QKeySequence(QApplication.translate('ViewManager', 3208 QKeySequence(QApplication.translate(
3122 "Ctrl+-", "View|Zoom out")), 3209 'ViewManager', "Ctrl+-", "View|Zoom out")),
3123 QKeySequence(QApplication.translate('ViewManager', 3210 QKeySequence(QApplication.translate(
3124 "Zoom Out", "View|Zoom out")), 3211 'ViewManager', "Zoom Out", "View|Zoom out")),
3125 self.viewActGrp, 'vm_view_zoom_out') 3212 self.viewActGrp, 'vm_view_zoom_out')
3126 self.zoomOutAct.setStatusTip(QApplication.translate('ViewManager', 3213 self.zoomOutAct.setStatusTip(QApplication.translate(
3127 'Zoom out on the text')) 3214 'ViewManager', 'Zoom out on the text'))
3128 self.zoomOutAct.setWhatsThis(QApplication.translate('ViewManager', 3215 self.zoomOutAct.setWhatsThis(QApplication.translate(
3129 """<b>Zoom out</b>""" 3216 'ViewManager',
3130 """<p>Zoom out on the text. This makes the text smaller.</p>""" 3217 """<b>Zoom out</b>"""
3131 )) 3218 """<p>Zoom out on the text. This makes the text smaller.</p>"""
3219 ))
3132 self.zoomOutAct.triggered[()].connect(self.__zoomOut) 3220 self.zoomOutAct.triggered[()].connect(self.__zoomOut)
3133 self.viewActions.append(self.zoomOutAct) 3221 self.viewActions.append(self.zoomOutAct)
3134 3222
3135 self.zoomResetAct = E5Action( 3223 self.zoomResetAct = E5Action(
3136 QApplication.translate('ViewManager', 'Zoom reset'), 3224 QApplication.translate('ViewManager', 'Zoom reset'),
3137 UI.PixmapCache.getIcon("zoomReset.png"), 3225 UI.PixmapCache.getIcon("zoomReset.png"),
3138 QApplication.translate('ViewManager', 'Zoom &reset'), 3226 QApplication.translate('ViewManager', 'Zoom &reset'),
3139 QKeySequence(QApplication.translate('ViewManager', 3227 QKeySequence(QApplication.translate(
3140 "Ctrl+0", "View|Zoom reset")), 3228 'ViewManager', "Ctrl+0", "View|Zoom reset")),
3141 0, 3229 0,
3142 self.viewActGrp, 'vm_view_zoom_reset') 3230 self.viewActGrp, 'vm_view_zoom_reset')
3143 self.zoomResetAct.setStatusTip(QApplication.translate('ViewManager', 3231 self.zoomResetAct.setStatusTip(QApplication.translate(
3144 'Reset the zoom of the text')) 3232 'ViewManager', 'Reset the zoom of the text'))
3145 self.zoomResetAct.setWhatsThis(QApplication.translate('ViewManager', 3233 self.zoomResetAct.setWhatsThis(QApplication.translate(
3146 """<b>Zoom reset</b>""" 3234 'ViewManager',
3147 """<p>Reset the zoom of the text. """ 3235 """<b>Zoom reset</b>"""
3148 """This sets the zoom factor to 100%.</p>""" 3236 """<p>Reset the zoom of the text. """
3149 )) 3237 """This sets the zoom factor to 100%.</p>"""
3238 ))
3150 self.zoomResetAct.triggered[()].connect(self.__zoomReset) 3239 self.zoomResetAct.triggered[()].connect(self.__zoomReset)
3151 self.viewActions.append(self.zoomResetAct) 3240 self.viewActions.append(self.zoomResetAct)
3152 3241
3153 self.zoomToAct = E5Action( 3242 self.zoomToAct = E5Action(
3154 QApplication.translate('ViewManager', 'Zoom'), 3243 QApplication.translate('ViewManager', 'Zoom'),
3155 UI.PixmapCache.getIcon("zoomTo.png"), 3244 UI.PixmapCache.getIcon("zoomTo.png"),
3156 QApplication.translate('ViewManager', '&Zoom'), 3245 QApplication.translate('ViewManager', '&Zoom'),
3157 QKeySequence(QApplication.translate('ViewManager', 3246 QKeySequence(QApplication.translate(
3158 "Ctrl+#", "View|Zoom")), 3247 'ViewManager', "Ctrl+#", "View|Zoom")),
3159 0, 3248 0,
3160 self.viewActGrp, 'vm_view_zoom') 3249 self.viewActGrp, 'vm_view_zoom')
3161 self.zoomToAct.setStatusTip(QApplication.translate('ViewManager', 3250 self.zoomToAct.setStatusTip(QApplication.translate(
3162 'Zoom the text')) 3251 'ViewManager', 'Zoom the text'))
3163 self.zoomToAct.setWhatsThis(QApplication.translate('ViewManager', 3252 self.zoomToAct.setWhatsThis(QApplication.translate(
3164 """<b>Zoom</b>""" 3253 'ViewManager',
3165 """<p>Zoom the text. This opens a dialog where the""" 3254 """<b>Zoom</b>"""
3166 """ desired size can be entered.</p>""" 3255 """<p>Zoom the text. This opens a dialog where the"""
3167 )) 3256 """ desired size can be entered.</p>"""
3257 ))
3168 self.zoomToAct.triggered[()].connect(self.__zoom) 3258 self.zoomToAct.triggered[()].connect(self.__zoom)
3169 self.viewActions.append(self.zoomToAct) 3259 self.viewActions.append(self.zoomToAct)
3170 3260
3171 self.toggleAllAct = E5Action( 3261 self.toggleAllAct = E5Action(
3172 QApplication.translate('ViewManager', 'Toggle all folds'), 3262 QApplication.translate('ViewManager', 'Toggle all folds'),
3173 QApplication.translate('ViewManager', 'Toggle &all folds'), 3263 QApplication.translate('ViewManager', 'Toggle &all folds'),
3174 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds') 3264 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds')
3175 self.toggleAllAct.setStatusTip(QApplication.translate('ViewManager', 3265 self.toggleAllAct.setStatusTip(QApplication.translate(
3176 'Toggle all folds')) 3266 'ViewManager', 'Toggle all folds'))
3177 self.toggleAllAct.setWhatsThis(QApplication.translate('ViewManager', 3267 self.toggleAllAct.setWhatsThis(QApplication.translate(
3178 """<b>Toggle all folds</b>""" 3268 'ViewManager',
3179 """<p>Toggle all folds of the current editor.</p>""" 3269 """<b>Toggle all folds</b>"""
3180 )) 3270 """<p>Toggle all folds of the current editor.</p>"""
3271 ))
3181 self.toggleAllAct.triggered[()].connect(self.__toggleAll) 3272 self.toggleAllAct.triggered[()].connect(self.__toggleAll)
3182 self.viewActions.append(self.toggleAllAct) 3273 self.viewActions.append(self.toggleAllAct)
3183 3274
3184 self.toggleAllChildrenAct = E5Action( 3275 self.toggleAllChildrenAct = E5Action(
3185 QApplication.translate( 3276 QApplication.translate(
3192 self.toggleAllChildrenAct.setWhatsThis(QApplication.translate( 3283 self.toggleAllChildrenAct.setWhatsThis(QApplication.translate(
3193 'ViewManager', 3284 'ViewManager',
3194 """<b>Toggle all folds (including children)</b>""" 3285 """<b>Toggle all folds (including children)</b>"""
3195 """<p>Toggle all folds of the current editor including""" 3286 """<p>Toggle all folds of the current editor including"""
3196 """ all children.</p>""" 3287 """ all children.</p>"""
3197 )) 3288 ))
3198 self.toggleAllChildrenAct.triggered[()].connect( 3289 self.toggleAllChildrenAct.triggered[()].connect(
3199 self.__toggleAllChildren) 3290 self.__toggleAllChildren)
3200 self.viewActions.append(self.toggleAllChildrenAct) 3291 self.viewActions.append(self.toggleAllChildrenAct)
3201 3292
3202 self.toggleCurrentAct = E5Action( 3293 self.toggleCurrentAct = E5Action(
3208 self.toggleCurrentAct.setWhatsThis(QApplication.translate( 3299 self.toggleCurrentAct.setWhatsThis(QApplication.translate(
3209 'ViewManager', 3300 'ViewManager',
3210 """<b>Toggle current fold</b>""" 3301 """<b>Toggle current fold</b>"""
3211 """<p>Toggle the folds of the current line of the current""" 3302 """<p>Toggle the folds of the current line of the current"""
3212 """ editor.</p>""" 3303 """ editor.</p>"""
3213 )) 3304 ))
3214 self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent) 3305 self.toggleCurrentAct.triggered[()].connect(self.__toggleCurrent)
3215 self.viewActions.append(self.toggleCurrentAct) 3306 self.viewActions.append(self.toggleCurrentAct)
3216 3307
3217 self.unhighlightAct = E5Action(QApplication.translate('ViewManager', 3308 self.unhighlightAct = E5Action(
3218 'Remove all highlights'), 3309 QApplication.translate('ViewManager', 'Remove all highlights'),
3219 UI.PixmapCache.getIcon("unhighlight.png"), 3310 UI.PixmapCache.getIcon("unhighlight.png"),
3220 QApplication.translate('ViewManager', 3311 QApplication.translate('ViewManager', 'Remove all highlights'),
3221 'Remove all highlights'), 3312 0, 0,
3222 0, 0, self, 'vm_view_unhighlight') 3313 self, 'vm_view_unhighlight')
3223 self.unhighlightAct.setStatusTip(QApplication.translate('ViewManager', 3314 self.unhighlightAct.setStatusTip(QApplication.translate(
3224 'Remove all highlights')) 3315 'ViewManager', 'Remove all highlights'))
3225 self.unhighlightAct.setWhatsThis(QApplication.translate('ViewManager', 3316 self.unhighlightAct.setWhatsThis(QApplication.translate(
3226 """<b>Remove all highlights</b>""" 3317 'ViewManager',
3227 """<p>Remove the highlights of all editors.</p>""" 3318 """<b>Remove all highlights</b>"""
3228 )) 3319 """<p>Remove the highlights of all editors.</p>"""
3320 ))
3229 self.unhighlightAct.triggered[()].connect(self.unhighlight) 3321 self.unhighlightAct.triggered[()].connect(self.unhighlight)
3230 self.viewActions.append(self.unhighlightAct) 3322 self.viewActions.append(self.unhighlightAct)
3231 3323
3232 self.splitViewAct = E5Action( 3324 self.splitViewAct = E5Action(
3233 QApplication.translate('ViewManager', 'Split view'), 3325 QApplication.translate('ViewManager', 'Split view'),
3234 UI.PixmapCache.getIcon("splitVertical.png"), 3326 UI.PixmapCache.getIcon("splitVertical.png"),
3235 QApplication.translate('ViewManager', '&Split view'), 3327 QApplication.translate('ViewManager', '&Split view'),
3236 0, 0, self, 'vm_view_split_view') 3328 0, 0, self, 'vm_view_split_view')
3237 self.splitViewAct.setStatusTip(QApplication.translate('ViewManager', 3329 self.splitViewAct.setStatusTip(QApplication.translate(
3238 'Add a split to the view')) 3330 'ViewManager', 'Add a split to the view'))
3239 self.splitViewAct.setWhatsThis(QApplication.translate('ViewManager', 3331 self.splitViewAct.setWhatsThis(QApplication.translate(
3332 'ViewManager',
3240 """<b>Split view</b>""" 3333 """<b>Split view</b>"""
3241 """<p>Add a split to the view.</p>""" 3334 """<p>Add a split to the view.</p>"""
3242 )) 3335 ))
3243 self.splitViewAct.triggered[()].connect(self.__splitView) 3336 self.splitViewAct.triggered[()].connect(self.__splitView)
3244 self.viewActions.append(self.splitViewAct) 3337 self.viewActions.append(self.splitViewAct)
3245 3338
3246 self.splitOrientationAct = E5Action( 3339 self.splitOrientationAct = E5Action(
3247 QApplication.translate('ViewManager', 'Arrange horizontally'), 3340 QApplication.translate('ViewManager', 'Arrange horizontally'),
3251 'ViewManager', 'Arrange the splitted views horizontally')) 3344 'ViewManager', 'Arrange the splitted views horizontally'))
3252 self.splitOrientationAct.setWhatsThis(QApplication.translate( 3345 self.splitOrientationAct.setWhatsThis(QApplication.translate(
3253 'ViewManager', 3346 'ViewManager',
3254 """<b>Arrange horizontally</b>""" 3347 """<b>Arrange horizontally</b>"""
3255 """<p>Arrange the splitted views horizontally.</p>""" 3348 """<p>Arrange the splitted views horizontally.</p>"""
3256 )) 3349 ))
3257 self.splitOrientationAct.setChecked(False) 3350 self.splitOrientationAct.setChecked(False)
3258 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) 3351 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation)
3259 self.viewActions.append(self.splitOrientationAct) 3352 self.viewActions.append(self.splitOrientationAct)
3260 3353
3261 self.splitRemoveAct = E5Action( 3354 self.splitRemoveAct = E5Action(
3262 QApplication.translate('ViewManager', 'Remove split'), 3355 QApplication.translate('ViewManager', 'Remove split'),
3263 UI.PixmapCache.getIcon("remsplitVertical.png"), 3356 UI.PixmapCache.getIcon("remsplitVertical.png"),
3264 QApplication.translate('ViewManager', '&Remove split'), 3357 QApplication.translate('ViewManager', '&Remove split'),
3265 0, 0, self, 'vm_view_remove_split') 3358 0, 0, self, 'vm_view_remove_split')
3266 self.splitRemoveAct.setStatusTip(QApplication.translate('ViewManager', 3359 self.splitRemoveAct.setStatusTip(QApplication.translate(
3267 'Remove the current split')) 3360 'ViewManager', 'Remove the current split'))
3268 self.splitRemoveAct.setWhatsThis(QApplication.translate('ViewManager', 3361 self.splitRemoveAct.setWhatsThis(QApplication.translate(
3269 """<b>Remove split</b>""" 3362 'ViewManager',
3270 """<p>Remove the current split.</p>""" 3363 """<b>Remove split</b>"""
3271 )) 3364 """<p>Remove the current split.</p>"""
3365 ))
3272 self.splitRemoveAct.triggered[()].connect(self.removeSplit) 3366 self.splitRemoveAct.triggered[()].connect(self.removeSplit)
3273 self.viewActions.append(self.splitRemoveAct) 3367 self.viewActions.append(self.splitRemoveAct)
3274 3368
3275 self.nextSplitAct = E5Action( 3369 self.nextSplitAct = E5Action(
3276 QApplication.translate('ViewManager', 'Next split'), 3370 QApplication.translate('ViewManager', 'Next split'),
3277 QApplication.translate('ViewManager', '&Next split'), 3371 QApplication.translate('ViewManager', '&Next split'),
3278 QKeySequence(QApplication.translate('ViewManager', 3372 QKeySequence(QApplication.translate(
3279 "Ctrl+Alt+N", "View|Next split")), 3373 'ViewManager', "Ctrl+Alt+N", "View|Next split")),
3280 0, 3374 0,
3281 self, 'vm_next_split') 3375 self, 'vm_next_split')
3282 self.nextSplitAct.setStatusTip(QApplication.translate('ViewManager', 3376 self.nextSplitAct.setStatusTip(QApplication.translate(
3283 'Move to the next split')) 3377 'ViewManager', 'Move to the next split'))
3284 self.nextSplitAct.setWhatsThis(QApplication.translate('ViewManager', 3378 self.nextSplitAct.setWhatsThis(QApplication.translate(
3285 """<b>Next split</b>""" 3379 'ViewManager',
3286 """<p>Move to the next split.</p>""" 3380 """<b>Next split</b>"""
3287 )) 3381 """<p>Move to the next split.</p>"""
3382 ))
3288 self.nextSplitAct.triggered[()].connect(self.nextSplit) 3383 self.nextSplitAct.triggered[()].connect(self.nextSplit)
3289 self.viewActions.append(self.nextSplitAct) 3384 self.viewActions.append(self.nextSplitAct)
3290 3385
3291 self.prevSplitAct = E5Action( 3386 self.prevSplitAct = E5Action(
3292 QApplication.translate('ViewManager', 'Previous split'), 3387 QApplication.translate('ViewManager', 'Previous split'),
3293 QApplication.translate('ViewManager', '&Previous split'), 3388 QApplication.translate('ViewManager', '&Previous split'),
3294 QKeySequence(QApplication.translate('ViewManager', 3389 QKeySequence(QApplication.translate(
3295 "Ctrl+Alt+P", "View|Previous split")), 3390 'ViewManager', "Ctrl+Alt+P", "View|Previous split")),
3296 0, self, 'vm_previous_split') 3391 0, self, 'vm_previous_split')
3297 self.prevSplitAct.setStatusTip(QApplication.translate('ViewManager', 3392 self.prevSplitAct.setStatusTip(QApplication.translate(
3298 'Move to the previous split')) 3393 'ViewManager', 'Move to the previous split'))
3299 self.prevSplitAct.setWhatsThis(QApplication.translate('ViewManager', 3394 self.prevSplitAct.setWhatsThis(QApplication.translate(
3300 """<b>Previous split</b>""" 3395 'ViewManager',
3301 """<p>Move to the previous split.</p>""" 3396 """<b>Previous split</b>"""
3302 )) 3397 """<p>Move to the previous split.</p>"""
3398 ))
3303 self.prevSplitAct.triggered[()].connect(self.prevSplit) 3399 self.prevSplitAct.triggered[()].connect(self.prevSplit)
3304 self.viewActions.append(self.prevSplitAct) 3400 self.viewActions.append(self.prevSplitAct)
3305 3401
3306 self.previewAct = E5Action(QApplication.translate('ViewManager', 3402 self.previewAct = E5Action(
3307 'Preview'), 3403 QApplication.translate('ViewManager', 'Preview'),
3308 UI.PixmapCache.getIcon("previewer.png"), 3404 UI.PixmapCache.getIcon("previewer.png"),
3309 QApplication.translate('ViewManager', 'Preview'), 3405 QApplication.translate('ViewManager', 'Preview'),
3310 0, 0, self, 'vm_preview', True) 3406 0, 0, self, 'vm_preview', True)
3311 self.previewAct.setStatusTip(QApplication.translate('ViewManager', 3407 self.previewAct.setStatusTip(QApplication.translate(
3312 'Preview the current file in the web browser')) 3408 'ViewManager', 'Preview the current file in the web browser'))
3313 self.previewAct.setWhatsThis(QApplication.translate('ViewManager', 3409 self.previewAct.setWhatsThis(QApplication.translate(
3314 """<b>Preview</b>""" 3410 'ViewManager',
3315 """<p>This opens the web browser with a preview of""" 3411 """<b>Preview</b>"""
3316 """ the current file.</p>""" 3412 """<p>This opens the web browser with a preview of"""
3317 )) 3413 """ the current file.</p>"""
3414 ))
3318 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview")) 3415 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview"))
3319 self.previewAct.toggled[bool].connect(self.__previewEditor) 3416 self.previewAct.toggled[bool].connect(self.__previewEditor)
3320 self.viewActions.append(self.previewAct) 3417 self.viewActions.append(self.previewAct)
3321 3418
3322 self.viewActGrp.setEnabled(False) 3419 self.viewActGrp.setEnabled(False)
3397 'ViewManager', 'Start Macro Recording')) 3494 'ViewManager', 'Start Macro Recording'))
3398 self.macroStartRecAct.setWhatsThis(QApplication.translate( 3495 self.macroStartRecAct.setWhatsThis(QApplication.translate(
3399 'ViewManager', 3496 'ViewManager',
3400 """<b>Start Macro Recording</b>""" 3497 """<b>Start Macro Recording</b>"""
3401 """<p>Start recording editor commands into a new macro.</p>""" 3498 """<p>Start recording editor commands into a new macro.</p>"""
3402 )) 3499 ))
3403 self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording) 3500 self.macroStartRecAct.triggered[()].connect(self.__macroStartRecording)
3404 self.macroActions.append(self.macroStartRecAct) 3501 self.macroActions.append(self.macroStartRecAct)
3405 3502
3406 self.macroStopRecAct = E5Action(QApplication.translate('ViewManager', 3503 self.macroStopRecAct = E5Action(
3407 'Stop Macro Recording'), 3504 QApplication.translate('ViewManager', 'Stop Macro Recording'),
3408 QApplication.translate('ViewManager', 3505 QApplication.translate('ViewManager', 'Sto&p Macro Recording'),
3409 'Sto&p Macro Recording'), 3506 0, 0, self.macroActGrp, 'vm_macro_stop_recording')
3410 0, 0, self.macroActGrp, 'vm_macro_stop_recording') 3507 self.macroStopRecAct.setStatusTip(QApplication.translate(
3411 self.macroStopRecAct.setStatusTip(QApplication.translate('ViewManager', 3508 'ViewManager', 'Stop Macro Recording'))
3412 'Stop Macro Recording')) 3509 self.macroStopRecAct.setWhatsThis(QApplication.translate(
3413 self.macroStopRecAct.setWhatsThis(QApplication.translate('ViewManager', 3510 'ViewManager',
3414 """<b>Stop Macro Recording</b>""" 3511 """<b>Stop Macro Recording</b>"""
3415 """<p>Stop recording editor commands into a new macro.</p>""" 3512 """<p>Stop recording editor commands into a new macro.</p>"""
3416 )) 3513 ))
3417 self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording) 3514 self.macroStopRecAct.triggered[()].connect(self.__macroStopRecording)
3418 self.macroActions.append(self.macroStopRecAct) 3515 self.macroActions.append(self.macroStopRecAct)
3419 3516
3420 self.macroRunAct = E5Action( 3517 self.macroRunAct = E5Action(
3421 QApplication.translate('ViewManager', 'Run Macro'), 3518 QApplication.translate('ViewManager', 'Run Macro'),
3425 'ViewManager', 'Run Macro')) 3522 'ViewManager', 'Run Macro'))
3426 self.macroRunAct.setWhatsThis(QApplication.translate( 3523 self.macroRunAct.setWhatsThis(QApplication.translate(
3427 'ViewManager', 3524 'ViewManager',
3428 """<b>Run Macro</b>""" 3525 """<b>Run Macro</b>"""
3429 """<p>Run a previously recorded editor macro.</p>""" 3526 """<p>Run a previously recorded editor macro.</p>"""
3430 )) 3527 ))
3431 self.macroRunAct.triggered[()].connect(self.__macroRun) 3528 self.macroRunAct.triggered[()].connect(self.__macroRun)
3432 self.macroActions.append(self.macroRunAct) 3529 self.macroActions.append(self.macroRunAct)
3433 3530
3434 self.macroDeleteAct = E5Action( 3531 self.macroDeleteAct = E5Action(
3435 QApplication.translate('ViewManager', 'Delete Macro'), 3532 QApplication.translate('ViewManager', 'Delete Macro'),
3439 'ViewManager', 'Delete Macro')) 3536 'ViewManager', 'Delete Macro'))
3440 self.macroDeleteAct.setWhatsThis(QApplication.translate( 3537 self.macroDeleteAct.setWhatsThis(QApplication.translate(
3441 'ViewManager', 3538 'ViewManager',
3442 """<b>Delete Macro</b>""" 3539 """<b>Delete Macro</b>"""
3443 """<p>Delete a previously recorded editor macro.</p>""" 3540 """<p>Delete a previously recorded editor macro.</p>"""
3444 )) 3541 ))
3445 self.macroDeleteAct.triggered[()].connect(self.__macroDelete) 3542 self.macroDeleteAct.triggered[()].connect(self.__macroDelete)
3446 self.macroActions.append(self.macroDeleteAct) 3543 self.macroActions.append(self.macroDeleteAct)
3447 3544
3448 self.macroLoadAct = E5Action( 3545 self.macroLoadAct = E5Action(
3449 QApplication.translate('ViewManager', 'Load Macro'), 3546 QApplication.translate('ViewManager', 'Load Macro'),
3453 'ViewManager', 'Load Macro')) 3550 'ViewManager', 'Load Macro'))
3454 self.macroLoadAct.setWhatsThis(QApplication.translate( 3551 self.macroLoadAct.setWhatsThis(QApplication.translate(
3455 'ViewManager', 3552 'ViewManager',
3456 """<b>Load Macro</b>""" 3553 """<b>Load Macro</b>"""
3457 """<p>Load an editor macro from a file.</p>""" 3554 """<p>Load an editor macro from a file.</p>"""
3458 )) 3555 ))
3459 self.macroLoadAct.triggered[()].connect(self.__macroLoad) 3556 self.macroLoadAct.triggered[()].connect(self.__macroLoad)
3460 self.macroActions.append(self.macroLoadAct) 3557 self.macroActions.append(self.macroLoadAct)
3461 3558
3462 self.macroSaveAct = E5Action( 3559 self.macroSaveAct = E5Action(
3463 QApplication.translate('ViewManager', 'Save Macro'), 3560 QApplication.translate('ViewManager', 'Save Macro'),
3464 QApplication.translate('ViewManager', '&Save Macro'), 3561 QApplication.translate('ViewManager', '&Save Macro'),
3465 0, 0, self.macroActGrp, 'vm_macro_save') 3562 0, 0, self.macroActGrp, 'vm_macro_save')
3466 self.macroSaveAct.setStatusTip(QApplication.translate('ViewManager', 3563 self.macroSaveAct.setStatusTip(QApplication.translate(
3467 'Save Macro')) 3564 'ViewManager', 'Save Macro'))
3468 self.macroSaveAct.setWhatsThis(QApplication.translate('ViewManager', 3565 self.macroSaveAct.setWhatsThis(QApplication.translate(
3469 """<b>Save Macro</b>""" 3566 'ViewManager',
3470 """<p>Save a previously recorded editor macro to a file.</p>""" 3567 """<b>Save Macro</b>"""
3471 )) 3568 """<p>Save a previously recorded editor macro to a file.</p>"""
3569 ))
3472 self.macroSaveAct.triggered[()].connect(self.__macroSave) 3570 self.macroSaveAct.triggered[()].connect(self.__macroSave)
3473 self.macroActions.append(self.macroSaveAct) 3571 self.macroActions.append(self.macroSaveAct)
3474 3572
3475 self.macroActGrp.setEnabled(False) 3573 self.macroActGrp.setEnabled(False)
3476 3574
3510 self.bookmarkToggleAct.setWhatsThis(QApplication.translate( 3608 self.bookmarkToggleAct.setWhatsThis(QApplication.translate(
3511 'ViewManager', 3609 'ViewManager',
3512 """<b>Toggle Bookmark</b>""" 3610 """<b>Toggle Bookmark</b>"""
3513 """<p>Toggle a bookmark at the current line of the current""" 3611 """<p>Toggle a bookmark at the current line of the current"""
3514 """ editor.</p>""" 3612 """ editor.</p>"""
3515 )) 3613 ))
3516 self.bookmarkToggleAct.triggered[()].connect(self.__toggleBookmark) 3614 self.bookmarkToggleAct.triggered[()].connect(self.__toggleBookmark)
3517 self.bookmarkActions.append(self.bookmarkToggleAct) 3615 self.bookmarkActions.append(self.bookmarkToggleAct)
3518 3616
3519 self.bookmarkNextAct = E5Action( 3617 self.bookmarkNextAct = E5Action(
3520 QApplication.translate('ViewManager', 'Next Bookmark'), 3618 QApplication.translate('ViewManager', 'Next Bookmark'),
3522 QApplication.translate('ViewManager', '&Next Bookmark'), 3620 QApplication.translate('ViewManager', '&Next Bookmark'),
3523 QKeySequence(QApplication.translate( 3621 QKeySequence(QApplication.translate(
3524 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), 3622 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")),
3525 0, 3623 0,
3526 self.bookmarkActGrp, 'vm_bookmark_next') 3624 self.bookmarkActGrp, 'vm_bookmark_next')
3527 self.bookmarkNextAct.setStatusTip(QApplication.translate('ViewManager', 3625 self.bookmarkNextAct.setStatusTip(QApplication.translate(
3528 'Next Bookmark')) 3626 'ViewManager', 'Next Bookmark'))
3529 self.bookmarkNextAct.setWhatsThis(QApplication.translate('ViewManager', 3627 self.bookmarkNextAct.setWhatsThis(QApplication.translate(
3530 """<b>Next Bookmark</b>""" 3628 'ViewManager',
3531 """<p>Go to next bookmark of the current editor.</p>""" 3629 """<b>Next Bookmark</b>"""
3532 )) 3630 """<p>Go to next bookmark of the current editor.</p>"""
3631 ))
3533 self.bookmarkNextAct.triggered[()].connect(self.__nextBookmark) 3632 self.bookmarkNextAct.triggered[()].connect(self.__nextBookmark)
3534 self.bookmarkActions.append(self.bookmarkNextAct) 3633 self.bookmarkActions.append(self.bookmarkNextAct)
3535 3634
3536 self.bookmarkPreviousAct = E5Action( 3635 self.bookmarkPreviousAct = E5Action(
3537 QApplication.translate('ViewManager', 'Previous Bookmark'), 3636 QApplication.translate('ViewManager', 'Previous Bookmark'),
3545 'ViewManager', 'Previous Bookmark')) 3644 'ViewManager', 'Previous Bookmark'))
3546 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate( 3645 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate(
3547 'ViewManager', 3646 'ViewManager',
3548 """<b>Previous Bookmark</b>""" 3647 """<b>Previous Bookmark</b>"""
3549 """<p>Go to previous bookmark of the current editor.</p>""" 3648 """<p>Go to previous bookmark of the current editor.</p>"""
3550 )) 3649 ))
3551 self.bookmarkPreviousAct.triggered[()].connect(self.__previousBookmark) 3650 self.bookmarkPreviousAct.triggered[()].connect(self.__previousBookmark)
3552 self.bookmarkActions.append(self.bookmarkPreviousAct) 3651 self.bookmarkActions.append(self.bookmarkPreviousAct)
3553 3652
3554 self.bookmarkClearAct = E5Action( 3653 self.bookmarkClearAct = E5Action(
3555 QApplication.translate('ViewManager', 'Clear Bookmarks'), 3654 QApplication.translate('ViewManager', 'Clear Bookmarks'),
3562 'ViewManager', 'Clear Bookmarks')) 3661 'ViewManager', 'Clear Bookmarks'))
3563 self.bookmarkClearAct.setWhatsThis(QApplication.translate( 3662 self.bookmarkClearAct.setWhatsThis(QApplication.translate(
3564 'ViewManager', 3663 'ViewManager',
3565 """<b>Clear Bookmarks</b>""" 3664 """<b>Clear Bookmarks</b>"""
3566 """<p>Clear bookmarks of all editors.</p>""" 3665 """<p>Clear bookmarks of all editors.</p>"""
3567 )) 3666 ))
3568 self.bookmarkClearAct.triggered[()].connect(self.__clearAllBookmarks) 3667 self.bookmarkClearAct.triggered[()].connect(self.__clearAllBookmarks)
3569 self.bookmarkActions.append(self.bookmarkClearAct) 3668 self.bookmarkActions.append(self.bookmarkClearAct)
3570 3669
3571 self.syntaxErrorGotoAct = E5Action( 3670 self.syntaxErrorGotoAct = E5Action(
3572 QApplication.translate('ViewManager', 'Goto Syntax Error'), 3671 QApplication.translate('ViewManager', 'Goto Syntax Error'),
3578 'ViewManager', 'Goto Syntax Error')) 3677 'ViewManager', 'Goto Syntax Error'))
3579 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate( 3678 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate(
3580 'ViewManager', 3679 'ViewManager',
3581 """<b>Goto Syntax Error</b>""" 3680 """<b>Goto Syntax Error</b>"""
3582 """<p>Go to next syntax error of the current editor.</p>""" 3681 """<p>Go to next syntax error of the current editor.</p>"""
3583 )) 3682 ))
3584 self.syntaxErrorGotoAct.triggered[()].connect(self.__gotoSyntaxError) 3683 self.syntaxErrorGotoAct.triggered[()].connect(self.__gotoSyntaxError)
3585 self.bookmarkActions.append(self.syntaxErrorGotoAct) 3684 self.bookmarkActions.append(self.syntaxErrorGotoAct)
3586 3685
3587 self.syntaxErrorClearAct = E5Action( 3686 self.syntaxErrorClearAct = E5Action(
3588 QApplication.translate('ViewManager', 'Clear Syntax Errors'), 3687 QApplication.translate('ViewManager', 'Clear Syntax Errors'),
3593 'ViewManager', 'Clear Syntax Errors')) 3692 'ViewManager', 'Clear Syntax Errors'))
3594 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( 3693 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate(
3595 'ViewManager', 3694 'ViewManager',
3596 """<b>Clear Syntax Errors</b>""" 3695 """<b>Clear Syntax Errors</b>"""
3597 """<p>Clear syntax errors of all editors.</p>""" 3696 """<p>Clear syntax errors of all editors.</p>"""
3598 )) 3697 ))
3599 self.syntaxErrorClearAct.triggered[()].connect( 3698 self.syntaxErrorClearAct.triggered[()].connect(
3600 self.__clearAllSyntaxErrors) 3699 self.__clearAllSyntaxErrors)
3601 self.bookmarkActions.append(self.syntaxErrorClearAct) 3700 self.bookmarkActions.append(self.syntaxErrorClearAct)
3602 3701
3603 self.warningsNextAct = E5Action(QApplication.translate('ViewManager', 3702 self.warningsNextAct = E5Action(
3604 'Next warning message'), 3703 QApplication.translate('ViewManager', 'Next warning message'),
3605 UI.PixmapCache.getIcon("warningNext.png"), 3704 UI.PixmapCache.getIcon("warningNext.png"),
3606 QApplication.translate('ViewManager', 3705 QApplication.translate('ViewManager', '&Next warning message'),
3607 '&Next warning message'), 3706 0, 0,
3608 0, 0, 3707 self.bookmarkActGrp, 'vm_warning_next')
3609 self.bookmarkActGrp, 'vm_warning_next') 3708 self.warningsNextAct.setStatusTip(QApplication.translate(
3610 self.warningsNextAct.setStatusTip(QApplication.translate('ViewManager', 3709 'ViewManager', 'Next warning message'))
3611 'Next warning message')) 3710 self.warningsNextAct.setWhatsThis(QApplication.translate(
3612 self.warningsNextAct.setWhatsThis(QApplication.translate('ViewManager', 3711 'ViewManager',
3613 """<b>Next warning message</b>""" 3712 """<b>Next warning message</b>"""
3614 """<p>Go to next line of the current editor""" 3713 """<p>Go to next line of the current editor"""
3615 """ having a py3flakes warning.</p>""" 3714 """ having a py3flakes warning.</p>"""
3616 )) 3715 ))
3617 self.warningsNextAct.triggered[()].connect(self.__nextWarning) 3716 self.warningsNextAct.triggered[()].connect(self.__nextWarning)
3618 self.bookmarkActions.append(self.warningsNextAct) 3717 self.bookmarkActions.append(self.warningsNextAct)
3619 3718
3620 self.warningsPreviousAct = E5Action( 3719 self.warningsPreviousAct = E5Action(
3621 QApplication.translate('ViewManager', 'Previous warning message'), 3720 QApplication.translate('ViewManager', 'Previous warning message'),
3622 UI.PixmapCache.getIcon("warningPrev.png"), 3721 UI.PixmapCache.getIcon("warningPrev.png"),
3623 QApplication.translate('ViewManager', 3722 QApplication.translate(
3624 '&Previous warning message'), 3723 'ViewManager', '&Previous warning message'),
3625 0, 0, 3724 0, 0,
3626 self.bookmarkActGrp, 'vm_warning_previous') 3725 self.bookmarkActGrp, 'vm_warning_previous')
3627 self.warningsPreviousAct.setStatusTip(QApplication.translate( 3726 self.warningsPreviousAct.setStatusTip(QApplication.translate(
3628 'ViewManager', 'Previous warning message')) 3727 'ViewManager', 'Previous warning message'))
3629 self.warningsPreviousAct.setWhatsThis(QApplication.translate( 3728 self.warningsPreviousAct.setWhatsThis(QApplication.translate(
3630 'ViewManager', 3729 'ViewManager',
3631 """<b>Previous warning message</b>""" 3730 """<b>Previous warning message</b>"""
3632 """<p>Go to previous line of the current editor""" 3731 """<p>Go to previous line of the current editor"""
3633 """ having a py3flakes warning.</p>""" 3732 """ having a py3flakes warning.</p>"""
3634 )) 3733 ))
3635 self.warningsPreviousAct.triggered[()].connect(self.__previousWarning) 3734 self.warningsPreviousAct.triggered[()].connect(self.__previousWarning)
3636 self.bookmarkActions.append(self.warningsPreviousAct) 3735 self.bookmarkActions.append(self.warningsPreviousAct)
3637 3736
3638 self.warningsClearAct = E5Action( 3737 self.warningsClearAct = E5Action(
3639 QApplication.translate('ViewManager', 'Clear Warning Messages'), 3738 QApplication.translate('ViewManager', 'Clear Warning Messages'),
3644 'ViewManager', 'Clear Warning Messages')) 3743 'ViewManager', 'Clear Warning Messages'))
3645 self.warningsClearAct.setWhatsThis(QApplication.translate( 3744 self.warningsClearAct.setWhatsThis(QApplication.translate(
3646 'ViewManager', 3745 'ViewManager',
3647 """<b>Clear Warning Messages</b>""" 3746 """<b>Clear Warning Messages</b>"""
3648 """<p>Clear py3flakes warning messages of all editors.</p>""" 3747 """<p>Clear py3flakes warning messages of all editors.</p>"""
3649 )) 3748 ))
3650 self.warningsClearAct.triggered[()].connect(self.__clearAllWarnings) 3749 self.warningsClearAct.triggered[()].connect(self.__clearAllWarnings)
3651 self.bookmarkActions.append(self.warningsClearAct) 3750 self.bookmarkActions.append(self.warningsClearAct)
3652 3751
3653 self.notcoveredNextAct = E5Action( 3752 self.notcoveredNextAct = E5Action(
3654 QApplication.translate('ViewManager', 'Next uncovered line'), 3753 QApplication.translate('ViewManager', 'Next uncovered line'),
3661 self.notcoveredNextAct.setWhatsThis(QApplication.translate( 3760 self.notcoveredNextAct.setWhatsThis(QApplication.translate(
3662 'ViewManager', 3761 'ViewManager',
3663 """<b>Next uncovered line</b>""" 3762 """<b>Next uncovered line</b>"""
3664 """<p>Go to next line of the current editor marked as not""" 3763 """<p>Go to next line of the current editor marked as not"""
3665 """ covered.</p>""" 3764 """ covered.</p>"""
3666 )) 3765 ))
3667 self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered) 3766 self.notcoveredNextAct.triggered[()].connect(self.__nextUncovered)
3668 self.bookmarkActions.append(self.notcoveredNextAct) 3767 self.bookmarkActions.append(self.notcoveredNextAct)
3669 3768
3670 self.notcoveredPreviousAct = E5Action( 3769 self.notcoveredPreviousAct = E5Action(
3671 QApplication.translate('ViewManager', 'Previous uncovered line'), 3770 QApplication.translate('ViewManager', 'Previous uncovered line'),
3672 UI.PixmapCache.getIcon("notcoveredPrev.png"), 3771 UI.PixmapCache.getIcon("notcoveredPrev.png"),
3673 QApplication.translate('ViewManager', 3772 QApplication.translate(
3674 '&Previous uncovered line'), 3773 'ViewManager', '&Previous uncovered line'),
3675 0, 0, 3774 0, 0,
3676 self.bookmarkActGrp, 'vm_uncovered_previous') 3775 self.bookmarkActGrp, 'vm_uncovered_previous')
3677 self.notcoveredPreviousAct.setStatusTip(QApplication.translate( 3776 self.notcoveredPreviousAct.setStatusTip(QApplication.translate(
3678 'ViewManager', 'Previous uncovered line')) 3777 'ViewManager', 'Previous uncovered line'))
3679 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate( 3778 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate(
3680 'ViewManager', 3779 'ViewManager',
3681 """<b>Previous uncovered line</b>""" 3780 """<b>Previous uncovered line</b>"""
3682 """<p>Go to previous line of the current editor marked""" 3781 """<p>Go to previous line of the current editor marked"""
3683 """ as not covered.</p>""" 3782 """ as not covered.</p>"""
3684 )) 3783 ))
3685 self.notcoveredPreviousAct.triggered[()].connect( 3784 self.notcoveredPreviousAct.triggered[()].connect(
3686 self.__previousUncovered) 3785 self.__previousUncovered)
3687 self.bookmarkActions.append(self.notcoveredPreviousAct) 3786 self.bookmarkActions.append(self.notcoveredPreviousAct)
3688 3787
3689 self.taskNextAct = E5Action( 3788 self.taskNextAct = E5Action(
3696 'ViewManager', 'Next Task')) 3795 'ViewManager', 'Next Task'))
3697 self.taskNextAct.setWhatsThis(QApplication.translate( 3796 self.taskNextAct.setWhatsThis(QApplication.translate(
3698 'ViewManager', 3797 'ViewManager',
3699 """<b>Next Task</b>""" 3798 """<b>Next Task</b>"""
3700 """<p>Go to next line of the current editor having a task.</p>""" 3799 """<p>Go to next line of the current editor having a task.</p>"""
3701 )) 3800 ))
3702 self.taskNextAct.triggered[()].connect(self.__nextTask) 3801 self.taskNextAct.triggered[()].connect(self.__nextTask)
3703 self.bookmarkActions.append(self.taskNextAct) 3802 self.bookmarkActions.append(self.taskNextAct)
3704 3803
3705 self.taskPreviousAct = E5Action( 3804 self.taskPreviousAct = E5Action(
3706 QApplication.translate('ViewManager', 'Previous Task'), 3805 QApplication.translate('ViewManager', 'Previous Task'),
3707 UI.PixmapCache.getIcon("taskPrev.png"), 3806 UI.PixmapCache.getIcon("taskPrev.png"),
3708 QApplication.translate('ViewManager', 3807 QApplication.translate(
3709 '&Previous Task'), 3808 'ViewManager', '&Previous Task'),
3710 0, 0, 3809 0, 0,
3711 self.bookmarkActGrp, 'vm_task_previous') 3810 self.bookmarkActGrp, 'vm_task_previous')
3712 self.taskPreviousAct.setStatusTip(QApplication.translate( 3811 self.taskPreviousAct.setStatusTip(QApplication.translate(
3713 'ViewManager', 'Previous Task')) 3812 'ViewManager', 'Previous Task'))
3714 self.taskPreviousAct.setWhatsThis(QApplication.translate( 3813 self.taskPreviousAct.setWhatsThis(QApplication.translate(
3715 'ViewManager', 3814 'ViewManager',
3716 """<b>Previous Task</b>""" 3815 """<b>Previous Task</b>"""
3717 """<p>Go to previous line of the current editor having a""" 3816 """<p>Go to previous line of the current editor having a"""
3718 """ task.</p>""" 3817 """ task.</p>"""
3719 )) 3818 ))
3720 self.taskPreviousAct.triggered[()].connect(self.__previousTask) 3819 self.taskPreviousAct.triggered[()].connect(self.__previousTask)
3721 self.bookmarkActions.append(self.taskPreviousAct) 3820 self.bookmarkActions.append(self.taskPreviousAct)
3722 3821
3723 self.changeNextAct = E5Action( 3822 self.changeNextAct = E5Action(
3724 QApplication.translate('ViewManager', 'Next Change'), 3823 QApplication.translate('ViewManager', 'Next Change'),
3731 self.changeNextAct.setWhatsThis(QApplication.translate( 3830 self.changeNextAct.setWhatsThis(QApplication.translate(
3732 'ViewManager', 3831 'ViewManager',
3733 """<b>Next Change</b>""" 3832 """<b>Next Change</b>"""
3734 """<p>Go to next line of the current editor having a change""" 3833 """<p>Go to next line of the current editor having a change"""
3735 """ marker.</p>""" 3834 """ marker.</p>"""
3736 )) 3835 ))
3737 self.changeNextAct.triggered[()].connect(self.__nextChange) 3836 self.changeNextAct.triggered[()].connect(self.__nextChange)
3738 self.bookmarkActions.append(self.changeNextAct) 3837 self.bookmarkActions.append(self.changeNextAct)
3739 3838
3740 self.changePreviousAct = E5Action( 3839 self.changePreviousAct = E5Action(
3741 QApplication.translate('ViewManager', 'Previous Change'), 3840 QApplication.translate('ViewManager', 'Previous Change'),
3742 UI.PixmapCache.getIcon("changePrev.png"), 3841 UI.PixmapCache.getIcon("changePrev.png"),
3743 QApplication.translate('ViewManager', 3842 QApplication.translate(
3744 '&Previous Change'), 3843 'ViewManager', '&Previous Change'),
3745 0, 0, 3844 0, 0,
3746 self.bookmarkActGrp, 'vm_change_previous') 3845 self.bookmarkActGrp, 'vm_change_previous')
3747 self.changePreviousAct.setStatusTip(QApplication.translate( 3846 self.changePreviousAct.setStatusTip(QApplication.translate(
3748 'ViewManager', 'Previous Change')) 3847 'ViewManager', 'Previous Change'))
3749 self.changePreviousAct.setWhatsThis(QApplication.translate( 3848 self.changePreviousAct.setWhatsThis(QApplication.translate(
3750 'ViewManager', 3849 'ViewManager',
3751 """<b>Previous Change</b>""" 3850 """<b>Previous Change</b>"""
3752 """<p>Go to previous line of the current editor having""" 3851 """<p>Go to previous line of the current editor having"""
3753 """ a change marker.</p>""" 3852 """ a change marker.</p>"""
3754 )) 3853 ))
3755 self.changePreviousAct.triggered[()].connect(self.__previousChange) 3854 self.changePreviousAct.triggered[()].connect(self.__previousChange)
3756 self.bookmarkActions.append(self.changePreviousAct) 3855 self.bookmarkActions.append(self.changePreviousAct)
3757 3856
3758 self.bookmarkActGrp.setEnabled(False) 3857 self.bookmarkActGrp.setEnabled(False)
3759 3858
3845 self.spellingActGrp = createActionGroup(self) 3944 self.spellingActGrp = createActionGroup(self)
3846 3945
3847 self.spellCheckAct = E5Action( 3946 self.spellCheckAct = E5Action(
3848 QApplication.translate('ViewManager', 'Check spelling'), 3947 QApplication.translate('ViewManager', 'Check spelling'),
3849 UI.PixmapCache.getIcon("spellchecking.png"), 3948 UI.PixmapCache.getIcon("spellchecking.png"),
3850 QApplication.translate('ViewManager', 3949 QApplication.translate(
3851 'Check &spelling...'), 3950 'ViewManager', 'Check &spelling...'),
3852 QKeySequence(QApplication.translate('ViewManager', 3951 QKeySequence(QApplication.translate(
3853 "Shift+F7", "Spelling|Spell Check")), 3952 'ViewManager', "Shift+F7", "Spelling|Spell Check")),
3854 0, 3953 0,
3855 self.spellingActGrp, 'vm_spelling_spellcheck') 3954 self.spellingActGrp, 'vm_spelling_spellcheck')
3856 self.spellCheckAct.setStatusTip(QApplication.translate( 3955 self.spellCheckAct.setStatusTip(QApplication.translate(
3857 'ViewManager', 'Perform spell check of current editor')) 3956 'ViewManager', 'Perform spell check of current editor'))
3858 self.spellCheckAct.setWhatsThis(QApplication.translate( 3957 self.spellCheckAct.setWhatsThis(QApplication.translate(
3859 'ViewManager', 3958 'ViewManager',
3860 """<b>Check spelling</b>""" 3959 """<b>Check spelling</b>"""
3861 """<p>Perform a spell check of the current editor.</p>""" 3960 """<p>Perform a spell check of the current editor.</p>"""
3862 )) 3961 ))
3863 self.spellCheckAct.triggered[()].connect(self.__spellCheck) 3962 self.spellCheckAct.triggered[()].connect(self.__spellCheck)
3864 self.spellingActions.append(self.spellCheckAct) 3963 self.spellingActions.append(self.spellCheckAct)
3865 3964
3866 self.autoSpellCheckAct = E5Action( 3965 self.autoSpellCheckAct = E5Action(
3867 QApplication.translate('ViewManager', 'Automatic spell checking'), 3966 QApplication.translate('ViewManager', 'Automatic spell checking'),
3868 UI.PixmapCache.getIcon("autospellchecking.png"), 3967 UI.PixmapCache.getIcon("autospellchecking.png"),
3869 QApplication.translate('ViewManager', 3968 QApplication.translate(
3870 '&Automatic spell checking'), 3969 'ViewManager', '&Automatic spell checking'),
3871 0, 0, 3970 0, 0,
3872 self.spellingActGrp, 'vm_spelling_autospellcheck', True) 3971 self.spellingActGrp, 'vm_spelling_autospellcheck', True)
3873 self.autoSpellCheckAct.setStatusTip(QApplication.translate( 3972 self.autoSpellCheckAct.setStatusTip(QApplication.translate(
3874 'ViewManager', '(De-)Activate automatic spell checking')) 3973 'ViewManager', '(De-)Activate automatic spell checking'))
3875 self.autoSpellCheckAct.setWhatsThis(QApplication.translate( 3974 self.autoSpellCheckAct.setWhatsThis(QApplication.translate(
3876 'ViewManager', 3975 'ViewManager',
3877 """<b>Automatic spell checking</b>""" 3976 """<b>Automatic spell checking</b>"""
3878 """<p>Activate or deactivate the automatic spell checking""" 3977 """<p>Activate or deactivate the automatic spell checking"""
3879 """ function of all editors.</p>""" 3978 """ function of all editors.</p>"""
3880 )) 3979 ))
3881 self.autoSpellCheckAct.setChecked( 3980 self.autoSpellCheckAct.setChecked(
3882 Preferences.getEditor("AutoSpellCheckingEnabled")) 3981 Preferences.getEditor("AutoSpellCheckingEnabled"))
3883 self.autoSpellCheckAct.triggered[()].connect( 3982 self.autoSpellCheckAct.triggered[()].connect(
3884 self.__setAutoSpellChecking) 3983 self.__setAutoSpellChecking)
3885 self.spellingActions.append(self.autoSpellCheckAct) 3984 self.spellingActions.append(self.autoSpellCheckAct)
3901 """ 4000 """
3902 Public method to add some actions to the extras menu. 4001 Public method to add some actions to the extras menu.
3903 4002
3904 @param menu reference to the menu to add actions to (QMenu) 4003 @param menu reference to the menu to add actions to (QMenu)
3905 """ 4004 """
3906 self.__editSpellingMenu = QMenu(QApplication.translate('ViewManager', 4005 self.__editSpellingMenu = QMenu(QApplication.translate(
3907 "Edit Dictionary")) 4006 'ViewManager', "Edit Dictionary"))
3908 self.__editProjectPwlAct = self.__editSpellingMenu.addAction( 4007 self.__editProjectPwlAct = self.__editSpellingMenu.addAction(
3909 QApplication.translate('ViewManager', "Project Word List"), 4008 QApplication.translate('ViewManager', "Project Word List"),
3910 self.__editProjectPWL) 4009 self.__editProjectPWL)
3911 self.__editProjectPelAct = self.__editSpellingMenu.addAction( 4010 self.__editProjectPelAct = self.__editSpellingMenu.addAction(
3912 QApplication.translate('ViewManager', "Project Exception List"), 4011 QApplication.translate('ViewManager', "Project Exception List"),
4002 res = editor.saveFile() 4101 res = editor.saveFile()
4003 else: 4102 else:
4004 res = E5MessageBox.okToClearData( 4103 res = E5MessageBox.okToClearData(
4005 self.ui, 4104 self.ui,
4006 QApplication.translate('ViewManager', "File Modified"), 4105 QApplication.translate('ViewManager', "File Modified"),
4007 QApplication.translate('ViewManager', 4106 QApplication.translate(
4107 'ViewManager',
4008 """<p>The file <b>{0}</b> has unsaved changes.</p>""") 4108 """<p>The file <b>{0}</b> has unsaved changes.</p>""")
4009 .format(fn), 4109 .format(fn),
4010 editor.saveFile) 4110 editor.saveFile)
4011 if res: 4111 if res:
4012 self.setEditorName(editor, editor.getFileName()) 4112 self.setEditorName(editor, editor.getFileName())
4013 return res 4113 return res
4014 4114
4332 self.sbLang.setToolTip("") 4432 self.sbLang.setToolTip("")
4333 else: 4433 else:
4334 self.sbLang.setText("") 4434 self.sbLang.setText("")
4335 self.sbLang.setToolTip( 4435 self.sbLang.setToolTip(
4336 QApplication.translate('ViewManager', 'Language: {0}') 4436 QApplication.translate('ViewManager', 'Language: {0}')
4337 .format(language)) 4437 .format(language))
4338 4438
4339 if eol is None: 4439 if eol is None:
4340 eol = '' 4440 eol = ''
4341 self.sbEol.setPixmap(self.__eolPixmap(eol)) 4441 self.sbEol.setPixmap(self.__eolPixmap(eol))
4342 self.sbEol.setToolTip( 4442 self.sbEol.setToolTip(
4651 if idx < 10: 4751 if idx < 10:
4652 formatStr = '&{0:d}. {1}' 4752 formatStr = '&{0:d}. {1}'
4653 else: 4753 else:
4654 formatStr = '{0:d}. {1}' 4754 formatStr = '{0:d}. {1}'
4655 act = self.recentMenu.addAction( 4755 act = self.recentMenu.addAction(
4656 formatStr.format(idx, 4756 formatStr.format(
4757 idx,
4657 Utilities.compactPath(rs, self.ui.maxMenuFilePathLen))) 4758 Utilities.compactPath(rs, self.ui.maxMenuFilePathLen)))
4658 act.setData(rs) 4759 act.setData(rs)
4659 act.setEnabled(QFileInfo(rs).exists()) 4760 act.setEnabled(QFileInfo(rs).exists())
4660 idx += 1 4761 idx += 1
4661 4762
5826 """ not be read.</p><p>Reason: {1}</p>""").format( 5927 """ not be read.</p><p>Reason: {1}</p>""").format(
5827 dictionaryFile, str(err))) 5928 dictionaryFile, str(err)))
5828 return 5929 return
5829 5930
5830 fileInfo = dictionaryFile if len(dictionaryFile) < 40 \ 5931 fileInfo = dictionaryFile if len(dictionaryFile) < 40 \
5831 else "...{0}".format(dictionaryFile[-40:]) 5932 else "...{0}".format(dictionaryFile[-40:])
5832 from QScintilla.SpellingDictionaryEditDialog import \ 5933 from QScintilla.SpellingDictionaryEditDialog import \
5833 SpellingDictionaryEditDialog 5934 SpellingDictionaryEditDialog
5834 dlg = SpellingDictionaryEditDialog( 5935 dlg = SpellingDictionaryEditDialog(
5835 data, 5936 data,
5836 QApplication.translate('ViewManager', "Editing {0}") 5937 QApplication.translate('ViewManager', "Editing {0}")
5837 .format(fileInfo), 5938 .format(fileInfo),
5838 self.ui) 5939 self.ui)
5839 if dlg.exec_() == QDialog.Accepted: 5940 if dlg.exec_() == QDialog.Accepted:
5840 data = dlg.getData() 5941 data = dlg.getData()
5841 try: 5942 try:
5842 f = open(dictionaryFile, "w", encoding="utf-8") 5943 f = open(dictionaryFile, "w", encoding="utf-8")
6131 if len(self.editors): 6232 if len(self.editors):
6132 if self.autosaveTimer.isActive() and \ 6233 if self.autosaveTimer.isActive() and \
6133 self.autosaveInterval == 0: 6234 self.autosaveInterval == 0:
6134 self.autosaveTimer.stop() 6235 self.autosaveTimer.stop()
6135 elif not self.autosaveTimer.isActive() and \ 6236 elif not self.autosaveTimer.isActive() and \
6136 self.autosaveInterval > 0: 6237 self.autosaveInterval > 0:
6137 self.autosaveTimer.start(self.autosaveInterval * 60000) 6238 self.autosaveTimer.start(self.autosaveInterval * 60000)
6138 6239
6139 self.__enableSpellingActions() 6240 self.__enableSpellingActions()
6140 6241
6141 def __editorSaved(self, fn): 6242 def __editorSaved(self, fn):

eric ide

mercurial