ViewManager/ViewManager.py

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

eric ide

mercurial