ViewManager/ViewManager.py

changeset 3656
441956d8fce5
parent 3591
2f2a4a76dd22
child 3670
f0cb7579c0b4
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 13
14 from PyQt4.QtCore import pyqtSignal, QSignalMapper, QTimer, \ 14 from PyQt5.QtCore import pyqtSignal, QSignalMapper, QTimer, \
15 QFileInfo, QRegExp, QObject, Qt 15 QFileInfo, QRegExp, QObject, Qt, QCoreApplication
16 from PyQt4.QtGui import QColor, QKeySequence, QLineEdit, QToolBar, \ 16 from PyQt5.QtGui import QColor, QKeySequence, QPalette, QPixmap
17 QWidgetAction, QDialog, QApplication, QMenu, QPalette, QComboBox, QPixmap 17 from PyQt5.QtWidgets import QLineEdit, QToolBar, QWidgetAction, QDialog, \
18 from PyQt4.Qsci import QsciScintilla 18 QApplication, QMenu, QComboBox
19 from PyQt5.Qsci import QsciScintilla
19 20
20 from E5Gui.E5Application import e5App 21 from E5Gui.E5Application import e5App
21 from E5Gui import E5FileDialog, E5MessageBox 22 from E5Gui import E5FileDialog, E5MessageBox
22 23
23 from Globals import recentNameFiles, isMacPlatform 24 from Globals import recentNameFiles, isMacPlatform
561 def __initFileActions(self): 562 def __initFileActions(self):
562 """ 563 """
563 Private method defining the user interface actions for file handling. 564 Private method defining the user interface actions for file handling.
564 """ 565 """
565 self.newAct = E5Action( 566 self.newAct = E5Action(
566 QApplication.translate('ViewManager', 'New'), 567 QCoreApplication.translate('ViewManager', 'New'),
567 UI.PixmapCache.getIcon("new.png"), 568 UI.PixmapCache.getIcon("new.png"),
568 QApplication.translate('ViewManager', '&New'), 569 QCoreApplication.translate('ViewManager', '&New'),
569 QKeySequence( 570 QKeySequence(
570 QApplication.translate('ViewManager', "Ctrl+N", "File|New")), 571 QCoreApplication.translate('ViewManager', "Ctrl+N",
572 "File|New")),
571 0, self, 'vm_file_new') 573 0, self, 'vm_file_new')
572 self.newAct.setStatusTip( 574 self.newAct.setStatusTip(
573 QApplication.translate( 575 QCoreApplication.translate(
574 'ViewManager', 'Open an empty editor window')) 576 'ViewManager', 'Open an empty editor window'))
575 self.newAct.setWhatsThis(QApplication.translate( 577 self.newAct.setWhatsThis(QCoreApplication.translate(
576 'ViewManager', 578 'ViewManager',
577 """<b>New</b>""" 579 """<b>New</b>"""
578 """<p>An empty editor window will be created.</p>""" 580 """<p>An empty editor window will be created.</p>"""
579 )) 581 ))
580 self.newAct.triggered.connect(self.newEditor) 582 self.newAct.triggered.connect(self.newEditor)
581 self.fileActions.append(self.newAct) 583 self.fileActions.append(self.newAct)
582 584
583 self.openAct = E5Action( 585 self.openAct = E5Action(
584 QApplication.translate('ViewManager', 'Open'), 586 QCoreApplication.translate('ViewManager', 'Open'),
585 UI.PixmapCache.getIcon("open.png"), 587 UI.PixmapCache.getIcon("open.png"),
586 QApplication.translate('ViewManager', '&Open...'), 588 QCoreApplication.translate('ViewManager', '&Open...'),
587 QKeySequence( 589 QKeySequence(
588 QApplication.translate('ViewManager', "Ctrl+O", "File|Open")), 590 QCoreApplication.translate('ViewManager', "Ctrl+O",
591 "File|Open")),
589 0, self, 'vm_file_open') 592 0, self, 'vm_file_open')
590 self.openAct.setStatusTip(QApplication.translate( 593 self.openAct.setStatusTip(QCoreApplication.translate(
591 'ViewManager', 'Open a file')) 594 'ViewManager', 'Open a file'))
592 self.openAct.setWhatsThis(QApplication.translate( 595 self.openAct.setWhatsThis(QCoreApplication.translate(
593 'ViewManager', 596 'ViewManager',
594 """<b>Open a file</b>""" 597 """<b>Open a file</b>"""
595 """<p>You will be asked for the name of a file to be opened""" 598 """<p>You will be asked for the name of a file to be opened"""
596 """ in an editor window.</p>""" 599 """ in an editor window.</p>"""
597 )) 600 ))
599 self.fileActions.append(self.openAct) 602 self.fileActions.append(self.openAct)
600 603
601 self.closeActGrp = createActionGroup(self) 604 self.closeActGrp = createActionGroup(self)
602 605
603 self.closeAct = E5Action( 606 self.closeAct = E5Action(
604 QApplication.translate('ViewManager', 'Close'), 607 QCoreApplication.translate('ViewManager', 'Close'),
605 UI.PixmapCache.getIcon("close.png"), 608 UI.PixmapCache.getIcon("close.png"),
606 QApplication.translate('ViewManager', '&Close'), 609 QCoreApplication.translate('ViewManager', '&Close'),
607 QKeySequence( 610 QKeySequence(
608 QApplication.translate('ViewManager', "Ctrl+W", "File|Close")), 611 QCoreApplication.translate('ViewManager', "Ctrl+W",
612 "File|Close")),
609 0, self.closeActGrp, 'vm_file_close') 613 0, self.closeActGrp, 'vm_file_close')
610 self.closeAct.setStatusTip( 614 self.closeAct.setStatusTip(
611 QApplication.translate('ViewManager', 'Close the current window')) 615 QCoreApplication.translate('ViewManager',
612 self.closeAct.setWhatsThis(QApplication.translate( 616 'Close the current window'))
617 self.closeAct.setWhatsThis(QCoreApplication.translate(
613 'ViewManager', 618 'ViewManager',
614 """<b>Close Window</b>""" 619 """<b>Close Window</b>"""
615 """<p>Close the current window.</p>""" 620 """<p>Close the current window.</p>"""
616 )) 621 ))
617 self.closeAct.triggered.connect(self.closeCurrentWindow) 622 self.closeAct.triggered.connect(self.closeCurrentWindow)
618 self.fileActions.append(self.closeAct) 623 self.fileActions.append(self.closeAct)
619 624
620 self.closeAllAct = E5Action( 625 self.closeAllAct = E5Action(
621 QApplication.translate('ViewManager', 'Close All'), 626 QCoreApplication.translate('ViewManager', 'Close All'),
622 QApplication.translate('ViewManager', 'Clos&e All'), 627 QCoreApplication.translate('ViewManager', 'Clos&e All'),
623 0, 0, self.closeActGrp, 'vm_file_close_all') 628 0, 0, self.closeActGrp, 'vm_file_close_all')
624 self.closeAllAct.setStatusTip( 629 self.closeAllAct.setStatusTip(
625 QApplication.translate('ViewManager', 'Close all editor windows')) 630 QCoreApplication.translate('ViewManager',
626 self.closeAllAct.setWhatsThis(QApplication.translate( 631 'Close all editor windows'))
632 self.closeAllAct.setWhatsThis(QCoreApplication.translate(
627 'ViewManager', 633 'ViewManager',
628 """<b>Close All Windows</b>""" 634 """<b>Close All Windows</b>"""
629 """<p>Close all editor windows.</p>""" 635 """<p>Close all editor windows.</p>"""
630 )) 636 ))
631 self.closeAllAct.triggered.connect(self.closeAllWindows) 637 self.closeAllAct.triggered.connect(self.closeAllWindows)
634 self.closeActGrp.setEnabled(False) 640 self.closeActGrp.setEnabled(False)
635 641
636 self.saveActGrp = createActionGroup(self) 642 self.saveActGrp = createActionGroup(self)
637 643
638 self.saveAct = E5Action( 644 self.saveAct = E5Action(
639 QApplication.translate('ViewManager', 'Save'), 645 QCoreApplication.translate('ViewManager', 'Save'),
640 UI.PixmapCache.getIcon("fileSave.png"), 646 UI.PixmapCache.getIcon("fileSave.png"),
641 QApplication.translate('ViewManager', '&Save'), 647 QCoreApplication.translate('ViewManager', '&Save'),
642 QKeySequence(QApplication.translate( 648 QKeySequence(QCoreApplication.translate(
643 'ViewManager', "Ctrl+S", "File|Save")), 649 'ViewManager', "Ctrl+S", "File|Save")),
644 0, self.saveActGrp, 'vm_file_save') 650 0, self.saveActGrp, 'vm_file_save')
645 self.saveAct.setStatusTip( 651 self.saveAct.setStatusTip(
646 QApplication.translate('ViewManager', 'Save the current file')) 652 QCoreApplication.translate('ViewManager', 'Save the current file'))
647 self.saveAct.setWhatsThis(QApplication.translate( 653 self.saveAct.setWhatsThis(QCoreApplication.translate(
648 'ViewManager', 654 'ViewManager',
649 """<b>Save File</b>""" 655 """<b>Save File</b>"""
650 """<p>Save the contents of current editor window.</p>""" 656 """<p>Save the contents of current editor window.</p>"""
651 )) 657 ))
652 self.saveAct.triggered.connect(self.saveCurrentEditor) 658 self.saveAct.triggered.connect(self.saveCurrentEditor)
653 self.fileActions.append(self.saveAct) 659 self.fileActions.append(self.saveAct)
654 660
655 self.saveAsAct = E5Action( 661 self.saveAsAct = E5Action(
656 QApplication.translate('ViewManager', 'Save as'), 662 QCoreApplication.translate('ViewManager', 'Save as'),
657 UI.PixmapCache.getIcon("fileSaveAs.png"), 663 UI.PixmapCache.getIcon("fileSaveAs.png"),
658 QApplication.translate('ViewManager', 'Save &as...'), 664 QCoreApplication.translate('ViewManager', 'Save &as...'),
659 QKeySequence(QApplication.translate( 665 QKeySequence(QCoreApplication.translate(
660 'ViewManager', "Shift+Ctrl+S", "File|Save As")), 666 'ViewManager', "Shift+Ctrl+S", "File|Save As")),
661 0, self.saveActGrp, 'vm_file_save_as') 667 0, self.saveActGrp, 'vm_file_save_as')
662 self.saveAsAct.setStatusTip(QApplication.translate( 668 self.saveAsAct.setStatusTip(QCoreApplication.translate(
663 'ViewManager', 'Save the current file to a new one')) 669 'ViewManager', 'Save the current file to a new one'))
664 self.saveAsAct.setWhatsThis(QApplication.translate( 670 self.saveAsAct.setWhatsThis(QCoreApplication.translate(
665 'ViewManager', 671 'ViewManager',
666 """<b>Save File as</b>""" 672 """<b>Save File as</b>"""
667 """<p>Save the contents of current editor window to a new file.""" 673 """<p>Save the contents of current editor window to a new file."""
668 """ The file can be entered in a file selection dialog.</p>""" 674 """ The file can be entered in a file selection dialog.</p>"""
669 )) 675 ))
670 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor) 676 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor)
671 self.fileActions.append(self.saveAsAct) 677 self.fileActions.append(self.saveAsAct)
672 678
673 self.saveAllAct = E5Action( 679 self.saveAllAct = E5Action(
674 QApplication.translate('ViewManager', 'Save all'), 680 QCoreApplication.translate('ViewManager', 'Save all'),
675 UI.PixmapCache.getIcon("fileSaveAll.png"), 681 UI.PixmapCache.getIcon("fileSaveAll.png"),
676 QApplication.translate('ViewManager', 'Save a&ll'), 682 QCoreApplication.translate('ViewManager', 'Save a&ll'),
677 0, 0, self.saveActGrp, 'vm_file_save_all') 683 0, 0, self.saveActGrp, 'vm_file_save_all')
678 self.saveAllAct.setStatusTip(QApplication.translate( 684 self.saveAllAct.setStatusTip(QCoreApplication.translate(
679 'ViewManager', 'Save all files')) 685 'ViewManager', 'Save all files'))
680 self.saveAllAct.setWhatsThis(QApplication.translate( 686 self.saveAllAct.setWhatsThis(QCoreApplication.translate(
681 'ViewManager', 687 'ViewManager',
682 """<b>Save All Files</b>""" 688 """<b>Save All Files</b>"""
683 """<p>Save the contents of all editor windows.</p>""" 689 """<p>Save the contents of all editor windows.</p>"""
684 )) 690 ))
685 self.saveAllAct.triggered.connect(self.saveAllEditors) 691 self.saveAllAct.triggered.connect(self.saveAllEditors)
686 self.fileActions.append(self.saveAllAct) 692 self.fileActions.append(self.saveAllAct)
687 693
688 self.saveActGrp.setEnabled(False) 694 self.saveActGrp.setEnabled(False)
689 695
690 self.printAct = E5Action( 696 self.printAct = E5Action(
691 QApplication.translate('ViewManager', 'Print'), 697 QCoreApplication.translate('ViewManager', 'Print'),
692 UI.PixmapCache.getIcon("print.png"), 698 UI.PixmapCache.getIcon("print.png"),
693 QApplication.translate('ViewManager', '&Print'), 699 QCoreApplication.translate('ViewManager', '&Print'),
694 QKeySequence(QApplication.translate( 700 QKeySequence(QCoreApplication.translate(
695 'ViewManager', "Ctrl+P", "File|Print")), 701 'ViewManager', "Ctrl+P", "File|Print")),
696 0, self, 'vm_file_print') 702 0, self, 'vm_file_print')
697 self.printAct.setStatusTip(QApplication.translate( 703 self.printAct.setStatusTip(QCoreApplication.translate(
698 'ViewManager', 'Print the current file')) 704 'ViewManager', 'Print the current file'))
699 self.printAct.setWhatsThis(QApplication.translate( 705 self.printAct.setWhatsThis(QCoreApplication.translate(
700 'ViewManager', 706 'ViewManager',
701 """<b>Print File</b>""" 707 """<b>Print File</b>"""
702 """<p>Print the contents of current editor window.</p>""" 708 """<p>Print the contents of current editor window.</p>"""
703 )) 709 ))
704 self.printAct.triggered.connect(self.printCurrentEditor) 710 self.printAct.triggered.connect(self.printCurrentEditor)
705 self.printAct.setEnabled(False) 711 self.printAct.setEnabled(False)
706 self.fileActions.append(self.printAct) 712 self.fileActions.append(self.printAct)
707 713
708 self.printPreviewAct = E5Action( 714 self.printPreviewAct = E5Action(
709 QApplication.translate('ViewManager', 'Print Preview'), 715 QCoreApplication.translate('ViewManager', 'Print Preview'),
710 UI.PixmapCache.getIcon("printPreview.png"), 716 UI.PixmapCache.getIcon("printPreview.png"),
711 QApplication.translate('ViewManager', 'Print Preview'), 717 QCoreApplication.translate('ViewManager', 'Print Preview'),
712 0, 0, self, 'vm_file_print_preview') 718 0, 0, self, 'vm_file_print_preview')
713 self.printPreviewAct.setStatusTip(QApplication.translate( 719 self.printPreviewAct.setStatusTip(QCoreApplication.translate(
714 'ViewManager', 'Print preview of the current file')) 720 'ViewManager', 'Print preview of the current file'))
715 self.printPreviewAct.setWhatsThis(QApplication.translate( 721 self.printPreviewAct.setWhatsThis(QCoreApplication.translate(
716 'ViewManager', 722 'ViewManager',
717 """<b>Print Preview</b>""" 723 """<b>Print Preview</b>"""
718 """<p>Print preview of the current editor window.</p>""" 724 """<p>Print preview of the current editor window.</p>"""
719 )) 725 ))
720 self.printPreviewAct.triggered.connect( 726 self.printPreviewAct.triggered.connect(
721 self.printPreviewCurrentEditor) 727 self.printPreviewCurrentEditor)
722 self.printPreviewAct.setEnabled(False) 728 self.printPreviewAct.setEnabled(False)
723 self.fileActions.append(self.printPreviewAct) 729 self.fileActions.append(self.printPreviewAct)
724 730
725 self.findFileNameAct = E5Action( 731 self.findFileNameAct = E5Action(
726 QApplication.translate('ViewManager', 'Search File'), 732 QCoreApplication.translate('ViewManager', 'Search File'),
727 QApplication.translate('ViewManager', 'Search &File...'), 733 QCoreApplication.translate('ViewManager', 'Search &File...'),
728 QKeySequence(QApplication.translate( 734 QKeySequence(QCoreApplication.translate(
729 'ViewManager', "Alt+Ctrl+F", "File|Search File")), 735 'ViewManager', "Alt+Ctrl+F", "File|Search File")),
730 0, self, 'vm_file_search_file') 736 0, self, 'vm_file_search_file')
731 self.findFileNameAct.setStatusTip(QApplication.translate( 737 self.findFileNameAct.setStatusTip(QCoreApplication.translate(
732 'ViewManager', 'Search for a file')) 738 'ViewManager', 'Search for a file'))
733 self.findFileNameAct.setWhatsThis(QApplication.translate( 739 self.findFileNameAct.setWhatsThis(QCoreApplication.translate(
734 'ViewManager', 740 'ViewManager',
735 """<b>Search File</b>""" 741 """<b>Search File</b>"""
736 """<p>Search for a file.</p>""" 742 """<p>Search for a file.</p>"""
737 )) 743 ))
738 self.findFileNameAct.triggered.connect(self.__findFileName) 744 self.findFileNameAct.triggered.connect(self.__findFileName)
742 """ 748 """
743 Public method to create the File menu. 749 Public method to create the File menu.
744 750
745 @return the generated menu 751 @return the generated menu
746 """ 752 """
747 menu = QMenu(QApplication.translate('ViewManager', '&File'), self.ui) 753 menu = QMenu(QCoreApplication.translate('ViewManager', '&File'),
754 self.ui)
748 self.recentMenu = QMenu( 755 self.recentMenu = QMenu(
749 QApplication.translate('ViewManager', 'Open &Recent Files'), 756 QCoreApplication.translate('ViewManager', 'Open &Recent Files'),
750 menu) 757 menu)
751 self.bookmarkedMenu = QMenu( 758 self.bookmarkedMenu = QMenu(
752 QApplication.translate('ViewManager', 'Open &Bookmarked Files'), 759 QCoreApplication.translate('ViewManager',
760 'Open &Bookmarked Files'),
753 menu) 761 menu)
754 self.exportersMenu = self.__initContextMenuExporters() 762 self.exportersMenu = self.__initContextMenuExporters()
755 menu.setTearOffEnabled(True) 763 menu.setTearOffEnabled(True)
756 764
757 menu.addAction(self.newAct) 765 menu.addAction(self.newAct)
788 796
789 @param toolbarManager reference to a toolbar manager object 797 @param toolbarManager reference to a toolbar manager object
790 (E5ToolBarManager) 798 (E5ToolBarManager)
791 @return the generated toolbar 799 @return the generated toolbar
792 """ 800 """
793 tb = QToolBar(QApplication.translate('ViewManager', 'File'), self.ui) 801 tb = QToolBar(QCoreApplication.translate('ViewManager', 'File'),
802 self.ui)
794 tb.setIconSize(UI.Config.ToolBarIconSize) 803 tb.setIconSize(UI.Config.ToolBarIconSize)
795 tb.setObjectName("FileToolbar") 804 tb.setObjectName("FileToolbar")
796 tb.setToolTip(QApplication.translate('ViewManager', 'File')) 805 tb.setToolTip(QCoreApplication.translate('ViewManager', 'File'))
797 806
798 tb.addAction(self.newAct) 807 tb.addAction(self.newAct)
799 tb.addAction(self.openAct) 808 tb.addAction(self.openAct)
800 tb.addAction(self.closeAct) 809 tb.addAction(self.closeAct)
801 tb.addSeparator() 810 tb.addSeparator()
813 """ 822 """
814 Private method used to setup the Exporters sub menu. 823 Private method used to setup the Exporters sub menu.
815 824
816 @return reference to the generated menu (QMenu) 825 @return reference to the generated menu (QMenu)
817 """ 826 """
818 menu = QMenu(QApplication.translate('ViewManager', "Export as")) 827 menu = QMenu(QCoreApplication.translate('ViewManager', "Export as"))
819 828
820 import QScintilla.Exporters 829 import QScintilla.Exporters
821 supportedExporters = QScintilla.Exporters.getSupportedFormats() 830 supportedExporters = QScintilla.Exporters.getSupportedFormats()
822 exporters = sorted(list(supportedExporters.keys())) 831 exporters = sorted(list(supportedExporters.keys()))
823 for exporter in exporters: 832 for exporter in exporters:
838 commands. 847 commands.
839 """ 848 """
840 self.editActGrp = createActionGroup(self) 849 self.editActGrp = createActionGroup(self)
841 850
842 self.undoAct = E5Action( 851 self.undoAct = E5Action(
843 QApplication.translate('ViewManager', 'Undo'), 852 QCoreApplication.translate('ViewManager', 'Undo'),
844 UI.PixmapCache.getIcon("editUndo.png"), 853 UI.PixmapCache.getIcon("editUndo.png"),
845 QApplication.translate('ViewManager', '&Undo'), 854 QCoreApplication.translate('ViewManager', '&Undo'),
846 QKeySequence(QApplication.translate( 855 QKeySequence(QCoreApplication.translate(
847 'ViewManager', "Ctrl+Z", "Edit|Undo")), 856 'ViewManager', "Ctrl+Z", "Edit|Undo")),
848 QKeySequence(QApplication.translate( 857 QKeySequence(QCoreApplication.translate(
849 'ViewManager', "Alt+Backspace", "Edit|Undo")), 858 'ViewManager', "Alt+Backspace", "Edit|Undo")),
850 self.editActGrp, 'vm_edit_undo') 859 self.editActGrp, 'vm_edit_undo')
851 self.undoAct.setStatusTip(QApplication.translate( 860 self.undoAct.setStatusTip(QCoreApplication.translate(
852 'ViewManager', 'Undo the last change')) 861 'ViewManager', 'Undo the last change'))
853 self.undoAct.setWhatsThis(QApplication.translate( 862 self.undoAct.setWhatsThis(QCoreApplication.translate(
854 'ViewManager', 863 'ViewManager',
855 """<b>Undo</b>""" 864 """<b>Undo</b>"""
856 """<p>Undo the last change done in the current editor.</p>""" 865 """<p>Undo the last change done in the current editor.</p>"""
857 )) 866 ))
858 self.undoAct.triggered.connect(self.__editUndo) 867 self.undoAct.triggered.connect(self.__editUndo)
859 self.editActions.append(self.undoAct) 868 self.editActions.append(self.undoAct)
860 869
861 self.redoAct = E5Action( 870 self.redoAct = E5Action(
862 QApplication.translate('ViewManager', 'Redo'), 871 QCoreApplication.translate('ViewManager', 'Redo'),
863 UI.PixmapCache.getIcon("editRedo.png"), 872 UI.PixmapCache.getIcon("editRedo.png"),
864 QApplication.translate('ViewManager', '&Redo'), 873 QCoreApplication.translate('ViewManager', '&Redo'),
865 QKeySequence(QApplication.translate( 874 QKeySequence(QCoreApplication.translate(
866 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")), 875 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")),
867 0, 876 0,
868 self.editActGrp, 'vm_edit_redo') 877 self.editActGrp, 'vm_edit_redo')
869 self.redoAct.setStatusTip(QApplication.translate( 878 self.redoAct.setStatusTip(QCoreApplication.translate(
870 'ViewManager', 'Redo the last change')) 879 'ViewManager', 'Redo the last change'))
871 self.redoAct.setWhatsThis(QApplication.translate( 880 self.redoAct.setWhatsThis(QCoreApplication.translate(
872 'ViewManager', 881 'ViewManager',
873 """<b>Redo</b>""" 882 """<b>Redo</b>"""
874 """<p>Redo the last change done in the current editor.</p>""" 883 """<p>Redo the last change done in the current editor.</p>"""
875 )) 884 ))
876 self.redoAct.triggered.connect(self.__editRedo) 885 self.redoAct.triggered.connect(self.__editRedo)
877 self.editActions.append(self.redoAct) 886 self.editActions.append(self.redoAct)
878 887
879 self.revertAct = E5Action( 888 self.revertAct = E5Action(
880 QApplication.translate( 889 QCoreApplication.translate(
881 'ViewManager', 'Revert to last saved state'), 890 'ViewManager', 'Revert to last saved state'),
882 QApplication.translate( 891 QCoreApplication.translate(
883 'ViewManager', 'Re&vert to last saved state'), 892 'ViewManager', 'Re&vert to last saved state'),
884 QKeySequence(QApplication.translate( 893 QKeySequence(QCoreApplication.translate(
885 'ViewManager', "Ctrl+Y", "Edit|Revert")), 894 'ViewManager', "Ctrl+Y", "Edit|Revert")),
886 0, 895 0,
887 self.editActGrp, 'vm_edit_revert') 896 self.editActGrp, 'vm_edit_revert')
888 self.revertAct.setStatusTip(QApplication.translate( 897 self.revertAct.setStatusTip(QCoreApplication.translate(
889 'ViewManager', 'Revert to last saved state')) 898 'ViewManager', 'Revert to last saved state'))
890 self.revertAct.setWhatsThis(QApplication.translate( 899 self.revertAct.setWhatsThis(QCoreApplication.translate(
891 'ViewManager', 900 'ViewManager',
892 """<b>Revert to last saved state</b>""" 901 """<b>Revert to last saved state</b>"""
893 """<p>Undo all changes up to the last saved state""" 902 """<p>Undo all changes up to the last saved state"""
894 """ of the current editor.</p>""" 903 """ of the current editor.</p>"""
895 )) 904 ))
897 self.editActions.append(self.revertAct) 906 self.editActions.append(self.revertAct)
898 907
899 self.copyActGrp = createActionGroup(self.editActGrp) 908 self.copyActGrp = createActionGroup(self.editActGrp)
900 909
901 self.cutAct = E5Action( 910 self.cutAct = E5Action(
902 QApplication.translate('ViewManager', 'Cut'), 911 QCoreApplication.translate('ViewManager', 'Cut'),
903 UI.PixmapCache.getIcon("editCut.png"), 912 UI.PixmapCache.getIcon("editCut.png"),
904 QApplication.translate('ViewManager', 'Cu&t'), 913 QCoreApplication.translate('ViewManager', 'Cu&t'),
905 QKeySequence(QApplication.translate( 914 QKeySequence(QCoreApplication.translate(
906 'ViewManager', "Ctrl+X", "Edit|Cut")), 915 'ViewManager', "Ctrl+X", "Edit|Cut")),
907 QKeySequence(QApplication.translate( 916 QKeySequence(QCoreApplication.translate(
908 'ViewManager', "Shift+Del", "Edit|Cut")), 917 'ViewManager', "Shift+Del", "Edit|Cut")),
909 self.copyActGrp, 'vm_edit_cut') 918 self.copyActGrp, 'vm_edit_cut')
910 self.cutAct.setStatusTip(QApplication.translate( 919 self.cutAct.setStatusTip(QCoreApplication.translate(
911 'ViewManager', 'Cut the selection')) 920 'ViewManager', 'Cut the selection'))
912 self.cutAct.setWhatsThis(QApplication.translate( 921 self.cutAct.setWhatsThis(QCoreApplication.translate(
913 'ViewManager', 922 'ViewManager',
914 """<b>Cut</b>""" 923 """<b>Cut</b>"""
915 """<p>Cut the selected text of the current editor to the""" 924 """<p>Cut the selected text of the current editor to the"""
916 """ clipboard.</p>""" 925 """ clipboard.</p>"""
917 )) 926 ))
918 self.cutAct.triggered.connect(self.__editCut) 927 self.cutAct.triggered.connect(self.__editCut)
919 self.editActions.append(self.cutAct) 928 self.editActions.append(self.cutAct)
920 929
921 self.copyAct = E5Action( 930 self.copyAct = E5Action(
922 QApplication.translate('ViewManager', 'Copy'), 931 QCoreApplication.translate('ViewManager', 'Copy'),
923 UI.PixmapCache.getIcon("editCopy.png"), 932 UI.PixmapCache.getIcon("editCopy.png"),
924 QApplication.translate('ViewManager', '&Copy'), 933 QCoreApplication.translate('ViewManager', '&Copy'),
925 QKeySequence(QApplication.translate( 934 QKeySequence(QCoreApplication.translate(
926 'ViewManager', "Ctrl+C", "Edit|Copy")), 935 'ViewManager', "Ctrl+C", "Edit|Copy")),
927 QKeySequence(QApplication.translate( 936 QKeySequence(QCoreApplication.translate(
928 'ViewManager', "Ctrl+Ins", "Edit|Copy")), 937 'ViewManager', "Ctrl+Ins", "Edit|Copy")),
929 self.copyActGrp, 'vm_edit_copy') 938 self.copyActGrp, 'vm_edit_copy')
930 self.copyAct.setStatusTip(QApplication.translate( 939 self.copyAct.setStatusTip(QCoreApplication.translate(
931 'ViewManager', 'Copy the selection')) 940 'ViewManager', 'Copy the selection'))
932 self.copyAct.setWhatsThis(QApplication.translate( 941 self.copyAct.setWhatsThis(QCoreApplication.translate(
933 'ViewManager', 942 'ViewManager',
934 """<b>Copy</b>""" 943 """<b>Copy</b>"""
935 """<p>Copy the selected text of the current editor to the""" 944 """<p>Copy the selected text of the current editor to the"""
936 """ clipboard.</p>""" 945 """ clipboard.</p>"""
937 )) 946 ))
938 self.copyAct.triggered.connect(self.__editCopy) 947 self.copyAct.triggered.connect(self.__editCopy)
939 self.editActions.append(self.copyAct) 948 self.editActions.append(self.copyAct)
940 949
941 self.pasteAct = E5Action( 950 self.pasteAct = E5Action(
942 QApplication.translate('ViewManager', 'Paste'), 951 QCoreApplication.translate('ViewManager', 'Paste'),
943 UI.PixmapCache.getIcon("editPaste.png"), 952 UI.PixmapCache.getIcon("editPaste.png"),
944 QApplication.translate('ViewManager', '&Paste'), 953 QCoreApplication.translate('ViewManager', '&Paste'),
945 QKeySequence(QApplication.translate( 954 QKeySequence(QCoreApplication.translate(
946 'ViewManager', "Ctrl+V", "Edit|Paste")), 955 'ViewManager', "Ctrl+V", "Edit|Paste")),
947 QKeySequence(QApplication.translate( 956 QKeySequence(QCoreApplication.translate(
948 'ViewManager', "Shift+Ins", "Edit|Paste")), 957 'ViewManager', "Shift+Ins", "Edit|Paste")),
949 self.copyActGrp, 'vm_edit_paste') 958 self.copyActGrp, 'vm_edit_paste')
950 self.pasteAct.setStatusTip(QApplication.translate( 959 self.pasteAct.setStatusTip(QCoreApplication.translate(
951 'ViewManager', 'Paste the last cut/copied text')) 960 'ViewManager', 'Paste the last cut/copied text'))
952 self.pasteAct.setWhatsThis(QApplication.translate( 961 self.pasteAct.setWhatsThis(QCoreApplication.translate(
953 'ViewManager', 962 'ViewManager',
954 """<b>Paste</b>""" 963 """<b>Paste</b>"""
955 """<p>Paste the last cut/copied text from the clipboard to""" 964 """<p>Paste the last cut/copied text from the clipboard to"""
956 """ the current editor.</p>""" 965 """ the current editor.</p>"""
957 )) 966 ))
958 self.pasteAct.triggered.connect(self.__editPaste) 967 self.pasteAct.triggered.connect(self.__editPaste)
959 self.editActions.append(self.pasteAct) 968 self.editActions.append(self.pasteAct)
960 969
961 self.deleteAct = E5Action( 970 self.deleteAct = E5Action(
962 QApplication.translate('ViewManager', 'Clear'), 971 QCoreApplication.translate('ViewManager', 'Clear'),
963 UI.PixmapCache.getIcon("editDelete.png"), 972 UI.PixmapCache.getIcon("editDelete.png"),
964 QApplication.translate('ViewManager', 'Clear'), 973 QCoreApplication.translate('ViewManager', 'Clear'),
965 QKeySequence(QApplication.translate( 974 QKeySequence(QCoreApplication.translate(
966 'ViewManager', "Alt+Shift+C", "Edit|Clear")), 975 'ViewManager', "Alt+Shift+C", "Edit|Clear")),
967 0, 976 0,
968 self.copyActGrp, 'vm_edit_clear') 977 self.copyActGrp, 'vm_edit_clear')
969 self.deleteAct.setStatusTip(QApplication.translate( 978 self.deleteAct.setStatusTip(QCoreApplication.translate(
970 'ViewManager', 'Clear all text')) 979 'ViewManager', 'Clear all text'))
971 self.deleteAct.setWhatsThis(QApplication.translate( 980 self.deleteAct.setWhatsThis(QCoreApplication.translate(
972 'ViewManager', 981 'ViewManager',
973 """<b>Clear</b>""" 982 """<b>Clear</b>"""
974 """<p>Delete all text of the current editor.</p>""" 983 """<p>Delete all text of the current editor.</p>"""
975 )) 984 ))
976 self.deleteAct.triggered.connect(self.__editDelete) 985 self.deleteAct.triggered.connect(self.__editDelete)
977 self.editActions.append(self.deleteAct) 986 self.editActions.append(self.deleteAct)
978 987
979 self.joinAct = E5Action( 988 self.joinAct = E5Action(
980 QApplication.translate('ViewManager', 'Join Lines'), 989 QCoreApplication.translate('ViewManager', 'Join Lines'),
981 QApplication.translate('ViewManager', 'Join Lines'), 990 QCoreApplication.translate('ViewManager', 'Join Lines'),
982 QKeySequence(QApplication.translate( 991 QKeySequence(QCoreApplication.translate(
983 'ViewManager', "Ctrl+J", "Edit|Join Lines")), 992 'ViewManager', "Ctrl+J", "Edit|Join Lines")),
984 0, 993 0,
985 self.copyActGrp, 'vm_edit_join_lines') 994 self.copyActGrp, 'vm_edit_join_lines')
986 self.joinAct.setStatusTip(QApplication.translate( 995 self.joinAct.setStatusTip(QCoreApplication.translate(
987 'ViewManager', 'Join Lines')) 996 'ViewManager', 'Join Lines'))
988 self.joinAct.setWhatsThis(QApplication.translate( 997 self.joinAct.setWhatsThis(QCoreApplication.translate(
989 'ViewManager', 998 'ViewManager',
990 """<b>Join Lines</b>""" 999 """<b>Join Lines</b>"""
991 """<p>Join the current and the next lines.</p>""" 1000 """<p>Join the current and the next lines.</p>"""
992 )) 1001 ))
993 self.joinAct.triggered.connect(self.__editJoin) 1002 self.joinAct.triggered.connect(self.__editJoin)
994 self.editActions.append(self.joinAct) 1003 self.editActions.append(self.joinAct)
995 1004
996 self.indentAct = E5Action( 1005 self.indentAct = E5Action(
997 QApplication.translate('ViewManager', 'Indent'), 1006 QCoreApplication.translate('ViewManager', 'Indent'),
998 UI.PixmapCache.getIcon("editIndent.png"), 1007 UI.PixmapCache.getIcon("editIndent.png"),
999 QApplication.translate('ViewManager', '&Indent'), 1008 QCoreApplication.translate('ViewManager', '&Indent'),
1000 QKeySequence(QApplication.translate( 1009 QKeySequence(QCoreApplication.translate(
1001 'ViewManager', "Ctrl+I", "Edit|Indent")), 1010 'ViewManager', "Ctrl+I", "Edit|Indent")),
1002 0, 1011 0,
1003 self.editActGrp, 'vm_edit_indent') 1012 self.editActGrp, 'vm_edit_indent')
1004 self.indentAct.setStatusTip(QApplication.translate( 1013 self.indentAct.setStatusTip(QCoreApplication.translate(
1005 'ViewManager', 'Indent line')) 1014 'ViewManager', 'Indent line'))
1006 self.indentAct.setWhatsThis(QApplication.translate( 1015 self.indentAct.setWhatsThis(QCoreApplication.translate(
1007 'ViewManager', 1016 'ViewManager',
1008 """<b>Indent</b>""" 1017 """<b>Indent</b>"""
1009 """<p>Indents the current line or the lines of the""" 1018 """<p>Indents the current line or the lines of the"""
1010 """ selection by one level.</p>""" 1019 """ selection by one level.</p>"""
1011 )) 1020 ))
1012 self.indentAct.triggered.connect(self.__editIndent) 1021 self.indentAct.triggered.connect(self.__editIndent)
1013 self.editActions.append(self.indentAct) 1022 self.editActions.append(self.indentAct)
1014 1023
1015 self.unindentAct = E5Action( 1024 self.unindentAct = E5Action(
1016 QApplication.translate('ViewManager', 'Unindent'), 1025 QCoreApplication.translate('ViewManager', 'Unindent'),
1017 UI.PixmapCache.getIcon("editUnindent.png"), 1026 UI.PixmapCache.getIcon("editUnindent.png"),
1018 QApplication.translate('ViewManager', 'U&nindent'), 1027 QCoreApplication.translate('ViewManager', 'U&nindent'),
1019 QKeySequence(QApplication.translate( 1028 QKeySequence(QCoreApplication.translate(
1020 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")), 1029 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")),
1021 0, 1030 0,
1022 self.editActGrp, 'vm_edit_unindent') 1031 self.editActGrp, 'vm_edit_unindent')
1023 self.unindentAct.setStatusTip(QApplication.translate( 1032 self.unindentAct.setStatusTip(QCoreApplication.translate(
1024 'ViewManager', 'Unindent line')) 1033 'ViewManager', 'Unindent line'))
1025 self.unindentAct.setWhatsThis(QApplication.translate( 1034 self.unindentAct.setWhatsThis(QCoreApplication.translate(
1026 'ViewManager', 1035 'ViewManager',
1027 """<b>Unindent</b>""" 1036 """<b>Unindent</b>"""
1028 """<p>Unindents the current line or the lines of the""" 1037 """<p>Unindents the current line or the lines of the"""
1029 """ selection by one level.</p>""" 1038 """ selection by one level.</p>"""
1030 )) 1039 ))
1031 self.unindentAct.triggered.connect(self.__editUnindent) 1040 self.unindentAct.triggered.connect(self.__editUnindent)
1032 self.editActions.append(self.unindentAct) 1041 self.editActions.append(self.unindentAct)
1033 1042
1034 self.smartIndentAct = E5Action( 1043 self.smartIndentAct = E5Action(
1035 QApplication.translate('ViewManager', 'Smart indent'), 1044 QCoreApplication.translate('ViewManager', 'Smart indent'),
1036 UI.PixmapCache.getIcon("editSmartIndent.png"), 1045 UI.PixmapCache.getIcon("editSmartIndent.png"),
1037 QApplication.translate('ViewManager', 'Smart indent'), 1046 QCoreApplication.translate('ViewManager', 'Smart indent'),
1038 QKeySequence(QApplication.translate( 1047 QKeySequence(QCoreApplication.translate(
1039 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")), 1048 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")),
1040 0, 1049 0,
1041 self.editActGrp, 'vm_edit_smart_indent') 1050 self.editActGrp, 'vm_edit_smart_indent')
1042 self.smartIndentAct.setStatusTip(QApplication.translate( 1051 self.smartIndentAct.setStatusTip(QCoreApplication.translate(
1043 'ViewManager', 'Smart indent Line or Selection')) 1052 'ViewManager', 'Smart indent Line or Selection'))
1044 self.smartIndentAct.setWhatsThis(QApplication.translate( 1053 self.smartIndentAct.setWhatsThis(QCoreApplication.translate(
1045 'ViewManager', 1054 'ViewManager',
1046 """<b>Smart indent</b>""" 1055 """<b>Smart indent</b>"""
1047 """<p>Indents the current line or the lines of the""" 1056 """<p>Indents the current line or the lines of the"""
1048 """ current selection smartly.</p>""" 1057 """ current selection smartly.</p>"""
1049 )) 1058 ))
1050 self.smartIndentAct.triggered.connect(self.__editSmartIndent) 1059 self.smartIndentAct.triggered.connect(self.__editSmartIndent)
1051 self.editActions.append(self.smartIndentAct) 1060 self.editActions.append(self.smartIndentAct)
1052 1061
1053 self.commentAct = E5Action( 1062 self.commentAct = E5Action(
1054 QApplication.translate('ViewManager', 'Comment'), 1063 QCoreApplication.translate('ViewManager', 'Comment'),
1055 UI.PixmapCache.getIcon("editComment.png"), 1064 UI.PixmapCache.getIcon("editComment.png"),
1056 QApplication.translate('ViewManager', 'C&omment'), 1065 QCoreApplication.translate('ViewManager', 'C&omment'),
1057 QKeySequence(QApplication.translate( 1066 QKeySequence(QCoreApplication.translate(
1058 'ViewManager', "Ctrl+M", "Edit|Comment")), 1067 'ViewManager', "Ctrl+M", "Edit|Comment")),
1059 0, 1068 0,
1060 self.editActGrp, 'vm_edit_comment') 1069 self.editActGrp, 'vm_edit_comment')
1061 self.commentAct.setStatusTip(QApplication.translate( 1070 self.commentAct.setStatusTip(QCoreApplication.translate(
1062 'ViewManager', 'Comment Line or Selection')) 1071 'ViewManager', 'Comment Line or Selection'))
1063 self.commentAct.setWhatsThis(QApplication.translate( 1072 self.commentAct.setWhatsThis(QCoreApplication.translate(
1064 'ViewManager', 1073 'ViewManager',
1065 """<b>Comment</b>""" 1074 """<b>Comment</b>"""
1066 """<p>Comments the current line or the lines of the""" 1075 """<p>Comments the current line or the lines of the"""
1067 """ current selection.</p>""" 1076 """ current selection.</p>"""
1068 )) 1077 ))
1069 self.commentAct.triggered.connect(self.__editComment) 1078 self.commentAct.triggered.connect(self.__editComment)
1070 self.editActions.append(self.commentAct) 1079 self.editActions.append(self.commentAct)
1071 1080
1072 self.uncommentAct = E5Action( 1081 self.uncommentAct = E5Action(
1073 QApplication.translate('ViewManager', 'Uncomment'), 1082 QCoreApplication.translate('ViewManager', 'Uncomment'),
1074 UI.PixmapCache.getIcon("editUncomment.png"), 1083 UI.PixmapCache.getIcon("editUncomment.png"),
1075 QApplication.translate('ViewManager', 'Unco&mment'), 1084 QCoreApplication.translate('ViewManager', 'Unco&mment'),
1076 QKeySequence(QApplication.translate( 1085 QKeySequence(QCoreApplication.translate(
1077 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")), 1086 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")),
1078 0, 1087 0,
1079 self.editActGrp, 'vm_edit_uncomment') 1088 self.editActGrp, 'vm_edit_uncomment')
1080 self.uncommentAct.setStatusTip(QApplication.translate( 1089 self.uncommentAct.setStatusTip(QCoreApplication.translate(
1081 'ViewManager', 'Uncomment Line or Selection')) 1090 'ViewManager', 'Uncomment Line or Selection'))
1082 self.uncommentAct.setWhatsThis(QApplication.translate( 1091 self.uncommentAct.setWhatsThis(QCoreApplication.translate(
1083 'ViewManager', 1092 'ViewManager',
1084 """<b>Uncomment</b>""" 1093 """<b>Uncomment</b>"""
1085 """<p>Uncomments the current line or the lines of the""" 1094 """<p>Uncomments the current line or the lines of the"""
1086 """ current selection.</p>""" 1095 """ current selection.</p>"""
1087 )) 1096 ))
1088 self.uncommentAct.triggered.connect(self.__editUncomment) 1097 self.uncommentAct.triggered.connect(self.__editUncomment)
1089 self.editActions.append(self.uncommentAct) 1098 self.editActions.append(self.uncommentAct)
1090 1099
1091 self.toggleCommentAct = E5Action( 1100 self.toggleCommentAct = E5Action(
1092 QApplication.translate('ViewManager', 'Toggle Comment'), 1101 QCoreApplication.translate('ViewManager', 'Toggle Comment'),
1093 UI.PixmapCache.getIcon("editToggleComment.png"), 1102 UI.PixmapCache.getIcon("editToggleComment.png"),
1094 QApplication.translate('ViewManager', 'Toggle Comment'), 1103 QCoreApplication.translate('ViewManager', 'Toggle Comment'),
1095 QKeySequence(QApplication.translate( 1104 QKeySequence(QCoreApplication.translate(
1096 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")), 1105 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")),
1097 0, 1106 0,
1098 self.editActGrp, 'vm_edit_toggle_comment') 1107 self.editActGrp, 'vm_edit_toggle_comment')
1099 self.toggleCommentAct.setStatusTip(QApplication.translate( 1108 self.toggleCommentAct.setStatusTip(QCoreApplication.translate(
1100 'ViewManager', 1109 'ViewManager',
1101 'Toggle the comment of the current line, selection or' 1110 'Toggle the comment of the current line, selection or'
1102 ' comment block')) 1111 ' comment block'))
1103 self.toggleCommentAct.setWhatsThis(QApplication.translate( 1112 self.toggleCommentAct.setWhatsThis(QCoreApplication.translate(
1104 'ViewManager', 1113 'ViewManager',
1105 """<b>Toggle Comment</b>""" 1114 """<b>Toggle Comment</b>"""
1106 """<p>If the current line does not start with a block comment,""" 1115 """<p>If the current line does not start with a block comment,"""
1107 """ the current line or selection is commented. If it is already""" 1116 """ the current line or selection is commented. If it is already"""
1108 """ commented, this comment block is uncommented. </p>""" 1117 """ commented, this comment block is uncommented. </p>"""
1109 )) 1118 ))
1110 self.toggleCommentAct.triggered.connect(self.__editToggleComment) 1119 self.toggleCommentAct.triggered.connect(self.__editToggleComment)
1111 self.editActions.append(self.toggleCommentAct) 1120 self.editActions.append(self.toggleCommentAct)
1112 1121
1113 self.streamCommentAct = E5Action( 1122 self.streamCommentAct = E5Action(
1114 QApplication.translate('ViewManager', 'Stream Comment'), 1123 QCoreApplication.translate('ViewManager', 'Stream Comment'),
1115 QApplication.translate('ViewManager', 'Stream Comment'), 1124 QCoreApplication.translate('ViewManager', 'Stream Comment'),
1116 0, 0, 1125 0, 0,
1117 self.editActGrp, 'vm_edit_stream_comment') 1126 self.editActGrp, 'vm_edit_stream_comment')
1118 self.streamCommentAct.setStatusTip(QApplication.translate( 1127 self.streamCommentAct.setStatusTip(QCoreApplication.translate(
1119 'ViewManager', 1128 'ViewManager',
1120 'Stream Comment Line or Selection')) 1129 'Stream Comment Line or Selection'))
1121 self.streamCommentAct.setWhatsThis(QApplication.translate( 1130 self.streamCommentAct.setWhatsThis(QCoreApplication.translate(
1122 'ViewManager', 1131 'ViewManager',
1123 """<b>Stream Comment</b>""" 1132 """<b>Stream Comment</b>"""
1124 """<p>Stream comments the current line or the current""" 1133 """<p>Stream comments the current line or the current"""
1125 """ selection.</p>""" 1134 """ selection.</p>"""
1126 )) 1135 ))
1127 self.streamCommentAct.triggered.connect(self.__editStreamComment) 1136 self.streamCommentAct.triggered.connect(self.__editStreamComment)
1128 self.editActions.append(self.streamCommentAct) 1137 self.editActions.append(self.streamCommentAct)
1129 1138
1130 self.boxCommentAct = E5Action( 1139 self.boxCommentAct = E5Action(
1131 QApplication.translate('ViewManager', 'Box Comment'), 1140 QCoreApplication.translate('ViewManager', 'Box Comment'),
1132 QApplication.translate('ViewManager', 'Box Comment'), 1141 QCoreApplication.translate('ViewManager', 'Box Comment'),
1133 0, 0, 1142 0, 0,
1134 self.editActGrp, 'vm_edit_box_comment') 1143 self.editActGrp, 'vm_edit_box_comment')
1135 self.boxCommentAct.setStatusTip(QApplication.translate( 1144 self.boxCommentAct.setStatusTip(QCoreApplication.translate(
1136 'ViewManager', 'Box Comment Line or Selection')) 1145 'ViewManager', 'Box Comment Line or Selection'))
1137 self.boxCommentAct.setWhatsThis(QApplication.translate( 1146 self.boxCommentAct.setWhatsThis(QCoreApplication.translate(
1138 'ViewManager', 1147 'ViewManager',
1139 """<b>Box Comment</b>""" 1148 """<b>Box Comment</b>"""
1140 """<p>Box comments the current line or the lines of the""" 1149 """<p>Box comments the current line or the lines of the"""
1141 """ current selection.</p>""" 1150 """ current selection.</p>"""
1142 )) 1151 ))
1143 self.boxCommentAct.triggered.connect(self.__editBoxComment) 1152 self.boxCommentAct.triggered.connect(self.__editBoxComment)
1144 self.editActions.append(self.boxCommentAct) 1153 self.editActions.append(self.boxCommentAct)
1145 1154
1146 self.selectBraceAct = E5Action( 1155 self.selectBraceAct = E5Action(
1147 QApplication.translate('ViewManager', 'Select to brace'), 1156 QCoreApplication.translate('ViewManager', 'Select to brace'),
1148 QApplication.translate('ViewManager', 'Select to &brace'), 1157 QCoreApplication.translate('ViewManager', 'Select to &brace'),
1149 QKeySequence(QApplication.translate( 1158 QKeySequence(QCoreApplication.translate(
1150 'ViewManager', "Ctrl+E", "Edit|Select to brace")), 1159 'ViewManager', "Ctrl+E", "Edit|Select to brace")),
1151 0, 1160 0,
1152 self.editActGrp, 'vm_edit_select_to_brace') 1161 self.editActGrp, 'vm_edit_select_to_brace')
1153 self.selectBraceAct.setStatusTip(QApplication.translate( 1162 self.selectBraceAct.setStatusTip(QCoreApplication.translate(
1154 'ViewManager', 'Select text to the matching brace')) 1163 'ViewManager', 'Select text to the matching brace'))
1155 self.selectBraceAct.setWhatsThis(QApplication.translate( 1164 self.selectBraceAct.setWhatsThis(QCoreApplication.translate(
1156 'ViewManager', 1165 'ViewManager',
1157 """<b>Select to brace</b>""" 1166 """<b>Select to brace</b>"""
1158 """<p>Select text of the current editor to the matching""" 1167 """<p>Select text of the current editor to the matching"""
1159 """ brace.</p>""" 1168 """ brace.</p>"""
1160 )) 1169 ))
1161 self.selectBraceAct.triggered.connect(self.__editSelectBrace) 1170 self.selectBraceAct.triggered.connect(self.__editSelectBrace)
1162 self.editActions.append(self.selectBraceAct) 1171 self.editActions.append(self.selectBraceAct)
1163 1172
1164 self.selectAllAct = E5Action( 1173 self.selectAllAct = E5Action(
1165 QApplication.translate('ViewManager', 'Select all'), 1174 QCoreApplication.translate('ViewManager', 'Select all'),
1166 QApplication.translate('ViewManager', '&Select all'), 1175 QCoreApplication.translate('ViewManager', '&Select all'),
1167 QKeySequence(QApplication.translate( 1176 QKeySequence(QCoreApplication.translate(
1168 'ViewManager', "Ctrl+A", "Edit|Select all")), 1177 'ViewManager', "Ctrl+A", "Edit|Select all")),
1169 0, 1178 0,
1170 self.editActGrp, 'vm_edit_select_all') 1179 self.editActGrp, 'vm_edit_select_all')
1171 self.selectAllAct.setStatusTip(QApplication.translate( 1180 self.selectAllAct.setStatusTip(QCoreApplication.translate(
1172 'ViewManager', 'Select all text')) 1181 'ViewManager', 'Select all text'))
1173 self.selectAllAct.setWhatsThis(QApplication.translate( 1182 self.selectAllAct.setWhatsThis(QCoreApplication.translate(
1174 'ViewManager', 1183 'ViewManager',
1175 """<b>Select All</b>""" 1184 """<b>Select All</b>"""
1176 """<p>Select all text of the current editor.</p>""" 1185 """<p>Select all text of the current editor.</p>"""
1177 )) 1186 ))
1178 self.selectAllAct.triggered.connect(self.__editSelectAll) 1187 self.selectAllAct.triggered.connect(self.__editSelectAll)
1179 self.editActions.append(self.selectAllAct) 1188 self.editActions.append(self.selectAllAct)
1180 1189
1181 self.deselectAllAct = E5Action( 1190 self.deselectAllAct = E5Action(
1182 QApplication.translate('ViewManager', 'Deselect all'), 1191 QCoreApplication.translate('ViewManager', 'Deselect all'),
1183 QApplication.translate('ViewManager', '&Deselect all'), 1192 QCoreApplication.translate('ViewManager', '&Deselect all'),
1184 QKeySequence(QApplication.translate( 1193 QKeySequence(QCoreApplication.translate(
1185 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")), 1194 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")),
1186 0, 1195 0,
1187 self.editActGrp, 'vm_edit_deselect_all') 1196 self.editActGrp, 'vm_edit_deselect_all')
1188 self.deselectAllAct.setStatusTip(QApplication.translate( 1197 self.deselectAllAct.setStatusTip(QCoreApplication.translate(
1189 'ViewManager', 'Deselect all text')) 1198 'ViewManager', 'Deselect all text'))
1190 self.deselectAllAct.setWhatsThis(QApplication.translate( 1199 self.deselectAllAct.setWhatsThis(QCoreApplication.translate(
1191 'ViewManager', 1200 'ViewManager',
1192 """<b>Deselect All</b>""" 1201 """<b>Deselect All</b>"""
1193 """<p>Deselect all text of the current editor.</p>""" 1202 """<p>Deselect all text of the current editor.</p>"""
1194 )) 1203 ))
1195 self.deselectAllAct.triggered.connect(self.__editDeselectAll) 1204 self.deselectAllAct.triggered.connect(self.__editDeselectAll)
1196 self.editActions.append(self.deselectAllAct) 1205 self.editActions.append(self.deselectAllAct)
1197 1206
1198 self.convertEOLAct = E5Action( 1207 self.convertEOLAct = E5Action(
1199 QApplication.translate( 1208 QCoreApplication.translate(
1200 'ViewManager', 'Convert Line End Characters'), 1209 'ViewManager', 'Convert Line End Characters'),
1201 QApplication.translate( 1210 QCoreApplication.translate(
1202 'ViewManager', 'Convert &Line End Characters'), 1211 'ViewManager', 'Convert &Line End Characters'),
1203 0, 0, 1212 0, 0,
1204 self.editActGrp, 'vm_edit_convert_eol') 1213 self.editActGrp, 'vm_edit_convert_eol')
1205 self.convertEOLAct.setStatusTip(QApplication.translate( 1214 self.convertEOLAct.setStatusTip(QCoreApplication.translate(
1206 'ViewManager', 'Convert Line End Characters')) 1215 'ViewManager', 'Convert Line End Characters'))
1207 self.convertEOLAct.setWhatsThis(QApplication.translate( 1216 self.convertEOLAct.setWhatsThis(QCoreApplication.translate(
1208 'ViewManager', 1217 'ViewManager',
1209 """<b>Convert Line End Characters</b>""" 1218 """<b>Convert Line End Characters</b>"""
1210 """<p>Convert the line end characters to the currently set""" 1219 """<p>Convert the line end characters to the currently set"""
1211 """ type.</p>""" 1220 """ type.</p>"""
1212 )) 1221 ))
1213 self.convertEOLAct.triggered.connect(self.__convertEOL) 1222 self.convertEOLAct.triggered.connect(self.__convertEOL)
1214 self.editActions.append(self.convertEOLAct) 1223 self.editActions.append(self.convertEOLAct)
1215 1224
1216 self.shortenEmptyAct = E5Action( 1225 self.shortenEmptyAct = E5Action(
1217 QApplication.translate('ViewManager', 'Shorten empty lines'), 1226 QCoreApplication.translate('ViewManager', 'Shorten empty lines'),
1218 QApplication.translate('ViewManager', 'Shorten empty lines'), 1227 QCoreApplication.translate('ViewManager', 'Shorten empty lines'),
1219 0, 0, 1228 0, 0,
1220 self.editActGrp, 'vm_edit_shorten_empty_lines') 1229 self.editActGrp, 'vm_edit_shorten_empty_lines')
1221 self.shortenEmptyAct.setStatusTip(QApplication.translate( 1230 self.shortenEmptyAct.setStatusTip(QCoreApplication.translate(
1222 'ViewManager', 'Shorten empty lines')) 1231 'ViewManager', 'Shorten empty lines'))
1223 self.shortenEmptyAct.setWhatsThis(QApplication.translate( 1232 self.shortenEmptyAct.setWhatsThis(QCoreApplication.translate(
1224 'ViewManager', 1233 'ViewManager',
1225 """<b>Shorten empty lines</b>""" 1234 """<b>Shorten empty lines</b>"""
1226 """<p>Shorten lines consisting solely of whitespace""" 1235 """<p>Shorten lines consisting solely of whitespace"""
1227 """ characters.</p>""" 1236 """ characters.</p>"""
1228 )) 1237 ))
1229 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines) 1238 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines)
1230 self.editActions.append(self.shortenEmptyAct) 1239 self.editActions.append(self.shortenEmptyAct)
1231 1240
1232 self.autoCompleteAct = E5Action( 1241 self.autoCompleteAct = E5Action(
1233 QApplication.translate('ViewManager', 'Autocomplete'), 1242 QCoreApplication.translate('ViewManager', 'Autocomplete'),
1234 QApplication.translate('ViewManager', '&Autocomplete'), 1243 QCoreApplication.translate('ViewManager', '&Autocomplete'),
1235 QKeySequence(QApplication.translate( 1244 QKeySequence(QCoreApplication.translate(
1236 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")), 1245 'ViewManager', "Ctrl+Space", "Edit|Autocomplete")),
1237 0, 1246 0,
1238 self.editActGrp, 'vm_edit_autocomplete') 1247 self.editActGrp, 'vm_edit_autocomplete')
1239 self.autoCompleteAct.setStatusTip(QApplication.translate( 1248 self.autoCompleteAct.setStatusTip(QCoreApplication.translate(
1240 'ViewManager', 'Autocomplete current word')) 1249 'ViewManager', 'Autocomplete current word'))
1241 self.autoCompleteAct.setWhatsThis(QApplication.translate( 1250 self.autoCompleteAct.setWhatsThis(QCoreApplication.translate(
1242 'ViewManager', 1251 'ViewManager',
1243 """<b>Autocomplete</b>""" 1252 """<b>Autocomplete</b>"""
1244 """<p>Performs an autocompletion of the word containing""" 1253 """<p>Performs an autocompletion of the word containing"""
1245 """ the cursor.</p>""" 1254 """ the cursor.</p>"""
1246 )) 1255 ))
1247 self.autoCompleteAct.triggered.connect(self.__editAutoComplete) 1256 self.autoCompleteAct.triggered.connect(self.__editAutoComplete)
1248 self.editActions.append(self.autoCompleteAct) 1257 self.editActions.append(self.autoCompleteAct)
1249 1258
1250 self.autoCompleteFromDocAct = E5Action( 1259 self.autoCompleteFromDocAct = E5Action(
1251 QApplication.translate( 1260 QCoreApplication.translate(
1252 'ViewManager', 'Autocomplete from Document'), 1261 'ViewManager', 'Autocomplete from Document'),
1253 QApplication.translate( 1262 QCoreApplication.translate(
1254 'ViewManager', 'Autocomplete from Document'), 1263 'ViewManager', 'Autocomplete from Document'),
1255 QKeySequence(QApplication.translate( 1264 QKeySequence(QCoreApplication.translate(
1256 'ViewManager', "Ctrl+Shift+Space", 1265 'ViewManager', "Ctrl+Shift+Space",
1257 "Edit|Autocomplete from Document")), 1266 "Edit|Autocomplete from Document")),
1258 0, 1267 0,
1259 self.editActGrp, 'vm_edit_autocomplete_from_document') 1268 self.editActGrp, 'vm_edit_autocomplete_from_document')
1260 self.autoCompleteFromDocAct.setStatusTip(QApplication.translate( 1269 self.autoCompleteFromDocAct.setStatusTip(QCoreApplication.translate(
1261 'ViewManager', 1270 'ViewManager',
1262 'Autocomplete current word from Document')) 1271 'Autocomplete current word from Document'))
1263 self.autoCompleteFromDocAct.setWhatsThis(QApplication.translate( 1272 self.autoCompleteFromDocAct.setWhatsThis(QCoreApplication.translate(
1264 'ViewManager', 1273 'ViewManager',
1265 """<b>Autocomplete from Document</b>""" 1274 """<b>Autocomplete from Document</b>"""
1266 """<p>Performs an autocompletion from document of the word""" 1275 """<p>Performs an autocompletion from document of the word"""
1267 """ containing the cursor.</p>""" 1276 """ containing the cursor.</p>"""
1268 )) 1277 ))
1269 self.autoCompleteFromDocAct.triggered.connect( 1278 self.autoCompleteFromDocAct.triggered.connect(
1270 self.__editAutoCompleteFromDoc) 1279 self.__editAutoCompleteFromDoc)
1271 self.editActions.append(self.autoCompleteFromDocAct) 1280 self.editActions.append(self.autoCompleteFromDocAct)
1272 1281
1273 self.autoCompleteFromAPIsAct = E5Action( 1282 self.autoCompleteFromAPIsAct = E5Action(
1274 QApplication.translate('ViewManager', 'Autocomplete from APIs'), 1283 QCoreApplication.translate('ViewManager',
1275 QApplication.translate('ViewManager', 'Autocomplete from APIs'), 1284 'Autocomplete from APIs'),
1276 QKeySequence(QApplication.translate( 1285 QCoreApplication.translate('ViewManager',
1286 'Autocomplete from APIs'),
1287 QKeySequence(QCoreApplication.translate(
1277 'ViewManager', "Ctrl+Alt+Space", 1288 'ViewManager', "Ctrl+Alt+Space",
1278 "Edit|Autocomplete from APIs")), 1289 "Edit|Autocomplete from APIs")),
1279 0, 1290 0,
1280 self.editActGrp, 'vm_edit_autocomplete_from_api') 1291 self.editActGrp, 'vm_edit_autocomplete_from_api')
1281 self.autoCompleteFromAPIsAct.setStatusTip(QApplication.translate( 1292 self.autoCompleteFromAPIsAct.setStatusTip(QCoreApplication.translate(
1282 'ViewManager', 1293 'ViewManager',
1283 'Autocomplete current word from APIs')) 1294 'Autocomplete current word from APIs'))
1284 self.autoCompleteFromAPIsAct.setWhatsThis(QApplication.translate( 1295 self.autoCompleteFromAPIsAct.setWhatsThis(QCoreApplication.translate(
1285 'ViewManager', 1296 'ViewManager',
1286 """<b>Autocomplete from APIs</b>""" 1297 """<b>Autocomplete from APIs</b>"""
1287 """<p>Performs an autocompletion from APIs of the word""" 1298 """<p>Performs an autocompletion from APIs of the word"""
1288 """ containing the cursor.</p>""" 1299 """ containing the cursor.</p>"""
1289 )) 1300 ))
1290 self.autoCompleteFromAPIsAct.triggered.connect( 1301 self.autoCompleteFromAPIsAct.triggered.connect(
1291 self.__editAutoCompleteFromAPIs) 1302 self.__editAutoCompleteFromAPIs)
1292 self.editActions.append(self.autoCompleteFromAPIsAct) 1303 self.editActions.append(self.autoCompleteFromAPIsAct)
1293 1304
1294 self.autoCompleteFromAllAct = E5Action( 1305 self.autoCompleteFromAllAct = E5Action(
1295 QApplication.translate( 1306 QCoreApplication.translate(
1296 'ViewManager', 'Autocomplete from Document and APIs'), 1307 'ViewManager', 'Autocomplete from Document and APIs'),
1297 QApplication.translate( 1308 QCoreApplication.translate(
1298 'ViewManager', 'Autocomplete from Document and APIs'), 1309 'ViewManager', 'Autocomplete from Document and APIs'),
1299 QKeySequence(QApplication.translate( 1310 QKeySequence(QCoreApplication.translate(
1300 'ViewManager', "Alt+Shift+Space", 1311 'ViewManager', "Alt+Shift+Space",
1301 "Edit|Autocomplete from Document and APIs")), 1312 "Edit|Autocomplete from Document and APIs")),
1302 0, 1313 0,
1303 self.editActGrp, 'vm_edit_autocomplete_from_all') 1314 self.editActGrp, 'vm_edit_autocomplete_from_all')
1304 self.autoCompleteFromAllAct.setStatusTip(QApplication.translate( 1315 self.autoCompleteFromAllAct.setStatusTip(QCoreApplication.translate(
1305 'ViewManager', 1316 'ViewManager',
1306 'Autocomplete current word from Document and APIs')) 1317 'Autocomplete current word from Document and APIs'))
1307 self.autoCompleteFromAllAct.setWhatsThis(QApplication.translate( 1318 self.autoCompleteFromAllAct.setWhatsThis(QCoreApplication.translate(
1308 'ViewManager', 1319 'ViewManager',
1309 """<b>Autocomplete from Document and APIs</b>""" 1320 """<b>Autocomplete from Document and APIs</b>"""
1310 """<p>Performs an autocompletion from document and APIs""" 1321 """<p>Performs an autocompletion from document and APIs"""
1311 """ of the word containing the cursor.</p>""" 1322 """ of the word containing the cursor.</p>"""
1312 )) 1323 ))
1313 self.autoCompleteFromAllAct.triggered.connect( 1324 self.autoCompleteFromAllAct.triggered.connect(
1314 self.__editAutoCompleteFromAll) 1325 self.__editAutoCompleteFromAll)
1315 self.editActions.append(self.autoCompleteFromAllAct) 1326 self.editActions.append(self.autoCompleteFromAllAct)
1316 1327
1317 self.calltipsAct = E5Action( 1328 self.calltipsAct = E5Action(
1318 QApplication.translate('ViewManager', 'Calltip'), 1329 QCoreApplication.translate('ViewManager', 'Calltip'),
1319 QApplication.translate('ViewManager', '&Calltip'), 1330 QCoreApplication.translate('ViewManager', '&Calltip'),
1320 QKeySequence(QApplication.translate( 1331 QKeySequence(QCoreApplication.translate(
1321 'ViewManager', "Alt+Space", "Edit|Calltip")), 1332 'ViewManager', "Alt+Space", "Edit|Calltip")),
1322 0, 1333 0,
1323 self.editActGrp, 'vm_edit_calltip') 1334 self.editActGrp, 'vm_edit_calltip')
1324 self.calltipsAct.setStatusTip(QApplication.translate( 1335 self.calltipsAct.setStatusTip(QCoreApplication.translate(
1325 'ViewManager', 'Show Calltips')) 1336 'ViewManager', 'Show Calltips'))
1326 self.calltipsAct.setWhatsThis(QApplication.translate( 1337 self.calltipsAct.setWhatsThis(QCoreApplication.translate(
1327 'ViewManager', 1338 'ViewManager',
1328 """<b>Calltip</b>""" 1339 """<b>Calltip</b>"""
1329 """<p>Show calltips based on the characters immediately to the""" 1340 """<p>Show calltips based on the characters immediately to the"""
1330 """ left of the cursor.</p>""" 1341 """ left of the cursor.</p>"""
1331 )) 1342 ))
1332 self.calltipsAct.triggered.connect(self.__editShowCallTips) 1343 self.calltipsAct.triggered.connect(self.__editShowCallTips)
1333 self.editActions.append(self.calltipsAct) 1344 self.editActions.append(self.calltipsAct)
1334 1345
1335 self.sortAct = E5Action( 1346 self.sortAct = E5Action(
1336 QApplication.translate('ViewManager', 'Sort'), 1347 QCoreApplication.translate('ViewManager', 'Sort'),
1337 QApplication.translate('ViewManager', 'Sort'), 1348 QCoreApplication.translate('ViewManager', 'Sort'),
1338 QKeySequence(QApplication.translate( 1349 QKeySequence(QCoreApplication.translate(
1339 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")), 1350 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")),
1340 0, 1351 0,
1341 self.editActGrp, 'vm_edit_sort') 1352 self.editActGrp, 'vm_edit_sort')
1342 self.sortAct.setStatusTip(QApplication.translate( 1353 self.sortAct.setStatusTip(QCoreApplication.translate(
1343 'ViewManager', 1354 'ViewManager',
1344 'Sort the lines containing the rectangular selection')) 1355 'Sort the lines containing the rectangular selection'))
1345 self.sortAct.setWhatsThis(QApplication.translate( 1356 self.sortAct.setWhatsThis(QCoreApplication.translate(
1346 'ViewManager', 1357 'ViewManager',
1347 """<b>Sort</b>""" 1358 """<b>Sort</b>"""
1348 """<p>Sort the lines spanned by a rectangular selection based on""" 1359 """<p>Sort the lines spanned by a rectangular selection based on"""
1349 """ the selection ignoring leading and trailing whitespace.</p>""" 1360 """ the selection ignoring leading and trailing whitespace.</p>"""
1350 )) 1361 ))
1362 self.esm.mapped[int].connect(self.__editorCommand) 1373 self.esm.mapped[int].connect(self.__editorCommand)
1363 1374
1364 self.editorActGrp = createActionGroup(self.editActGrp) 1375 self.editorActGrp = createActionGroup(self.editActGrp)
1365 1376
1366 act = E5Action( 1377 act = E5Action(
1367 QApplication.translate('ViewManager', 'Move left one character'), 1378 QCoreApplication.translate('ViewManager',
1368 QApplication.translate('ViewManager', 'Move left one character'), 1379 'Move left one character'),
1369 QKeySequence(QApplication.translate('ViewManager', 'Left')), 0, 1380 QCoreApplication.translate('ViewManager',
1381 'Move left one character'),
1382 QKeySequence(QCoreApplication.translate('ViewManager', 'Left')), 0,
1370 self.editorActGrp, 'vm_edit_move_left_char') 1383 self.editorActGrp, 'vm_edit_move_left_char')
1371 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT) 1384 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT)
1372 if isMacPlatform(): 1385 if isMacPlatform():
1373 act.setAlternateShortcut(QKeySequence( 1386 act.setAlternateShortcut(QKeySequence(
1374 QApplication.translate('ViewManager', 'Meta+B'))) 1387 QCoreApplication.translate('ViewManager', 'Meta+B')))
1375 act.triggered.connect(self.esm.map) 1388 act.triggered.connect(self.esm.map)
1376 self.editActions.append(act) 1389 self.editActions.append(act)
1377 1390
1378 act = E5Action( 1391 act = E5Action(
1379 QApplication.translate('ViewManager', 'Move right one character'), 1392 QCoreApplication.translate('ViewManager',
1380 QApplication.translate('ViewManager', 'Move right one character'), 1393 'Move right one character'),
1381 QKeySequence(QApplication.translate('ViewManager', 'Right')), 0, 1394 QCoreApplication.translate('ViewManager',
1382 self.editorActGrp, 'vm_edit_move_right_char') 1395 'Move right one character'),
1396 QKeySequence(QCoreApplication.translate('ViewManager', 'Right')),
1397 0, self.editorActGrp, 'vm_edit_move_right_char')
1383 if isMacPlatform(): 1398 if isMacPlatform():
1384 act.setAlternateShortcut(QKeySequence( 1399 act.setAlternateShortcut(QKeySequence(
1385 QApplication.translate('ViewManager', 'Meta+F'))) 1400 QCoreApplication.translate('ViewManager', 'Meta+F')))
1386 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT) 1401 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT)
1387 act.triggered.connect(self.esm.map) 1402 act.triggered.connect(self.esm.map)
1388 self.editActions.append(act) 1403 self.editActions.append(act)
1389 1404
1390 act = E5Action( 1405 act = E5Action(
1391 QApplication.translate('ViewManager', 'Move up one line'), 1406 QCoreApplication.translate('ViewManager', 'Move up one line'),
1392 QApplication.translate('ViewManager', 'Move up one line'), 1407 QCoreApplication.translate('ViewManager', 'Move up one line'),
1393 QKeySequence(QApplication.translate('ViewManager', 'Up')), 0, 1408 QKeySequence(QCoreApplication.translate('ViewManager', 'Up')), 0,
1394 self.editorActGrp, 'vm_edit_move_up_line') 1409 self.editorActGrp, 'vm_edit_move_up_line')
1395 if isMacPlatform(): 1410 if isMacPlatform():
1396 act.setAlternateShortcut(QKeySequence( 1411 act.setAlternateShortcut(QKeySequence(
1397 QApplication.translate('ViewManager', 'Meta+P'))) 1412 QCoreApplication.translate('ViewManager', 'Meta+P')))
1398 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP) 1413 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP)
1399 act.triggered.connect(self.esm.map) 1414 act.triggered.connect(self.esm.map)
1400 self.editActions.append(act) 1415 self.editActions.append(act)
1401 1416
1402 act = E5Action( 1417 act = E5Action(
1403 QApplication.translate('ViewManager', 'Move down one line'), 1418 QCoreApplication.translate('ViewManager', 'Move down one line'),
1404 QApplication.translate('ViewManager', 'Move down one line'), 1419 QCoreApplication.translate('ViewManager', 'Move down one line'),
1405 QKeySequence(QApplication.translate('ViewManager', 'Down')), 0, 1420 QKeySequence(QCoreApplication.translate('ViewManager', 'Down')), 0,
1406 self.editorActGrp, 'vm_edit_move_down_line') 1421 self.editorActGrp, 'vm_edit_move_down_line')
1407 if isMacPlatform(): 1422 if isMacPlatform():
1408 act.setAlternateShortcut(QKeySequence( 1423 act.setAlternateShortcut(QKeySequence(
1409 QApplication.translate('ViewManager', 'Meta+N'))) 1424 QCoreApplication.translate('ViewManager', 'Meta+N')))
1410 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN) 1425 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN)
1411 act.triggered.connect(self.esm.map) 1426 act.triggered.connect(self.esm.map)
1412 self.editActions.append(act) 1427 self.editActions.append(act)
1413 1428
1414 act = E5Action( 1429 act = E5Action(
1415 QApplication.translate('ViewManager', 'Move left one word part'), 1430 QCoreApplication.translate('ViewManager',
1416 QApplication.translate('ViewManager', 'Move left one word part'), 1431 'Move left one word part'),
1432 QCoreApplication.translate('ViewManager',
1433 'Move left one word part'),
1417 0, 0, 1434 0, 0,
1418 self.editorActGrp, 'vm_edit_move_left_word_part') 1435 self.editorActGrp, 'vm_edit_move_left_word_part')
1419 if not isMacPlatform(): 1436 if not isMacPlatform():
1420 act.setShortcut(QKeySequence( 1437 act.setShortcut(QKeySequence(
1421 QApplication.translate('ViewManager', 'Alt+Left'))) 1438 QCoreApplication.translate('ViewManager', 'Alt+Left')))
1422 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT) 1439 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT)
1423 act.triggered.connect(self.esm.map) 1440 act.triggered.connect(self.esm.map)
1424 self.editActions.append(act) 1441 self.editActions.append(act)
1425 1442
1426 act = E5Action( 1443 act = E5Action(
1427 QApplication.translate('ViewManager', 'Move right one word part'), 1444 QCoreApplication.translate('ViewManager',
1428 QApplication.translate('ViewManager', 'Move right one word part'), 1445 'Move right one word part'),
1446 QCoreApplication.translate('ViewManager',
1447 'Move right one word part'),
1429 0, 0, 1448 0, 0,
1430 self.editorActGrp, 'vm_edit_move_right_word_part') 1449 self.editorActGrp, 'vm_edit_move_right_word_part')
1431 if not isMacPlatform(): 1450 if not isMacPlatform():
1432 act.setShortcut(QKeySequence( 1451 act.setShortcut(QKeySequence(
1433 QApplication.translate('ViewManager', 'Alt+Right'))) 1452 QCoreApplication.translate('ViewManager', 'Alt+Right')))
1434 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT) 1453 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT)
1435 act.triggered.connect(self.esm.map) 1454 act.triggered.connect(self.esm.map)
1436 self.editActions.append(act) 1455 self.editActions.append(act)
1437 1456
1438 act = E5Action( 1457 act = E5Action(
1439 QApplication.translate('ViewManager', 'Move left one word'), 1458 QCoreApplication.translate('ViewManager', 'Move left one word'),
1440 QApplication.translate('ViewManager', 'Move left one word'), 1459 QCoreApplication.translate('ViewManager', 'Move left one word'),
1441 0, 0, 1460 0, 0,
1442 self.editorActGrp, 'vm_edit_move_left_word') 1461 self.editorActGrp, 'vm_edit_move_left_word')
1443 if isMacPlatform(): 1462 if isMacPlatform():
1444 act.setShortcut(QKeySequence( 1463 act.setShortcut(QKeySequence(
1445 QApplication.translate('ViewManager', 'Alt+Left'))) 1464 QCoreApplication.translate('ViewManager', 'Alt+Left')))
1446 else: 1465 else:
1447 act.setShortcut(QKeySequence( 1466 act.setShortcut(QKeySequence(
1448 QApplication.translate('ViewManager', 'Ctrl+Left'))) 1467 QCoreApplication.translate('ViewManager', 'Ctrl+Left')))
1449 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT) 1468 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT)
1450 act.triggered.connect(self.esm.map) 1469 act.triggered.connect(self.esm.map)
1451 self.editActions.append(act) 1470 self.editActions.append(act)
1452 1471
1453 act = E5Action( 1472 act = E5Action(
1454 QApplication.translate('ViewManager', 'Move right one word'), 1473 QCoreApplication.translate('ViewManager', 'Move right one word'),
1455 QApplication.translate('ViewManager', 'Move right one word'), 1474 QCoreApplication.translate('ViewManager', 'Move right one word'),
1456 0, 0, 1475 0, 0,
1457 self.editorActGrp, 'vm_edit_move_right_word') 1476 self.editorActGrp, 'vm_edit_move_right_word')
1458 if not isMacPlatform(): 1477 if not isMacPlatform():
1459 act.setShortcut(QKeySequence( 1478 act.setShortcut(QKeySequence(
1460 QApplication.translate('ViewManager', 'Ctrl+Right'))) 1479 QCoreApplication.translate('ViewManager', 'Ctrl+Right')))
1461 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT) 1480 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT)
1462 act.triggered.connect(self.esm.map) 1481 act.triggered.connect(self.esm.map)
1463 self.editActions.append(act) 1482 self.editActions.append(act)
1464 1483
1465 act = E5Action( 1484 act = E5Action(
1466 QApplication.translate( 1485 QCoreApplication.translate(
1467 'ViewManager', 1486 'ViewManager',
1468 'Move to first visible character in document line'), 1487 'Move to first visible character in document line'),
1469 QApplication.translate( 1488 QCoreApplication.translate(
1470 'ViewManager', 1489 'ViewManager',
1471 'Move to first visible character in document line'), 1490 'Move to first visible character in document line'),
1472 0, 0, 1491 0, 0,
1473 self.editorActGrp, 'vm_edit_move_first_visible_char') 1492 self.editorActGrp, 'vm_edit_move_first_visible_char')
1474 if not isMacPlatform(): 1493 if not isMacPlatform():
1475 act.setShortcut(QKeySequence( 1494 act.setShortcut(QKeySequence(
1476 QApplication.translate('ViewManager', 'Home'))) 1495 QCoreApplication.translate('ViewManager', 'Home')))
1477 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME) 1496 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME)
1478 act.triggered.connect(self.esm.map) 1497 act.triggered.connect(self.esm.map)
1479 self.editActions.append(act) 1498 self.editActions.append(act)
1480 1499
1481 act = E5Action( 1500 act = E5Action(
1482 QApplication.translate( 1501 QCoreApplication.translate(
1483 'ViewManager', 'Move to start of display line'), 1502 'ViewManager', 'Move to start of display line'),
1484 QApplication.translate( 1503 QCoreApplication.translate(
1485 'ViewManager', 'Move to start of display line'), 1504 'ViewManager', 'Move to start of display line'),
1486 0, 0, 1505 0, 0,
1487 self.editorActGrp, 'vm_edit_move_start_line') 1506 self.editorActGrp, 'vm_edit_move_start_line')
1488 if isMacPlatform(): 1507 if isMacPlatform():
1489 act.setShortcut(QKeySequence( 1508 act.setShortcut(QKeySequence(
1490 QApplication.translate('ViewManager', 'Ctrl+Left'))) 1509 QCoreApplication.translate('ViewManager', 'Ctrl+Left')))
1491 else: 1510 else:
1492 act.setShortcut(QKeySequence( 1511 act.setShortcut(QKeySequence(
1493 QApplication.translate('ViewManager', 'Alt+Home'))) 1512 QCoreApplication.translate('ViewManager', 'Alt+Home')))
1494 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY) 1513 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY)
1495 act.triggered.connect(self.esm.map) 1514 act.triggered.connect(self.esm.map)
1496 self.editActions.append(act) 1515 self.editActions.append(act)
1497 1516
1498 act = E5Action( 1517 act = E5Action(
1499 QApplication.translate( 1518 QCoreApplication.translate(
1500 'ViewManager', 'Move to end of document line'), 1519 'ViewManager', 'Move to end of document line'),
1501 QApplication.translate( 1520 QCoreApplication.translate(
1502 'ViewManager', 'Move to end of document line'), 1521 'ViewManager', 'Move to end of document line'),
1503 0, 0, 1522 0, 0,
1504 self.editorActGrp, 'vm_edit_move_end_line') 1523 self.editorActGrp, 'vm_edit_move_end_line')
1505 if isMacPlatform(): 1524 if isMacPlatform():
1506 act.setShortcut(QKeySequence( 1525 act.setShortcut(QKeySequence(
1507 QApplication.translate('ViewManager', 'Meta+E'))) 1526 QCoreApplication.translate('ViewManager', 'Meta+E')))
1508 else: 1527 else:
1509 act.setShortcut(QKeySequence( 1528 act.setShortcut(QKeySequence(
1510 QApplication.translate('ViewManager', 'End'))) 1529 QCoreApplication.translate('ViewManager', 'End')))
1511 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND) 1530 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND)
1512 act.triggered.connect(self.esm.map) 1531 act.triggered.connect(self.esm.map)
1513 self.editActions.append(act) 1532 self.editActions.append(act)
1514 1533
1515 act = E5Action( 1534 act = E5Action(
1516 QApplication.translate('ViewManager', 'Scroll view down one line'), 1535 QCoreApplication.translate('ViewManager',
1517 QApplication.translate('ViewManager', 'Scroll view down one line'), 1536 'Scroll view down one line'),
1518 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Down')), 1537 QCoreApplication.translate('ViewManager',
1519 0, 1538 'Scroll view down one line'),
1520 self.editorActGrp, 'vm_edit_scroll_down_line') 1539 QKeySequence(QCoreApplication.translate('ViewManager',
1540 'Ctrl+Down')),
1541 0, self.editorActGrp, 'vm_edit_scroll_down_line')
1521 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN) 1542 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN)
1522 act.triggered.connect(self.esm.map) 1543 act.triggered.connect(self.esm.map)
1523 self.editActions.append(act) 1544 self.editActions.append(act)
1524 1545
1525 act = E5Action( 1546 act = E5Action(
1526 QApplication.translate('ViewManager', 'Scroll view up one line'), 1547 QCoreApplication.translate('ViewManager',
1527 QApplication.translate('ViewManager', 'Scroll view up one line'), 1548 'Scroll view up one line'),
1528 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Up')), 0, 1549 QCoreApplication.translate('ViewManager',
1529 self.editorActGrp, 'vm_edit_scroll_up_line') 1550 'Scroll view up one line'),
1551 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+Up')),
1552 0, self.editorActGrp, 'vm_edit_scroll_up_line')
1530 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP) 1553 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP)
1531 act.triggered.connect(self.esm.map) 1554 act.triggered.connect(self.esm.map)
1532 self.editActions.append(act) 1555 self.editActions.append(act)
1533 1556
1534 act = E5Action( 1557 act = E5Action(
1535 QApplication.translate('ViewManager', 'Move up one paragraph'), 1558 QCoreApplication.translate('ViewManager', 'Move up one paragraph'),
1536 QApplication.translate('ViewManager', 'Move up one paragraph'), 1559 QCoreApplication.translate('ViewManager', 'Move up one paragraph'),
1537 QKeySequence(QApplication.translate('ViewManager', 'Alt+Up')), 0, 1560 QKeySequence(QCoreApplication.translate('ViewManager', 'Alt+Up')),
1538 self.editorActGrp, 'vm_edit_move_up_para') 1561 0, self.editorActGrp, 'vm_edit_move_up_para')
1539 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP) 1562 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP)
1540 act.triggered.connect(self.esm.map) 1563 act.triggered.connect(self.esm.map)
1541 self.editActions.append(act) 1564 self.editActions.append(act)
1542 1565
1543 act = E5Action( 1566 act = E5Action(
1544 QApplication.translate('ViewManager', 'Move down one paragraph'), 1567 QCoreApplication.translate('ViewManager',
1545 QApplication.translate('ViewManager', 'Move down one paragraph'), 1568 'Move down one paragraph'),
1546 QKeySequence(QApplication.translate('ViewManager', 'Alt+Down')), 0, 1569 QCoreApplication.translate('ViewManager',
1547 self.editorActGrp, 'vm_edit_move_down_para') 1570 'Move down one paragraph'),
1571 QKeySequence(QCoreApplication.translate('ViewManager',
1572 'Alt+Down')),
1573 0, self.editorActGrp, 'vm_edit_move_down_para')
1548 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN) 1574 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN)
1549 act.triggered.connect(self.esm.map) 1575 act.triggered.connect(self.esm.map)
1550 self.editActions.append(act) 1576 self.editActions.append(act)
1551 1577
1552 act = E5Action( 1578 act = E5Action(
1553 QApplication.translate('ViewManager', 'Move up one page'), 1579 QCoreApplication.translate('ViewManager', 'Move up one page'),
1554 QApplication.translate('ViewManager', 'Move up one page'), 1580 QCoreApplication.translate('ViewManager', 'Move up one page'),
1555 QKeySequence(QApplication.translate('ViewManager', 'PgUp')), 0, 1581 QKeySequence(QCoreApplication.translate('ViewManager', 'PgUp')), 0,
1556 self.editorActGrp, 'vm_edit_move_up_page') 1582 self.editorActGrp, 'vm_edit_move_up_page')
1557 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP) 1583 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP)
1558 act.triggered.connect(self.esm.map) 1584 act.triggered.connect(self.esm.map)
1559 self.editActions.append(act) 1585 self.editActions.append(act)
1560 1586
1561 act = E5Action( 1587 act = E5Action(
1562 QApplication.translate('ViewManager', 'Move down one page'), 1588 QCoreApplication.translate('ViewManager', 'Move down one page'),
1563 QApplication.translate('ViewManager', 'Move down one page'), 1589 QCoreApplication.translate('ViewManager', 'Move down one page'),
1564 QKeySequence(QApplication.translate('ViewManager', 'PgDown')), 0, 1590 QKeySequence(QCoreApplication.translate('ViewManager', 'PgDown')),
1565 self.editorActGrp, 'vm_edit_move_down_page') 1591 0, self.editorActGrp, 'vm_edit_move_down_page')
1566 if isMacPlatform(): 1592 if isMacPlatform():
1567 act.setAlternateShortcut(QKeySequence( 1593 act.setAlternateShortcut(QKeySequence(
1568 QApplication.translate('ViewManager', 'Meta+V'))) 1594 QCoreApplication.translate('ViewManager', 'Meta+V')))
1569 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN) 1595 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN)
1570 act.triggered.connect(self.esm.map) 1596 act.triggered.connect(self.esm.map)
1571 self.editActions.append(act) 1597 self.editActions.append(act)
1572 1598
1573 act = E5Action( 1599 act = E5Action(
1574 QApplication.translate('ViewManager', 'Move to start of document'), 1600 QCoreApplication.translate('ViewManager',
1575 QApplication.translate('ViewManager', 'Move to start of document'), 1601 'Move to start of document'),
1602 QCoreApplication.translate('ViewManager',
1603 'Move to start of document'),
1576 0, 0, 1604 0, 0,
1577 self.editorActGrp, 'vm_edit_move_start_text') 1605 self.editorActGrp, 'vm_edit_move_start_text')
1578 if isMacPlatform(): 1606 if isMacPlatform():
1579 act.setShortcut(QKeySequence( 1607 act.setShortcut(QKeySequence(
1580 QApplication.translate('ViewManager', 'Ctrl+Up'))) 1608 QCoreApplication.translate('ViewManager', 'Ctrl+Up')))
1581 else: 1609 else:
1582 act.setShortcut(QKeySequence( 1610 act.setShortcut(QKeySequence(
1583 QApplication.translate('ViewManager', 'Ctrl+Home'))) 1611 QCoreApplication.translate('ViewManager', 'Ctrl+Home')))
1584 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART) 1612 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART)
1585 act.triggered.connect(self.esm.map) 1613 act.triggered.connect(self.esm.map)
1586 self.editActions.append(act) 1614 self.editActions.append(act)
1587 1615
1588 act = E5Action( 1616 act = E5Action(
1589 QApplication.translate('ViewManager', 'Move to end of document'), 1617 QCoreApplication.translate('ViewManager',
1590 QApplication.translate('ViewManager', 'Move to end of document'), 1618 'Move to end of document'),
1619 QCoreApplication.translate('ViewManager',
1620 'Move to end of document'),
1591 0, 0, 1621 0, 0,
1592 self.editorActGrp, 'vm_edit_move_end_text') 1622 self.editorActGrp, 'vm_edit_move_end_text')
1593 if isMacPlatform(): 1623 if isMacPlatform():
1594 act.setShortcut(QKeySequence( 1624 act.setShortcut(QKeySequence(
1595 QApplication.translate('ViewManager', 'Ctrl+Down'))) 1625 QCoreApplication.translate('ViewManager', 'Ctrl+Down')))
1596 else: 1626 else:
1597 act.setShortcut(QKeySequence( 1627 act.setShortcut(QKeySequence(
1598 QApplication.translate('ViewManager', 'Ctrl+End'))) 1628 QCoreApplication.translate('ViewManager', 'Ctrl+End')))
1599 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND) 1629 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND)
1600 act.triggered.connect(self.esm.map) 1630 act.triggered.connect(self.esm.map)
1601 self.editActions.append(act) 1631 self.editActions.append(act)
1602 1632
1603 act = E5Action( 1633 act = E5Action(
1604 QApplication.translate('ViewManager', 'Indent one level'), 1634 QCoreApplication.translate('ViewManager', 'Indent one level'),
1605 QApplication.translate('ViewManager', 'Indent one level'), 1635 QCoreApplication.translate('ViewManager', 'Indent one level'),
1606 QKeySequence(QApplication.translate('ViewManager', 'Tab')), 0, 1636 QKeySequence(QCoreApplication.translate('ViewManager', 'Tab')), 0,
1607 self.editorActGrp, 'vm_edit_indent_one_level') 1637 self.editorActGrp, 'vm_edit_indent_one_level')
1608 self.esm.setMapping(act, QsciScintilla.SCI_TAB) 1638 self.esm.setMapping(act, QsciScintilla.SCI_TAB)
1609 act.triggered.connect(self.esm.map) 1639 act.triggered.connect(self.esm.map)
1610 self.editActions.append(act) 1640 self.editActions.append(act)
1611 1641
1612 act = E5Action( 1642 act = E5Action(
1613 QApplication.translate('ViewManager', 'Unindent one level'), 1643 QCoreApplication.translate('ViewManager', 'Unindent one level'),
1614 QApplication.translate('ViewManager', 'Unindent one level'), 1644 QCoreApplication.translate('ViewManager', 'Unindent one level'),
1615 QKeySequence(QApplication.translate('ViewManager', 'Shift+Tab')), 1645 QKeySequence(QCoreApplication.translate('ViewManager',
1616 0, 1646 'Shift+Tab')),
1617 self.editorActGrp, 'vm_edit_unindent_one_level') 1647 0, self.editorActGrp, 'vm_edit_unindent_one_level')
1618 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB) 1648 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB)
1619 act.triggered.connect(self.esm.map) 1649 act.triggered.connect(self.esm.map)
1620 self.editActions.append(act) 1650 self.editActions.append(act)
1621 1651
1622 act = E5Action( 1652 act = E5Action(
1623 QApplication.translate( 1653 QCoreApplication.translate(
1624 'ViewManager', 'Extend selection left one character'), 1654 'ViewManager', 'Extend selection left one character'),
1625 QApplication.translate( 1655 QCoreApplication.translate(
1626 'ViewManager', 'Extend selection left one character'), 1656 'ViewManager', 'Extend selection left one character'),
1627 QKeySequence(QApplication.translate('ViewManager', 'Shift+Left')), 1657 QKeySequence(QCoreApplication.translate('ViewManager',
1628 0, 1658 'Shift+Left')),
1629 self.editorActGrp, 'vm_edit_extend_selection_left_char') 1659 0, self.editorActGrp, 'vm_edit_extend_selection_left_char')
1630 if isMacPlatform(): 1660 if isMacPlatform():
1631 act.setAlternateShortcut(QKeySequence( 1661 act.setAlternateShortcut(QKeySequence(
1632 QApplication.translate('ViewManager', 'Meta+Shift+B'))) 1662 QCoreApplication.translate('ViewManager', 'Meta+Shift+B')))
1633 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND) 1663 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND)
1634 act.triggered.connect(self.esm.map) 1664 act.triggered.connect(self.esm.map)
1635 self.editActions.append(act) 1665 self.editActions.append(act)
1636 1666
1637 act = E5Action( 1667 act = E5Action(
1638 QApplication.translate( 1668 QCoreApplication.translate(
1639 'ViewManager', 'Extend selection right one character'), 1669 'ViewManager', 'Extend selection right one character'),
1640 QApplication.translate( 1670 QCoreApplication.translate(
1641 'ViewManager', 'Extend selection right one character'), 1671 'ViewManager', 'Extend selection right one character'),
1642 QKeySequence(QApplication.translate('ViewManager', 'Shift+Right')), 1672 QKeySequence(QCoreApplication.translate('ViewManager',
1643 0, 1673 'Shift+Right')),
1644 self.editorActGrp, 'vm_edit_extend_selection_right_char') 1674 0, self.editorActGrp, 'vm_edit_extend_selection_right_char')
1645 if isMacPlatform(): 1675 if isMacPlatform():
1646 act.setAlternateShortcut(QKeySequence( 1676 act.setAlternateShortcut(QKeySequence(
1647 QApplication.translate('ViewManager', 'Meta+Shift+F'))) 1677 QCoreApplication.translate('ViewManager', 'Meta+Shift+F')))
1648 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND) 1678 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND)
1649 act.triggered.connect(self.esm.map) 1679 act.triggered.connect(self.esm.map)
1650 self.editActions.append(act) 1680 self.editActions.append(act)
1651 1681
1652 act = E5Action( 1682 act = E5Action(
1653 QApplication.translate( 1683 QCoreApplication.translate(
1654 'ViewManager', 'Extend selection up one line'), 1684 'ViewManager', 'Extend selection up one line'),
1655 QApplication.translate( 1685 QCoreApplication.translate(
1656 'ViewManager', 'Extend selection up one line'), 1686 'ViewManager', 'Extend selection up one line'),
1657 QKeySequence(QApplication.translate('ViewManager', 'Shift+Up')), 0, 1687 QKeySequence(QCoreApplication.translate('ViewManager',
1658 self.editorActGrp, 'vm_edit_extend_selection_up_line') 1688 'Shift+Up')),
1689 0, self.editorActGrp, 'vm_edit_extend_selection_up_line')
1659 if isMacPlatform(): 1690 if isMacPlatform():
1660 act.setAlternateShortcut(QKeySequence( 1691 act.setAlternateShortcut(QKeySequence(
1661 QApplication.translate('ViewManager', 'Meta+Shift+P'))) 1692 QCoreApplication.translate('ViewManager', 'Meta+Shift+P')))
1662 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND) 1693 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND)
1663 act.triggered.connect(self.esm.map) 1694 act.triggered.connect(self.esm.map)
1664 self.editActions.append(act) 1695 self.editActions.append(act)
1665 1696
1666 act = E5Action( 1697 act = E5Action(
1667 QApplication.translate( 1698 QCoreApplication.translate(
1668 'ViewManager', 'Extend selection down one line'), 1699 'ViewManager', 'Extend selection down one line'),
1669 QApplication.translate( 1700 QCoreApplication.translate(
1670 'ViewManager', 'Extend selection down one line'), 1701 'ViewManager', 'Extend selection down one line'),
1671 QKeySequence(QApplication.translate('ViewManager', 'Shift+Down')), 1702 QKeySequence(QCoreApplication.translate('ViewManager',
1672 0, 1703 'Shift+Down')),
1673 self.editorActGrp, 'vm_edit_extend_selection_down_line') 1704 0, self.editorActGrp, 'vm_edit_extend_selection_down_line')
1674 if isMacPlatform(): 1705 if isMacPlatform():
1675 act.setAlternateShortcut(QKeySequence( 1706 act.setAlternateShortcut(QKeySequence(
1676 QApplication.translate('ViewManager', 'Meta+Shift+N'))) 1707 QCoreApplication.translate('ViewManager', 'Meta+Shift+N')))
1677 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND) 1708 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND)
1678 act.triggered.connect(self.esm.map) 1709 act.triggered.connect(self.esm.map)
1679 self.editActions.append(act) 1710 self.editActions.append(act)
1680 1711
1681 act = E5Action( 1712 act = E5Action(
1682 QApplication.translate( 1713 QCoreApplication.translate(
1683 'ViewManager', 'Extend selection left one word part'), 1714 'ViewManager', 'Extend selection left one word part'),
1684 QApplication.translate( 1715 QCoreApplication.translate(
1685 'ViewManager', 'Extend selection left one word part'), 1716 'ViewManager', 'Extend selection left one word part'),
1686 0, 0, 1717 0, 0,
1687 self.editorActGrp, 'vm_edit_extend_selection_left_word_part') 1718 self.editorActGrp, 'vm_edit_extend_selection_left_word_part')
1688 if not isMacPlatform(): 1719 if not isMacPlatform():
1689 act.setShortcut(QKeySequence( 1720 act.setShortcut(QKeySequence(
1690 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) 1721 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left')))
1691 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND) 1722 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND)
1692 act.triggered.connect(self.esm.map) 1723 act.triggered.connect(self.esm.map)
1693 self.editActions.append(act) 1724 self.editActions.append(act)
1694 1725
1695 act = E5Action( 1726 act = E5Action(
1696 QApplication.translate( 1727 QCoreApplication.translate(
1697 'ViewManager', 'Extend selection right one word part'), 1728 'ViewManager', 'Extend selection right one word part'),
1698 QApplication.translate( 1729 QCoreApplication.translate(
1699 'ViewManager', 'Extend selection right one word part'), 1730 'ViewManager', 'Extend selection right one word part'),
1700 0, 0, 1731 0, 0,
1701 self.editorActGrp, 'vm_edit_extend_selection_right_word_part') 1732 self.editorActGrp, 'vm_edit_extend_selection_right_word_part')
1702 if not isMacPlatform(): 1733 if not isMacPlatform():
1703 act.setShortcut(QKeySequence( 1734 act.setShortcut(QKeySequence(
1704 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 1735 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right')))
1705 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND) 1736 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND)
1706 act.triggered.connect(self.esm.map) 1737 act.triggered.connect(self.esm.map)
1707 self.editActions.append(act) 1738 self.editActions.append(act)
1708 1739
1709 act = E5Action( 1740 act = E5Action(
1710 QApplication.translate( 1741 QCoreApplication.translate(
1711 'ViewManager', 'Extend selection left one word'), 1742 'ViewManager', 'Extend selection left one word'),
1712 QApplication.translate( 1743 QCoreApplication.translate(
1713 'ViewManager', 'Extend selection left one word'), 1744 'ViewManager', 'Extend selection left one word'),
1714 0, 0, 1745 0, 0,
1715 self.editorActGrp, 'vm_edit_extend_selection_left_word') 1746 self.editorActGrp, 'vm_edit_extend_selection_left_word')
1716 if isMacPlatform(): 1747 if isMacPlatform():
1717 act.setShortcut(QKeySequence( 1748 act.setShortcut(QKeySequence(
1718 QApplication.translate('ViewManager', 'Alt+Shift+Left'))) 1749 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left')))
1719 else: 1750 else:
1720 act.setShortcut(QKeySequence( 1751 act.setShortcut(QKeySequence(
1721 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) 1752 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Left')))
1722 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND) 1753 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND)
1723 act.triggered.connect(self.esm.map) 1754 act.triggered.connect(self.esm.map)
1724 self.editActions.append(act) 1755 self.editActions.append(act)
1725 1756
1726 act = E5Action( 1757 act = E5Action(
1727 QApplication.translate( 1758 QCoreApplication.translate(
1728 'ViewManager', 'Extend selection right one word'), 1759 'ViewManager', 'Extend selection right one word'),
1729 QApplication.translate( 1760 QCoreApplication.translate(
1730 'ViewManager', 'Extend selection right one word'), 1761 'ViewManager', 'Extend selection right one word'),
1731 0, 0, 1762 0, 0,
1732 self.editorActGrp, 'vm_edit_extend_selection_right_word') 1763 self.editorActGrp, 'vm_edit_extend_selection_right_word')
1733 if isMacPlatform(): 1764 if isMacPlatform():
1734 act.setShortcut(QKeySequence( 1765 act.setShortcut(QKeySequence(
1735 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 1766 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right')))
1736 else: 1767 else:
1737 act.setShortcut(QKeySequence( 1768 act.setShortcut(QKeySequence(
1738 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) 1769 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
1739 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND) 1770 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND)
1740 act.triggered.connect(self.esm.map) 1771 act.triggered.connect(self.esm.map)
1741 self.editActions.append(act) 1772 self.editActions.append(act)
1742 1773
1743 act = E5Action( 1774 act = E5Action(
1744 QApplication.translate( 1775 QCoreApplication.translate(
1745 'ViewManager', 1776 'ViewManager',
1746 'Extend selection to first visible character in document' 1777 'Extend selection to first visible character in document'
1747 ' line'), 1778 ' line'),
1748 QApplication.translate( 1779 QCoreApplication.translate(
1749 'ViewManager', 1780 'ViewManager',
1750 'Extend selection to first visible character in document' 1781 'Extend selection to first visible character in document'
1751 ' line'), 1782 ' line'),
1752 0, 0, 1783 0, 0,
1753 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char') 1784 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char')
1754 if not isMacPlatform(): 1785 if not isMacPlatform():
1755 act.setShortcut(QKeySequence( 1786 act.setShortcut(QKeySequence(
1756 QApplication.translate('ViewManager', 'Shift+Home'))) 1787 QCoreApplication.translate('ViewManager', 'Shift+Home')))
1757 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND) 1788 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND)
1758 act.triggered.connect(self.esm.map) 1789 act.triggered.connect(self.esm.map)
1759 self.editActions.append(act) 1790 self.editActions.append(act)
1760 1791
1761 act = E5Action( 1792 act = E5Action(
1762 QApplication.translate( 1793 QCoreApplication.translate(
1763 'ViewManager', 'Extend selection to end of document line'), 1794 'ViewManager', 'Extend selection to end of document line'),
1764 QApplication.translate( 1795 QCoreApplication.translate(
1765 'ViewManager', 'Extend selection to end of document line'), 1796 'ViewManager', 'Extend selection to end of document line'),
1766 0, 0, 1797 0, 0,
1767 self.editorActGrp, 'vm_edit_extend_selection_end_line') 1798 self.editorActGrp, 'vm_edit_extend_selection_end_line')
1768 if isMacPlatform(): 1799 if isMacPlatform():
1769 act.setShortcut(QKeySequence( 1800 act.setShortcut(QKeySequence(
1770 QApplication.translate('ViewManager', 'Meta+Shift+E'))) 1801 QCoreApplication.translate('ViewManager', 'Meta+Shift+E')))
1771 else: 1802 else:
1772 act.setShortcut(QKeySequence( 1803 act.setShortcut(QKeySequence(
1773 QApplication.translate('ViewManager', 'Shift+End'))) 1804 QCoreApplication.translate('ViewManager', 'Shift+End')))
1774 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND) 1805 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND)
1775 act.triggered.connect(self.esm.map) 1806 act.triggered.connect(self.esm.map)
1776 self.editActions.append(act) 1807 self.editActions.append(act)
1777 1808
1778 act = E5Action( 1809 act = E5Action(
1779 QApplication.translate( 1810 QCoreApplication.translate(
1780 'ViewManager', 'Extend selection up one paragraph'), 1811 'ViewManager', 'Extend selection up one paragraph'),
1781 QApplication.translate( 1812 QCoreApplication.translate(
1782 'ViewManager', 'Extend selection up one paragraph'), 1813 'ViewManager', 'Extend selection up one paragraph'),
1783 QKeySequence(QApplication.translate( 1814 QKeySequence(QCoreApplication.translate(
1784 'ViewManager', 'Alt+Shift+Up')), 1815 'ViewManager', 'Alt+Shift+Up')),
1785 0, 1816 0,
1786 self.editorActGrp, 'vm_edit_extend_selection_up_para') 1817 self.editorActGrp, 'vm_edit_extend_selection_up_para')
1787 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND) 1818 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND)
1788 act.triggered.connect(self.esm.map) 1819 act.triggered.connect(self.esm.map)
1789 self.editActions.append(act) 1820 self.editActions.append(act)
1790 1821
1791 act = E5Action( 1822 act = E5Action(
1792 QApplication.translate( 1823 QCoreApplication.translate(
1793 'ViewManager', 'Extend selection down one paragraph'), 1824 'ViewManager', 'Extend selection down one paragraph'),
1794 QApplication.translate( 1825 QCoreApplication.translate(
1795 'ViewManager', 'Extend selection down one paragraph'), 1826 'ViewManager', 'Extend selection down one paragraph'),
1796 QKeySequence(QApplication.translate( 1827 QKeySequence(QCoreApplication.translate(
1797 'ViewManager', 'Alt+Shift+Down')), 1828 'ViewManager', 'Alt+Shift+Down')),
1798 0, 1829 0,
1799 self.editorActGrp, 'vm_edit_extend_selection_down_para') 1830 self.editorActGrp, 'vm_edit_extend_selection_down_para')
1800 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) 1831 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND)
1801 act.triggered.connect(self.esm.map) 1832 act.triggered.connect(self.esm.map)
1802 self.editActions.append(act) 1833 self.editActions.append(act)
1803 1834
1804 act = E5Action( 1835 act = E5Action(
1805 QApplication.translate( 1836 QCoreApplication.translate(
1806 'ViewManager', 'Extend selection up one page'), 1837 'ViewManager', 'Extend selection up one page'),
1807 QApplication.translate( 1838 QCoreApplication.translate(
1808 'ViewManager', 'Extend selection up one page'), 1839 'ViewManager', 'Extend selection up one page'),
1809 QKeySequence(QApplication.translate('ViewManager', 'Shift+PgUp')), 1840 QKeySequence(QCoreApplication.translate('ViewManager',
1810 0, 1841 'Shift+PgUp')),
1811 self.editorActGrp, 'vm_edit_extend_selection_up_page') 1842 0, self.editorActGrp, 'vm_edit_extend_selection_up_page')
1812 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND) 1843 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND)
1813 act.triggered.connect(self.esm.map) 1844 act.triggered.connect(self.esm.map)
1814 self.editActions.append(act) 1845 self.editActions.append(act)
1815 1846
1816 act = E5Action( 1847 act = E5Action(
1817 QApplication.translate( 1848 QCoreApplication.translate(
1818 'ViewManager', 'Extend selection down one page'), 1849 'ViewManager', 'Extend selection down one page'),
1819 QApplication.translate( 1850 QCoreApplication.translate(
1820 'ViewManager', 'Extend selection down one page'), 1851 'ViewManager', 'Extend selection down one page'),
1821 QKeySequence(QApplication.translate( 1852 QKeySequence(QCoreApplication.translate(
1822 'ViewManager', 'Shift+PgDown')), 1853 'ViewManager', 'Shift+PgDown')),
1823 0, 1854 0,
1824 self.editorActGrp, 'vm_edit_extend_selection_down_page') 1855 self.editorActGrp, 'vm_edit_extend_selection_down_page')
1825 if isMacPlatform(): 1856 if isMacPlatform():
1826 act.setAlternateShortcut(QKeySequence( 1857 act.setAlternateShortcut(QKeySequence(
1827 QApplication.translate('ViewManager', 'Meta+Shift+V'))) 1858 QCoreApplication.translate('ViewManager', 'Meta+Shift+V')))
1828 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND) 1859 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND)
1829 act.triggered.connect(self.esm.map) 1860 act.triggered.connect(self.esm.map)
1830 self.editActions.append(act) 1861 self.editActions.append(act)
1831 1862
1832 act = E5Action( 1863 act = E5Action(
1833 QApplication.translate( 1864 QCoreApplication.translate(
1834 'ViewManager', 'Extend selection to start of document'), 1865 'ViewManager', 'Extend selection to start of document'),
1835 QApplication.translate( 1866 QCoreApplication.translate(
1836 'ViewManager', 'Extend selection to start of document'), 1867 'ViewManager', 'Extend selection to start of document'),
1837 0, 0, 1868 0, 0,
1838 self.editorActGrp, 'vm_edit_extend_selection_start_text') 1869 self.editorActGrp, 'vm_edit_extend_selection_start_text')
1839 if isMacPlatform(): 1870 if isMacPlatform():
1840 act.setShortcut(QKeySequence( 1871 act.setShortcut(QKeySequence(
1841 QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) 1872 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Up')))
1842 else: 1873 else:
1843 act.setShortcut(QKeySequence( 1874 act.setShortcut(QKeySequence(
1844 QApplication.translate('ViewManager', 'Ctrl+Shift+Home'))) 1875 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Home')))
1845 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND) 1876 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND)
1846 act.triggered.connect(self.esm.map) 1877 act.triggered.connect(self.esm.map)
1847 self.editActions.append(act) 1878 self.editActions.append(act)
1848 1879
1849 act = E5Action( 1880 act = E5Action(
1850 QApplication.translate( 1881 QCoreApplication.translate(
1851 'ViewManager', 'Extend selection to end of document'), 1882 'ViewManager', 'Extend selection to end of document'),
1852 QApplication.translate( 1883 QCoreApplication.translate(
1853 'ViewManager', 'Extend selection to end of document'), 1884 'ViewManager', 'Extend selection to end of document'),
1854 0, 0, 1885 0, 0,
1855 self.editorActGrp, 'vm_edit_extend_selection_end_text') 1886 self.editorActGrp, 'vm_edit_extend_selection_end_text')
1856 if isMacPlatform(): 1887 if isMacPlatform():
1857 act.setShortcut(QKeySequence( 1888 act.setShortcut(QKeySequence(
1858 QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) 1889 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Down')))
1859 else: 1890 else:
1860 act.setShortcut(QKeySequence( 1891 act.setShortcut(QKeySequence(
1861 QApplication.translate('ViewManager', 'Ctrl+Shift+End'))) 1892 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+End')))
1862 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND) 1893 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND)
1863 act.triggered.connect(self.esm.map) 1894 act.triggered.connect(self.esm.map)
1864 self.editActions.append(act) 1895 self.editActions.append(act)
1865 1896
1866 act = E5Action( 1897 act = E5Action(
1867 QApplication.translate('ViewManager', 'Delete previous character'), 1898 QCoreApplication.translate('ViewManager',
1868 QApplication.translate('ViewManager', 'Delete previous character'), 1899 'Delete previous character'),
1869 QKeySequence(QApplication.translate('ViewManager', 'Backspace')), 1900 QCoreApplication.translate('ViewManager',
1870 0, 1901 'Delete previous character'),
1871 self.editorActGrp, 'vm_edit_delete_previous_char') 1902 QKeySequence(QCoreApplication.translate('ViewManager',
1903 'Backspace')),
1904 0, self.editorActGrp, 'vm_edit_delete_previous_char')
1872 if isMacPlatform(): 1905 if isMacPlatform():
1873 act.setAlternateShortcut(QKeySequence( 1906 act.setAlternateShortcut(QKeySequence(
1874 QApplication.translate('ViewManager', 'Meta+H'))) 1907 QCoreApplication.translate('ViewManager', 'Meta+H')))
1875 else: 1908 else:
1876 act.setAlternateShortcut(QKeySequence( 1909 act.setAlternateShortcut(QKeySequence(
1877 QApplication.translate('ViewManager', 'Shift+Backspace'))) 1910 QCoreApplication.translate('ViewManager', 'Shift+Backspace')))
1878 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK) 1911 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK)
1879 act.triggered.connect(self.esm.map) 1912 act.triggered.connect(self.esm.map)
1880 self.editActions.append(act) 1913 self.editActions.append(act)
1881 1914
1882 act = E5Action( 1915 act = E5Action(
1883 QApplication.translate( 1916 QCoreApplication.translate(
1884 'ViewManager', 1917 'ViewManager',
1885 'Delete previous character if not at start of line'), 1918 'Delete previous character if not at start of line'),
1886 QApplication.translate( 1919 QCoreApplication.translate(
1887 'ViewManager', 1920 'ViewManager',
1888 'Delete previous character if not at start of line'), 1921 'Delete previous character if not at start of line'),
1889 0, 0, 1922 0, 0,
1890 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start') 1923 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start')
1891 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE) 1924 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE)
1892 act.triggered.connect(self.esm.map) 1925 act.triggered.connect(self.esm.map)
1893 self.editActions.append(act) 1926 self.editActions.append(act)
1894 1927
1895 act = E5Action( 1928 act = E5Action(
1896 QApplication.translate('ViewManager', 'Delete current character'), 1929 QCoreApplication.translate('ViewManager',
1897 QApplication.translate('ViewManager', 'Delete current character'), 1930 'Delete current character'),
1898 QKeySequence(QApplication.translate('ViewManager', 'Del')), 0, 1931 QCoreApplication.translate('ViewManager',
1899 self.editorActGrp, 'vm_edit_delete_current_char') 1932 'Delete current character'),
1933 QKeySequence(QCoreApplication.translate('ViewManager', 'Del')),
1934 0, self.editorActGrp, 'vm_edit_delete_current_char')
1900 if isMacPlatform(): 1935 if isMacPlatform():
1901 act.setAlternateShortcut(QKeySequence( 1936 act.setAlternateShortcut(QKeySequence(
1902 QApplication.translate('ViewManager', 'Meta+D'))) 1937 QCoreApplication.translate('ViewManager', 'Meta+D')))
1903 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR) 1938 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR)
1904 act.triggered.connect(self.esm.map) 1939 act.triggered.connect(self.esm.map)
1905 self.editActions.append(act) 1940 self.editActions.append(act)
1906 1941
1907 act = E5Action( 1942 act = E5Action(
1908 QApplication.translate('ViewManager', 'Delete word to left'), 1943 QCoreApplication.translate('ViewManager', 'Delete word to left'),
1909 QApplication.translate('ViewManager', 'Delete word to left'), 1944 QCoreApplication.translate('ViewManager', 'Delete word to left'),
1910 QKeySequence(QApplication.translate( 1945 QKeySequence(QCoreApplication.translate(
1911 'ViewManager', 'Ctrl+Backspace')), 1946 'ViewManager', 'Ctrl+Backspace')),
1912 0, 1947 0,
1913 self.editorActGrp, 'vm_edit_delete_word_left') 1948 self.editorActGrp, 'vm_edit_delete_word_left')
1914 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT) 1949 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT)
1915 act.triggered.connect(self.esm.map) 1950 act.triggered.connect(self.esm.map)
1916 self.editActions.append(act) 1951 self.editActions.append(act)
1917 1952
1918 act = E5Action( 1953 act = E5Action(
1919 QApplication.translate('ViewManager', 'Delete word to right'), 1954 QCoreApplication.translate('ViewManager', 'Delete word to right'),
1920 QApplication.translate('ViewManager', 'Delete word to right'), 1955 QCoreApplication.translate('ViewManager', 'Delete word to right'),
1921 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+Del')), 0, 1956 QKeySequence(QCoreApplication.translate('ViewManager',
1922 self.editorActGrp, 'vm_edit_delete_word_right') 1957 'Ctrl+Del')),
1958 0, self.editorActGrp, 'vm_edit_delete_word_right')
1923 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT) 1959 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT)
1924 act.triggered.connect(self.esm.map) 1960 act.triggered.connect(self.esm.map)
1925 self.editActions.append(act) 1961 self.editActions.append(act)
1926 1962
1927 act = E5Action( 1963 act = E5Action(
1928 QApplication.translate('ViewManager', 'Delete line to left'), 1964 QCoreApplication.translate('ViewManager', 'Delete line to left'),
1929 QApplication.translate('ViewManager', 'Delete line to left'), 1965 QCoreApplication.translate('ViewManager', 'Delete line to left'),
1930 QKeySequence(QApplication.translate( 1966 QKeySequence(QCoreApplication.translate(
1931 'ViewManager', 'Ctrl+Shift+Backspace')), 1967 'ViewManager', 'Ctrl+Shift+Backspace')),
1932 0, 1968 0,
1933 self.editorActGrp, 'vm_edit_delete_line_left') 1969 self.editorActGrp, 'vm_edit_delete_line_left')
1934 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT) 1970 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT)
1935 act.triggered.connect(self.esm.map) 1971 act.triggered.connect(self.esm.map)
1936 self.editActions.append(act) 1972 self.editActions.append(act)
1937 1973
1938 act = E5Action( 1974 act = E5Action(
1939 QApplication.translate('ViewManager', 'Delete line to right'), 1975 QCoreApplication.translate('ViewManager', 'Delete line to right'),
1940 QApplication.translate('ViewManager', 'Delete line to right'), 1976 QCoreApplication.translate('ViewManager', 'Delete line to right'),
1941 0, 0, 1977 0, 0,
1942 self.editorActGrp, 'vm_edit_delete_line_right') 1978 self.editorActGrp, 'vm_edit_delete_line_right')
1943 if isMacPlatform(): 1979 if isMacPlatform():
1944 act.setShortcut(QKeySequence( 1980 act.setShortcut(QKeySequence(
1945 QApplication.translate('ViewManager', 'Meta+K'))) 1981 QCoreApplication.translate('ViewManager', 'Meta+K')))
1946 else: 1982 else:
1947 act.setShortcut(QKeySequence( 1983 act.setShortcut(QKeySequence(
1948 QApplication.translate('ViewManager', 'Ctrl+Shift+Del'))) 1984 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Del')))
1949 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT) 1985 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT)
1950 act.triggered.connect(self.esm.map) 1986 act.triggered.connect(self.esm.map)
1951 self.editActions.append(act) 1987 self.editActions.append(act)
1952 1988
1953 act = E5Action( 1989 act = E5Action(
1954 QApplication.translate('ViewManager', 'Insert new line'), 1990 QCoreApplication.translate('ViewManager', 'Insert new line'),
1955 QApplication.translate('ViewManager', 'Insert new line'), 1991 QCoreApplication.translate('ViewManager', 'Insert new line'),
1956 QKeySequence(QApplication.translate('ViewManager', 'Return')), 1992 QKeySequence(QCoreApplication.translate('ViewManager', 'Return')),
1957 QKeySequence(QApplication.translate('ViewManager', 'Enter')), 1993 QKeySequence(QCoreApplication.translate('ViewManager', 'Enter')),
1958 self.editorActGrp, 'vm_edit_insert_line') 1994 self.editorActGrp, 'vm_edit_insert_line')
1959 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE) 1995 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE)
1960 act.triggered.connect(self.esm.map) 1996 act.triggered.connect(self.esm.map)
1961 self.editActions.append(act) 1997 self.editActions.append(act)
1962 1998
1963 act = E5Action( 1999 act = E5Action(
1964 QApplication.translate( 2000 QCoreApplication.translate(
1965 'ViewManager', 'Insert new line below current line'), 2001 'ViewManager', 'Insert new line below current line'),
1966 QApplication.translate( 2002 QCoreApplication.translate(
1967 'ViewManager', 'Insert new line below current line'), 2003 'ViewManager', 'Insert new line below current line'),
1968 QKeySequence(QApplication.translate( 2004 QKeySequence(QCoreApplication.translate(
1969 'ViewManager', 'Shift+Return')), 2005 'ViewManager', 'Shift+Return')),
1970 QKeySequence(QApplication.translate('ViewManager', 'Shift+Enter')), 2006 QKeySequence(QCoreApplication.translate('ViewManager',
2007 'Shift+Enter')),
1971 self.editorActGrp, 'vm_edit_insert_line_below') 2008 self.editorActGrp, 'vm_edit_insert_line_below')
1972 act.triggered.connect(self.__newLineBelow) 2009 act.triggered.connect(self.__newLineBelow)
1973 self.editActions.append(act) 2010 self.editActions.append(act)
1974 2011
1975 act = E5Action( 2012 act = E5Action(
1976 QApplication.translate('ViewManager', 'Delete current line'), 2013 QCoreApplication.translate('ViewManager', 'Delete current line'),
1977 QApplication.translate('ViewManager', 'Delete current line'), 2014 QCoreApplication.translate('ViewManager', 'Delete current line'),
1978 QKeySequence(QApplication.translate( 2015 QKeySequence(QCoreApplication.translate(
1979 'ViewManager', 'Ctrl+Shift+L')), 2016 'ViewManager', 'Ctrl+Shift+L')),
1980 0, 2017 0,
1981 self.editorActGrp, 'vm_edit_delete_current_line') 2018 self.editorActGrp, 'vm_edit_delete_current_line')
1982 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE) 2019 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE)
1983 act.triggered.connect(self.esm.map) 2020 act.triggered.connect(self.esm.map)
1984 self.editActions.append(act) 2021 self.editActions.append(act)
1985 2022
1986 act = E5Action( 2023 act = E5Action(
1987 QApplication.translate('ViewManager', 'Duplicate current line'), 2024 QCoreApplication.translate(
1988 QApplication.translate('ViewManager', 'Duplicate current line'), 2025 'ViewManager', 'Duplicate current line'),
1989 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+D')), 0, 2026 QCoreApplication.translate(
1990 self.editorActGrp, 'vm_edit_duplicate_current_line') 2027 'ViewManager', 'Duplicate current line'),
2028 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+D')),
2029 0, self.editorActGrp, 'vm_edit_duplicate_current_line')
1991 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE) 2030 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE)
1992 act.triggered.connect(self.esm.map) 2031 act.triggered.connect(self.esm.map)
1993 self.editActions.append(act) 2032 self.editActions.append(act)
1994 2033
1995 act = E5Action( 2034 act = E5Action(
1996 QApplication.translate( 2035 QCoreApplication.translate(
1997 'ViewManager', 'Swap current and previous lines'), 2036 'ViewManager', 'Swap current and previous lines'),
1998 QApplication.translate( 2037 QCoreApplication.translate(
1999 'ViewManager', 'Swap current and previous lines'), 2038 'ViewManager', 'Swap current and previous lines'),
2000 QKeySequence(QApplication.translate('ViewManager', 'Ctrl+T')), 0, 2039 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+T')),
2001 self.editorActGrp, 'vm_edit_swap_current_previous_line') 2040 0, self.editorActGrp, 'vm_edit_swap_current_previous_line')
2002 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE) 2041 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE)
2003 act.triggered.connect(self.esm.map) 2042 act.triggered.connect(self.esm.map)
2004 self.editActions.append(act) 2043 self.editActions.append(act)
2005 2044
2006 act = E5Action( 2045 act = E5Action(
2007 QApplication.translate('ViewManager', 'Cut current line'), 2046 QCoreApplication.translate('ViewManager', 'Cut current line'),
2008 QApplication.translate('ViewManager', 'Cut current line'), 2047 QCoreApplication.translate('ViewManager', 'Cut current line'),
2009 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+L')), 2048 QKeySequence(QCoreApplication.translate('ViewManager',
2010 0, 2049 'Alt+Shift+L')),
2011 self.editorActGrp, 'vm_edit_cut_current_line') 2050 0, self.editorActGrp, 'vm_edit_cut_current_line')
2012 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT) 2051 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT)
2013 act.triggered.connect(self.esm.map) 2052 act.triggered.connect(self.esm.map)
2014 self.editActions.append(act) 2053 self.editActions.append(act)
2015 2054
2016 act = E5Action( 2055 act = E5Action(
2017 QApplication.translate('ViewManager', 'Copy current line'), 2056 QCoreApplication.translate('ViewManager', 'Copy current line'),
2018 QApplication.translate('ViewManager', 'Copy current line'), 2057 QCoreApplication.translate('ViewManager', 'Copy current line'),
2019 QKeySequence(QApplication.translate( 2058 QKeySequence(QCoreApplication.translate(
2020 'ViewManager', 'Ctrl+Shift+T')), 2059 'ViewManager', 'Ctrl+Shift+T')),
2021 0, 2060 0,
2022 self.editorActGrp, 'vm_edit_copy_current_line') 2061 self.editorActGrp, 'vm_edit_copy_current_line')
2023 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY) 2062 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY)
2024 act.triggered.connect(self.esm.map) 2063 act.triggered.connect(self.esm.map)
2025 self.editActions.append(act) 2064 self.editActions.append(act)
2026 2065
2027 act = E5Action( 2066 act = E5Action(
2028 QApplication.translate('ViewManager', 'Toggle insert/overtype'), 2067 QCoreApplication.translate(
2029 QApplication.translate('ViewManager', 'Toggle insert/overtype'), 2068 'ViewManager', 'Toggle insert/overtype'),
2030 QKeySequence(QApplication.translate('ViewManager', 'Ins')), 0, 2069 QCoreApplication.translate(
2031 self.editorActGrp, 'vm_edit_toggle_insert_overtype') 2070 'ViewManager', 'Toggle insert/overtype'),
2071 QKeySequence(QCoreApplication.translate('ViewManager', 'Ins')),
2072 0, self.editorActGrp, 'vm_edit_toggle_insert_overtype')
2032 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE) 2073 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE)
2033 act.triggered.connect(self.esm.map) 2074 act.triggered.connect(self.esm.map)
2034 self.editActions.append(act) 2075 self.editActions.append(act)
2035 2076
2036 act = E5Action( 2077 act = E5Action(
2037 QApplication.translate( 2078 QCoreApplication.translate(
2038 'ViewManager', 'Move to end of display line'), 2079 'ViewManager', 'Move to end of display line'),
2039 QApplication.translate( 2080 QCoreApplication.translate(
2040 'ViewManager', 'Move to end of display line'), 2081 'ViewManager', 'Move to end of display line'),
2041 0, 0, 2082 0, 0,
2042 self.editorActGrp, 'vm_edit_move_end_displayed_line') 2083 self.editorActGrp, 'vm_edit_move_end_displayed_line')
2043 if isMacPlatform(): 2084 if isMacPlatform():
2044 act.setShortcut(QKeySequence( 2085 act.setShortcut(QKeySequence(
2045 QApplication.translate('ViewManager', 'Ctrl+Right'))) 2086 QCoreApplication.translate('ViewManager', 'Ctrl+Right')))
2046 else: 2087 else:
2047 act.setShortcut(QKeySequence( 2088 act.setShortcut(QKeySequence(
2048 QApplication.translate('ViewManager', 'Alt+End'))) 2089 QCoreApplication.translate('ViewManager', 'Alt+End')))
2049 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY) 2090 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY)
2050 act.triggered.connect(self.esm.map) 2091 act.triggered.connect(self.esm.map)
2051 self.editActions.append(act) 2092 self.editActions.append(act)
2052 2093
2053 act = E5Action( 2094 act = E5Action(
2054 QApplication.translate( 2095 QCoreApplication.translate(
2055 'ViewManager', 'Extend selection to end of display line'), 2096 'ViewManager', 'Extend selection to end of display line'),
2056 QApplication.translate( 2097 QCoreApplication.translate(
2057 'ViewManager', 'Extend selection to end of display line'), 2098 'ViewManager', 'Extend selection to end of display line'),
2058 0, 0, 2099 0, 0,
2059 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line') 2100 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line')
2060 if isMacPlatform(): 2101 if isMacPlatform():
2061 act.setShortcut(QKeySequence( 2102 act.setShortcut(QKeySequence(
2062 QApplication.translate('ViewManager', 'Ctrl+Shift+Right'))) 2103 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
2063 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND) 2104 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND)
2064 act.triggered.connect(self.esm.map) 2105 act.triggered.connect(self.esm.map)
2065 self.editActions.append(act) 2106 self.editActions.append(act)
2066 2107
2067 act = E5Action( 2108 act = E5Action(
2068 QApplication.translate('ViewManager', 'Formfeed'), 2109 QCoreApplication.translate('ViewManager', 'Formfeed'),
2069 QApplication.translate('ViewManager', 'Formfeed'), 2110 QCoreApplication.translate('ViewManager', 'Formfeed'),
2070 0, 0, 2111 0, 0,
2071 self.editorActGrp, 'vm_edit_formfeed') 2112 self.editorActGrp, 'vm_edit_formfeed')
2072 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) 2113 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED)
2073 act.triggered.connect(self.esm.map) 2114 act.triggered.connect(self.esm.map)
2074 self.editActions.append(act) 2115 self.editActions.append(act)
2075 2116
2076 act = E5Action( 2117 act = E5Action(
2077 QApplication.translate('ViewManager', 'Escape'), 2118 QCoreApplication.translate('ViewManager', 'Escape'),
2078 QApplication.translate('ViewManager', 'Escape'), 2119 QCoreApplication.translate('ViewManager', 'Escape'),
2079 QKeySequence(QApplication.translate('ViewManager', 'Esc')), 0, 2120 QKeySequence(QCoreApplication.translate('ViewManager', 'Esc')), 0,
2080 self.editorActGrp, 'vm_edit_escape') 2121 self.editorActGrp, 'vm_edit_escape')
2081 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL) 2122 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL)
2082 act.triggered.connect(self.esm.map) 2123 act.triggered.connect(self.esm.map)
2083 self.editActions.append(act) 2124 self.editActions.append(act)
2084 2125
2085 act = E5Action( 2126 act = E5Action(
2086 QApplication.translate( 2127 QCoreApplication.translate(
2087 'ViewManager', 'Extend rectangular selection down one line'), 2128 'ViewManager', 'Extend rectangular selection down one line'),
2088 QApplication.translate( 2129 QCoreApplication.translate(
2089 'ViewManager', 'Extend rectangular selection down one line'), 2130 'ViewManager', 'Extend rectangular selection down one line'),
2090 QKeySequence(QApplication.translate( 2131 QKeySequence(QCoreApplication.translate(
2091 'ViewManager', 'Alt+Ctrl+Down')), 2132 'ViewManager', 'Alt+Ctrl+Down')),
2092 0, 2133 0,
2093 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line') 2134 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line')
2094 if isMacPlatform(): 2135 if isMacPlatform():
2095 act.setAlternateShortcut(QKeySequence( 2136 act.setAlternateShortcut(QKeySequence(
2096 QApplication.translate('ViewManager', 'Meta+Alt+Shift+N'))) 2137 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+N')))
2097 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND) 2138 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND)
2098 act.triggered.connect(self.esm.map) 2139 act.triggered.connect(self.esm.map)
2099 self.editActions.append(act) 2140 self.editActions.append(act)
2100 2141
2101 act = E5Action( 2142 act = E5Action(
2102 QApplication.translate( 2143 QCoreApplication.translate(
2103 'ViewManager', 'Extend rectangular selection up one line'), 2144 'ViewManager', 'Extend rectangular selection up one line'),
2104 QApplication.translate( 2145 QCoreApplication.translate(
2105 'ViewManager', 'Extend rectangular selection up one line'), 2146 'ViewManager', 'Extend rectangular selection up one line'),
2106 QKeySequence(QApplication.translate('ViewManager', 'Alt+Ctrl+Up')), 2147 QKeySequence(QCoreApplication.translate('ViewManager',
2107 0, 2148 'Alt+Ctrl+Up')),
2108 self.editorActGrp, 'vm_edit_extend_rect_selection_up_line') 2149 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_line')
2109 if isMacPlatform(): 2150 if isMacPlatform():
2110 act.setAlternateShortcut(QKeySequence( 2151 act.setAlternateShortcut(QKeySequence(
2111 QApplication.translate('ViewManager', 'Meta+Alt+Shift+P'))) 2152 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+P')))
2112 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND) 2153 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND)
2113 act.triggered.connect(self.esm.map) 2154 act.triggered.connect(self.esm.map)
2114 self.editActions.append(act) 2155 self.editActions.append(act)
2115 2156
2116 act = E5Action( 2157 act = E5Action(
2117 QApplication.translate( 2158 QCoreApplication.translate(
2118 'ViewManager', 2159 'ViewManager',
2119 'Extend rectangular selection left one character'), 2160 'Extend rectangular selection left one character'),
2120 QApplication.translate( 2161 QCoreApplication.translate(
2121 'ViewManager', 2162 'ViewManager',
2122 'Extend rectangular selection left one character'), 2163 'Extend rectangular selection left one character'),
2123 QKeySequence(QApplication.translate( 2164 QKeySequence(QCoreApplication.translate(
2124 'ViewManager', 'Alt+Ctrl+Left')), 2165 'ViewManager', 'Alt+Ctrl+Left')),
2125 0, 2166 0,
2126 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char') 2167 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char')
2127 if isMacPlatform(): 2168 if isMacPlatform():
2128 act.setAlternateShortcut(QKeySequence( 2169 act.setAlternateShortcut(QKeySequence(
2129 QApplication.translate('ViewManager', 'Meta+Alt+Shift+B'))) 2170 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+B')))
2130 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND) 2171 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND)
2131 act.triggered.connect(self.esm.map) 2172 act.triggered.connect(self.esm.map)
2132 self.editActions.append(act) 2173 self.editActions.append(act)
2133 2174
2134 act = E5Action( 2175 act = E5Action(
2135 QApplication.translate( 2176 QCoreApplication.translate(
2136 'ViewManager', 2177 'ViewManager',
2137 'Extend rectangular selection right one character'), 2178 'Extend rectangular selection right one character'),
2138 QApplication.translate( 2179 QCoreApplication.translate(
2139 'ViewManager', 2180 'ViewManager',
2140 'Extend rectangular selection right one character'), 2181 'Extend rectangular selection right one character'),
2141 QKeySequence(QApplication.translate( 2182 QKeySequence(QCoreApplication.translate(
2142 'ViewManager', 'Alt+Ctrl+Right')), 2183 'ViewManager', 'Alt+Ctrl+Right')),
2143 0, 2184 0,
2144 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char') 2185 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char')
2145 if isMacPlatform(): 2186 if isMacPlatform():
2146 act.setAlternateShortcut(QKeySequence( 2187 act.setAlternateShortcut(QKeySequence(
2147 QApplication.translate('ViewManager', 'Meta+Alt+Shift+F'))) 2188 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+F')))
2148 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND) 2189 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND)
2149 act.triggered.connect(self.esm.map) 2190 act.triggered.connect(self.esm.map)
2150 self.editActions.append(act) 2191 self.editActions.append(act)
2151 2192
2152 act = E5Action( 2193 act = E5Action(
2153 QApplication.translate( 2194 QCoreApplication.translate(
2154 'ViewManager', 2195 'ViewManager',
2155 'Extend rectangular selection to first visible character in' 2196 'Extend rectangular selection to first visible character in'
2156 ' document line'), 2197 ' document line'),
2157 QApplication.translate( 2198 QCoreApplication.translate(
2158 'ViewManager', 2199 'ViewManager',
2159 'Extend rectangular selection to first visible character in' 2200 'Extend rectangular selection to first visible character in'
2160 ' document line'), 2201 ' document line'),
2161 0, 0, 2202 0, 0,
2162 self.editorActGrp, 2203 self.editorActGrp,
2163 'vm_edit_extend_rect_selection_first_visible_char') 2204 'vm_edit_extend_rect_selection_first_visible_char')
2164 if not isMacPlatform(): 2205 if not isMacPlatform():
2165 act.setShortcut(QKeySequence( 2206 act.setShortcut(QKeySequence(
2166 QApplication.translate('ViewManager', 'Alt+Shift+Home'))) 2207 QCoreApplication.translate('ViewManager', 'Alt+Shift+Home')))
2167 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND) 2208 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND)
2168 act.triggered.connect(self.esm.map) 2209 act.triggered.connect(self.esm.map)
2169 self.editActions.append(act) 2210 self.editActions.append(act)
2170 2211
2171 act = E5Action( 2212 act = E5Action(
2172 QApplication.translate( 2213 QCoreApplication.translate(
2173 'ViewManager', 2214 'ViewManager',
2174 'Extend rectangular selection to end of document line'), 2215 'Extend rectangular selection to end of document line'),
2175 QApplication.translate( 2216 QCoreApplication.translate(
2176 'ViewManager', 2217 'ViewManager',
2177 'Extend rectangular selection to end of document line'), 2218 'Extend rectangular selection to end of document line'),
2178 0, 0, 2219 0, 0,
2179 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line') 2220 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line')
2180 if isMacPlatform(): 2221 if isMacPlatform():
2181 act.setShortcut(QKeySequence( 2222 act.setShortcut(QKeySequence(
2182 QApplication.translate('ViewManager', 'Meta+Alt+Shift+E'))) 2223 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+E')))
2183 else: 2224 else:
2184 act.setShortcut(QKeySequence( 2225 act.setShortcut(QKeySequence(
2185 QApplication.translate('ViewManager', 'Alt+Shift+End'))) 2226 QCoreApplication.translate('ViewManager', 'Alt+Shift+End')))
2186 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND) 2227 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND)
2187 act.triggered.connect(self.esm.map) 2228 act.triggered.connect(self.esm.map)
2188 self.editActions.append(act) 2229 self.editActions.append(act)
2189 2230
2190 act = E5Action( 2231 act = E5Action(
2191 QApplication.translate( 2232 QCoreApplication.translate(
2192 'ViewManager', 2233 'ViewManager',
2193 'Extend rectangular selection up one page'), 2234 'Extend rectangular selection up one page'),
2194 QApplication.translate( 2235 QCoreApplication.translate(
2195 'ViewManager', 2236 'ViewManager',
2196 'Extend rectangular selection up one page'), 2237 'Extend rectangular selection up one page'),
2197 QKeySequence(QApplication.translate( 2238 QKeySequence(QCoreApplication.translate(
2198 'ViewManager', 'Alt+Shift+PgUp')), 2239 'ViewManager', 'Alt+Shift+PgUp')),
2199 0, 2240 0,
2200 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page') 2241 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page')
2201 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND) 2242 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND)
2202 act.triggered.connect(self.esm.map) 2243 act.triggered.connect(self.esm.map)
2203 self.editActions.append(act) 2244 self.editActions.append(act)
2204 2245
2205 act = E5Action( 2246 act = E5Action(
2206 QApplication.translate( 2247 QCoreApplication.translate(
2207 'ViewManager', 2248 'ViewManager',
2208 'Extend rectangular selection down one page'), 2249 'Extend rectangular selection down one page'),
2209 QApplication.translate( 2250 QCoreApplication.translate(
2210 'ViewManager', 2251 'ViewManager',
2211 'Extend rectangular selection down one page'), 2252 'Extend rectangular selection down one page'),
2212 QKeySequence(QApplication.translate( 2253 QKeySequence(QCoreApplication.translate(
2213 'ViewManager', 'Alt+Shift+PgDown')), 2254 'ViewManager', 'Alt+Shift+PgDown')),
2214 0, 2255 0,
2215 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page') 2256 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page')
2216 if isMacPlatform(): 2257 if isMacPlatform():
2217 act.setAlternateShortcut(QKeySequence( 2258 act.setAlternateShortcut(QKeySequence(
2218 QApplication.translate('ViewManager', 'Meta+Alt+Shift+V'))) 2259 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+V')))
2219 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND) 2260 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND)
2220 act.triggered.connect(self.esm.map) 2261 act.triggered.connect(self.esm.map)
2221 self.editActions.append(act) 2262 self.editActions.append(act)
2222 2263
2223 act = E5Action( 2264 act = E5Action(
2224 QApplication.translate( 2265 QCoreApplication.translate(
2225 'ViewManager', 'Duplicate current selection'), 2266 'ViewManager', 'Duplicate current selection'),
2226 QApplication.translate( 2267 QCoreApplication.translate(
2227 'ViewManager', 'Duplicate current selection'), 2268 'ViewManager', 'Duplicate current selection'),
2228 QKeySequence(QApplication.translate( 2269 QKeySequence(QCoreApplication.translate(
2229 'ViewManager', 'Ctrl+Shift+D')), 2270 'ViewManager', 'Ctrl+Shift+D')),
2230 0, 2271 0,
2231 self.editorActGrp, 'vm_edit_duplicate_current_selection') 2272 self.editorActGrp, 'vm_edit_duplicate_current_selection')
2232 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE) 2273 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE)
2233 act.triggered.connect(self.esm.map) 2274 act.triggered.connect(self.esm.map)
2234 self.editActions.append(act) 2275 self.editActions.append(act)
2235 2276
2236 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): 2277 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"):
2237 act = E5Action( 2278 act = E5Action(
2238 QApplication.translate( 2279 QCoreApplication.translate(
2239 'ViewManager', 'Scroll to start of document'), 2280 'ViewManager', 'Scroll to start of document'),
2240 QApplication.translate( 2281 QCoreApplication.translate(
2241 'ViewManager', 'Scroll to start of document'), 2282 'ViewManager', 'Scroll to start of document'),
2242 0, 0, 2283 0, 0,
2243 self.editorActGrp, 'vm_edit_scroll_start_text') 2284 self.editorActGrp, 'vm_edit_scroll_start_text')
2244 if isMacPlatform(): 2285 if isMacPlatform():
2245 act.setShortcut(QKeySequence( 2286 act.setShortcut(QKeySequence(
2246 QApplication.translate('ViewManager', 'Home'))) 2287 QCoreApplication.translate('ViewManager', 'Home')))
2247 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART) 2288 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART)
2248 act.triggered.connect(self.esm.map) 2289 act.triggered.connect(self.esm.map)
2249 self.editActions.append(act) 2290 self.editActions.append(act)
2250 2291
2251 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): 2292 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"):
2252 act = E5Action( 2293 act = E5Action(
2253 QApplication.translate( 2294 QCoreApplication.translate(
2254 'ViewManager', 'Scroll to end of document'), 2295 'ViewManager', 'Scroll to end of document'),
2255 QApplication.translate( 2296 QCoreApplication.translate(
2256 'ViewManager', 'Scroll to end of document'), 2297 'ViewManager', 'Scroll to end of document'),
2257 0, 0, 2298 0, 0,
2258 self.editorActGrp, 'vm_edit_scroll_end_text') 2299 self.editorActGrp, 'vm_edit_scroll_end_text')
2259 if isMacPlatform(): 2300 if isMacPlatform():
2260 act.setShortcut(QKeySequence( 2301 act.setShortcut(QKeySequence(
2261 QApplication.translate('ViewManager', 'End'))) 2302 QCoreApplication.translate('ViewManager', 'End')))
2262 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND) 2303 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND)
2263 act.triggered.connect(self.esm.map) 2304 act.triggered.connect(self.esm.map)
2264 self.editActions.append(act) 2305 self.editActions.append(act)
2265 2306
2266 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): 2307 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"):
2267 act = E5Action( 2308 act = E5Action(
2268 QApplication.translate( 2309 QCoreApplication.translate(
2269 'ViewManager', 'Scroll vertically to center current line'), 2310 'ViewManager', 'Scroll vertically to center current line'),
2270 QApplication.translate( 2311 QCoreApplication.translate(
2271 'ViewManager', 'Scroll vertically to center current line'), 2312 'ViewManager', 'Scroll vertically to center current line'),
2272 0, 0, 2313 0, 0,
2273 self.editorActGrp, 'vm_edit_scroll_vertically_center') 2314 self.editorActGrp, 'vm_edit_scroll_vertically_center')
2274 if isMacPlatform(): 2315 if isMacPlatform():
2275 act.setShortcut(QKeySequence( 2316 act.setShortcut(QKeySequence(
2276 QApplication.translate('ViewManager', 'Meta+L'))) 2317 QCoreApplication.translate('ViewManager', 'Meta+L')))
2277 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET) 2318 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET)
2278 act.triggered.connect(self.esm.map) 2319 act.triggered.connect(self.esm.map)
2279 self.editActions.append(act) 2320 self.editActions.append(act)
2280 2321
2281 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): 2322 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"):
2282 act = E5Action( 2323 act = E5Action(
2283 QApplication.translate( 2324 QCoreApplication.translate(
2284 'ViewManager', 'Move to end of next word'), 2325 'ViewManager', 'Move to end of next word'),
2285 QApplication.translate( 2326 QCoreApplication.translate(
2286 'ViewManager', 'Move to end of next word'), 2327 'ViewManager', 'Move to end of next word'),
2287 0, 0, 2328 0, 0,
2288 self.editorActGrp, 'vm_edit_move_end_next_word') 2329 self.editorActGrp, 'vm_edit_move_end_next_word')
2289 if isMacPlatform(): 2330 if isMacPlatform():
2290 act.setShortcut(QKeySequence( 2331 act.setShortcut(QKeySequence(
2291 QApplication.translate('ViewManager', 'Alt+Right'))) 2332 QCoreApplication.translate('ViewManager', 'Alt+Right')))
2292 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND) 2333 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND)
2293 act.triggered.connect(self.esm.map) 2334 act.triggered.connect(self.esm.map)
2294 self.editActions.append(act) 2335 self.editActions.append(act)
2295 2336
2296 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): 2337 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"):
2297 act = E5Action( 2338 act = E5Action(
2298 QApplication.translate( 2339 QCoreApplication.translate(
2299 'ViewManager', 'Extend selection to end of next word'), 2340 'ViewManager', 'Extend selection to end of next word'),
2300 QApplication.translate( 2341 QCoreApplication.translate(
2301 'ViewManager', 'Extend selection to end of next word'), 2342 'ViewManager', 'Extend selection to end of next word'),
2302 0, 0, 2343 0, 0,
2303 self.editorActGrp, 'vm_edit_select_end_next_word') 2344 self.editorActGrp, 'vm_edit_select_end_next_word')
2304 if isMacPlatform(): 2345 if isMacPlatform():
2305 act.setShortcut(QKeySequence( 2346 act.setShortcut(QKeySequence(
2306 QApplication.translate('ViewManager', 'Alt+Shift+Right'))) 2347 QCoreApplication.translate('ViewManager',
2348 'Alt+Shift+Right')))
2307 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND) 2349 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND)
2308 act.triggered.connect(self.esm.map) 2350 act.triggered.connect(self.esm.map)
2309 self.editActions.append(act) 2351 self.editActions.append(act)
2310 2352
2311 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): 2353 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"):
2312 act = E5Action( 2354 act = E5Action(
2313 QApplication.translate( 2355 QCoreApplication.translate(
2314 'ViewManager', 'Move to end of previous word'), 2356 'ViewManager', 'Move to end of previous word'),
2315 QApplication.translate( 2357 QCoreApplication.translate(
2316 'ViewManager', 'Move to end of previous word'), 2358 'ViewManager', 'Move to end of previous word'),
2317 0, 0, 2359 0, 0,
2318 self.editorActGrp, 'vm_edit_move_end_previous_word') 2360 self.editorActGrp, 'vm_edit_move_end_previous_word')
2319 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) 2361 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND)
2320 act.triggered.connect(self.esm.map) 2362 act.triggered.connect(self.esm.map)
2321 self.editActions.append(act) 2363 self.editActions.append(act)
2322 2364
2323 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): 2365 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"):
2324 act = E5Action( 2366 act = E5Action(
2325 QApplication.translate( 2367 QCoreApplication.translate(
2326 'ViewManager', 'Extend selection to end of previous word'), 2368 'ViewManager', 'Extend selection to end of previous word'),
2327 QApplication.translate( 2369 QCoreApplication.translate(
2328 'ViewManager', 'Extend selection to end of previous word'), 2370 'ViewManager', 'Extend selection to end of previous word'),
2329 0, 0, 2371 0, 0,
2330 self.editorActGrp, 'vm_edit_select_end_previous_word') 2372 self.editorActGrp, 'vm_edit_select_end_previous_word')
2331 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) 2373 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND)
2332 act.triggered.connect(self.esm.map) 2374 act.triggered.connect(self.esm.map)
2333 self.editActions.append(act) 2375 self.editActions.append(act)
2334 2376
2335 if hasattr(QsciScintilla, "SCI_HOME"): 2377 if hasattr(QsciScintilla, "SCI_HOME"):
2336 act = E5Action( 2378 act = E5Action(
2337 QApplication.translate( 2379 QCoreApplication.translate(
2338 'ViewManager', 'Move to start of document line'), 2380 'ViewManager', 'Move to start of document line'),
2339 QApplication.translate( 2381 QCoreApplication.translate(
2340 'ViewManager', 'Move to start of document line'), 2382 'ViewManager', 'Move to start of document line'),
2341 0, 0, 2383 0, 0,
2342 self.editorActGrp, 'vm_edit_move_start_document_line') 2384 self.editorActGrp, 'vm_edit_move_start_document_line')
2343 if isMacPlatform(): 2385 if isMacPlatform():
2344 act.setShortcut(QKeySequence( 2386 act.setShortcut(QKeySequence(
2345 QApplication.translate('ViewManager', 'Meta+A'))) 2387 QCoreApplication.translate('ViewManager', 'Meta+A')))
2346 self.esm.setMapping(act, QsciScintilla.SCI_HOME) 2388 self.esm.setMapping(act, QsciScintilla.SCI_HOME)
2347 act.triggered.connect(self.esm.map) 2389 act.triggered.connect(self.esm.map)
2348 self.editActions.append(act) 2390 self.editActions.append(act)
2349 2391
2350 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"): 2392 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"):
2351 act = E5Action( 2393 act = E5Action(
2352 QApplication.translate( 2394 QCoreApplication.translate(
2353 'ViewManager', 2395 'ViewManager',
2354 'Extend selection to start of document line'), 2396 'Extend selection to start of document line'),
2355 QApplication.translate( 2397 QCoreApplication.translate(
2356 'ViewManager', 2398 'ViewManager',
2357 'Extend selection to start of document line'), 2399 'Extend selection to start of document line'),
2358 0, 0, 2400 0, 0,
2359 self.editorActGrp, 2401 self.editorActGrp,
2360 'vm_edit_extend_selection_start_document_line') 2402 'vm_edit_extend_selection_start_document_line')
2361 if isMacPlatform(): 2403 if isMacPlatform():
2362 act.setShortcut(QKeySequence( 2404 act.setShortcut(QKeySequence(
2363 QApplication.translate('ViewManager', 'Meta+Shift+A'))) 2405 QCoreApplication.translate('ViewManager', 'Meta+Shift+A')))
2364 self.esm.setMapping(act, QsciScintilla.SCI_HOME) 2406 self.esm.setMapping(act, QsciScintilla.SCI_HOME)
2365 act.triggered.connect(self.esm.map) 2407 act.triggered.connect(self.esm.map)
2366 self.editActions.append(act) 2408 self.editActions.append(act)
2367 2409
2368 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"): 2410 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"):
2369 act = E5Action( 2411 act = E5Action(
2370 QApplication.translate( 2412 QCoreApplication.translate(
2371 'ViewManager', 2413 'ViewManager',
2372 'Extend rectangular selection to start of document line'), 2414 'Extend rectangular selection to start of document line'),
2373 QApplication.translate( 2415 QCoreApplication.translate(
2374 'ViewManager', 2416 'ViewManager',
2375 'Extend rectangular selection to start of document line'), 2417 'Extend rectangular selection to start of document line'),
2376 0, 0, 2418 0, 0,
2377 self.editorActGrp, 'vm_edit_select_rect_start_line') 2419 self.editorActGrp, 'vm_edit_select_rect_start_line')
2378 if isMacPlatform(): 2420 if isMacPlatform():
2379 act.setShortcut(QKeySequence( 2421 act.setShortcut(QKeySequence(
2380 QApplication.translate('ViewManager', 'Meta+Alt+Shift+A'))) 2422 QCoreApplication.translate('ViewManager',
2423 'Meta+Alt+Shift+A')))
2381 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND) 2424 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND)
2382 act.triggered.connect(self.esm.map) 2425 act.triggered.connect(self.esm.map)
2383 self.editActions.append(act) 2426 self.editActions.append(act)
2384 2427
2385 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"): 2428 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"):
2386 act = E5Action( 2429 act = E5Action(
2387 QApplication.translate( 2430 QCoreApplication.translate(
2388 'ViewManager', 2431 'ViewManager',
2389 'Extend selection to start of display line'), 2432 'Extend selection to start of display line'),
2390 QApplication.translate( 2433 QCoreApplication.translate(
2391 'ViewManager', 2434 'ViewManager',
2392 'Extend selection to start of display line'), 2435 'Extend selection to start of display line'),
2393 0, 0, 2436 0, 0,
2394 self.editorActGrp, 2437 self.editorActGrp,
2395 'vm_edit_extend_selection_start_display_line') 2438 'vm_edit_extend_selection_start_display_line')
2396 if isMacPlatform(): 2439 if isMacPlatform():
2397 act.setShortcut(QKeySequence( 2440 act.setShortcut(QKeySequence(
2398 QApplication.translate('ViewManager', 'Ctrl+Shift+Left'))) 2441 QCoreApplication.translate('ViewManager',
2442 'Ctrl+Shift+Left')))
2399 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND) 2443 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND)
2400 act.triggered.connect(self.esm.map) 2444 act.triggered.connect(self.esm.map)
2401 self.editActions.append(act) 2445 self.editActions.append(act)
2402 2446
2403 if hasattr(QsciScintilla, "SCI_HOMEWRAP"): 2447 if hasattr(QsciScintilla, "SCI_HOMEWRAP"):
2404 act = E5Action( 2448 act = E5Action(
2405 QApplication.translate( 2449 QCoreApplication.translate(
2406 'ViewManager', 2450 'ViewManager',
2407 'Move to start of display or document line'), 2451 'Move to start of display or document line'),
2408 QApplication.translate( 2452 QCoreApplication.translate(
2409 'ViewManager', 2453 'ViewManager',
2410 'Move to start of display or document line'), 2454 'Move to start of display or document line'),
2411 0, 0, 2455 0, 0,
2412 self.editorActGrp, 'vm_edit_move_start_display_document_line') 2456 self.editorActGrp, 'vm_edit_move_start_display_document_line')
2413 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP) 2457 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP)
2414 act.triggered.connect(self.esm.map) 2458 act.triggered.connect(self.esm.map)
2415 self.editActions.append(act) 2459 self.editActions.append(act)
2416 2460
2417 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"): 2461 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"):
2418 act = E5Action( 2462 act = E5Action(
2419 QApplication.translate( 2463 QCoreApplication.translate(
2420 'ViewManager', 2464 'ViewManager',
2421 'Extend selection to start of display or document line'), 2465 'Extend selection to start of display or document line'),
2422 QApplication.translate( 2466 QCoreApplication.translate(
2423 'ViewManager', 2467 'ViewManager',
2424 'Extend selection to start of display or document line'), 2468 'Extend selection to start of display or document line'),
2425 0, 0, 2469 0, 0,
2426 self.editorActGrp, 2470 self.editorActGrp,
2427 'vm_edit_extend_selection_start_display_document_line') 2471 'vm_edit_extend_selection_start_display_document_line')
2429 act.triggered.connect(self.esm.map) 2473 act.triggered.connect(self.esm.map)
2430 self.editActions.append(act) 2474 self.editActions.append(act)
2431 2475
2432 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): 2476 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"):
2433 act = E5Action( 2477 act = E5Action(
2434 QApplication.translate( 2478 QCoreApplication.translate(
2435 'ViewManager', 2479 'ViewManager',
2436 'Move to first visible character in display or document' 2480 'Move to first visible character in display or document'
2437 ' line'), 2481 ' line'),
2438 QApplication.translate( 2482 QCoreApplication.translate(
2439 'ViewManager', 2483 'ViewManager',
2440 'Move to first visible character in display or document' 2484 'Move to first visible character in display or document'
2441 ' line'), 2485 ' line'),
2442 0, 0, 2486 0, 0,
2443 self.editorActGrp, 2487 self.editorActGrp,
2446 act.triggered.connect(self.esm.map) 2490 act.triggered.connect(self.esm.map)
2447 self.editActions.append(act) 2491 self.editActions.append(act)
2448 2492
2449 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"): 2493 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"):
2450 act = E5Action( 2494 act = E5Action(
2451 QApplication.translate( 2495 QCoreApplication.translate(
2452 'ViewManager', 2496 'ViewManager',
2453 'Extend selection to first visible character in' 2497 'Extend selection to first visible character in'
2454 ' display or document line'), 2498 ' display or document line'),
2455 QApplication.translate( 2499 QCoreApplication.translate(
2456 'ViewManager', 2500 'ViewManager',
2457 'Extend selection to first visible character in' 2501 'Extend selection to first visible character in'
2458 ' display or document line'), 2502 ' display or document line'),
2459 0, 0, 2503 0, 0,
2460 self.editorActGrp, 2504 self.editorActGrp,
2463 act.triggered.connect(self.esm.map) 2507 act.triggered.connect(self.esm.map)
2464 self.editActions.append(act) 2508 self.editActions.append(act)
2465 2509
2466 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"): 2510 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"):
2467 act = E5Action( 2511 act = E5Action(
2468 QApplication.translate( 2512 QCoreApplication.translate(
2469 'ViewManager', 2513 'ViewManager',
2470 'Move to end of display or document line'), 2514 'Move to end of display or document line'),
2471 QApplication.translate( 2515 QCoreApplication.translate(
2472 'ViewManager', 2516 'ViewManager',
2473 'Move to end of display or document line'), 2517 'Move to end of display or document line'),
2474 0, 0, 2518 0, 0,
2475 self.editorActGrp, 'vm_edit_end_start_display_document_line') 2519 self.editorActGrp, 'vm_edit_end_start_display_document_line')
2476 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP) 2520 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP)
2477 act.triggered.connect(self.esm.map) 2521 act.triggered.connect(self.esm.map)
2478 self.editActions.append(act) 2522 self.editActions.append(act)
2479 2523
2480 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"): 2524 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"):
2481 act = E5Action( 2525 act = E5Action(
2482 QApplication.translate( 2526 QCoreApplication.translate(
2483 'ViewManager', 2527 'ViewManager',
2484 'Extend selection to end of display or document line'), 2528 'Extend selection to end of display or document line'),
2485 QApplication.translate( 2529 QCoreApplication.translate(
2486 'ViewManager', 2530 'ViewManager',
2487 'Extend selection to end of display or document line'), 2531 'Extend selection to end of display or document line'),
2488 0, 0, 2532 0, 0,
2489 self.editorActGrp, 2533 self.editorActGrp,
2490 'vm_edit_extend_selection_end_display_document_line') 2534 'vm_edit_extend_selection_end_display_document_line')
2492 act.triggered.connect(self.esm.map) 2536 act.triggered.connect(self.esm.map)
2493 self.editActions.append(act) 2537 self.editActions.append(act)
2494 2538
2495 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): 2539 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"):
2496 act = E5Action( 2540 act = E5Action(
2497 QApplication.translate( 2541 QCoreApplication.translate(
2498 'ViewManager', 'Stuttered move up one page'), 2542 'ViewManager', 'Stuttered move up one page'),
2499 QApplication.translate( 2543 QCoreApplication.translate(
2500 'ViewManager', 'Stuttered move up one page'), 2544 'ViewManager', 'Stuttered move up one page'),
2501 0, 0, 2545 0, 0,
2502 self.editorActGrp, 'vm_edit_stuttered_move_up_page') 2546 self.editorActGrp, 'vm_edit_stuttered_move_up_page')
2503 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) 2547 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP)
2504 act.triggered.connect(self.esm.map) 2548 act.triggered.connect(self.esm.map)
2505 self.editActions.append(act) 2549 self.editActions.append(act)
2506 2550
2507 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"): 2551 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"):
2508 act = E5Action( 2552 act = E5Action(
2509 QApplication.translate( 2553 QCoreApplication.translate(
2510 'ViewManager', 'Stuttered extend selection up one page'), 2554 'ViewManager', 'Stuttered extend selection up one page'),
2511 QApplication.translate( 2555 QCoreApplication.translate(
2512 'ViewManager', 'Stuttered extend selection up one page'), 2556 'ViewManager', 'Stuttered extend selection up one page'),
2513 0, 0, 2557 0, 0,
2514 self.editorActGrp, 2558 self.editorActGrp,
2515 'vm_edit_stuttered_extend_selection_up_page') 2559 'vm_edit_stuttered_extend_selection_up_page')
2516 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND) 2560 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND)
2517 act.triggered.connect(self.esm.map) 2561 act.triggered.connect(self.esm.map)
2518 self.editActions.append(act) 2562 self.editActions.append(act)
2519 2563
2520 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): 2564 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"):
2521 act = E5Action( 2565 act = E5Action(
2522 QApplication.translate( 2566 QCoreApplication.translate(
2523 'ViewManager', 'Stuttered move down one page'), 2567 'ViewManager', 'Stuttered move down one page'),
2524 QApplication.translate( 2568 QCoreApplication.translate(
2525 'ViewManager', 'Stuttered move down one page'), 2569 'ViewManager', 'Stuttered move down one page'),
2526 0, 0, 2570 0, 0,
2527 self.editorActGrp, 'vm_edit_stuttered_move_down_page') 2571 self.editorActGrp, 'vm_edit_stuttered_move_down_page')
2528 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) 2572 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN)
2529 act.triggered.connect(self.esm.map) 2573 act.triggered.connect(self.esm.map)
2530 self.editActions.append(act) 2574 self.editActions.append(act)
2531 2575
2532 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"): 2576 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"):
2533 act = E5Action( 2577 act = E5Action(
2534 QApplication.translate( 2578 QCoreApplication.translate(
2535 'ViewManager', 'Stuttered extend selection down one page'), 2579 'ViewManager', 'Stuttered extend selection down one page'),
2536 QApplication.translate( 2580 QCoreApplication.translate(
2537 'ViewManager', 'Stuttered extend selection down one page'), 2581 'ViewManager', 'Stuttered extend selection down one page'),
2538 0, 0, 2582 0, 0,
2539 self.editorActGrp, 2583 self.editorActGrp,
2540 'vm_edit_stuttered_extend_selection_down_page') 2584 'vm_edit_stuttered_extend_selection_down_page')
2541 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND) 2585 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND)
2542 act.triggered.connect(self.esm.map) 2586 act.triggered.connect(self.esm.map)
2543 self.editActions.append(act) 2587 self.editActions.append(act)
2544 2588
2545 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"): 2589 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"):
2546 act = E5Action( 2590 act = E5Action(
2547 QApplication.translate( 2591 QCoreApplication.translate(
2548 'ViewManager', 'Delete right to end of next word'), 2592 'ViewManager', 'Delete right to end of next word'),
2549 QApplication.translate( 2593 QCoreApplication.translate(
2550 'ViewManager', 'Delete right to end of next word'), 2594 'ViewManager', 'Delete right to end of next word'),
2551 0, 0, 2595 0, 0,
2552 self.editorActGrp, 'vm_edit_delete_right_end_next_word') 2596 self.editorActGrp, 'vm_edit_delete_right_end_next_word')
2553 if isMacPlatform(): 2597 if isMacPlatform():
2554 act.setShortcut(QKeySequence( 2598 act.setShortcut(QKeySequence(
2555 QApplication.translate('ViewManager', 'Alt+Del'))) 2599 QCoreApplication.translate('ViewManager', 'Alt+Del')))
2556 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND) 2600 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND)
2557 act.triggered.connect(self.esm.map) 2601 act.triggered.connect(self.esm.map)
2558 self.editActions.append(act) 2602 self.editActions.append(act)
2559 2603
2560 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"): 2604 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"):
2561 act = E5Action( 2605 act = E5Action(
2562 QApplication.translate( 2606 QCoreApplication.translate(
2563 'ViewManager', 'Move selected lines up one line'), 2607 'ViewManager', 'Move selected lines up one line'),
2564 QApplication.translate( 2608 QCoreApplication.translate(
2565 'ViewManager', 'Move selected lines up one line'), 2609 'ViewManager', 'Move selected lines up one line'),
2566 0, 0, 2610 0, 0,
2567 self.editorActGrp, 'vm_edit_move_selection_up_one_line') 2611 self.editorActGrp, 'vm_edit_move_selection_up_one_line')
2568 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP) 2612 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP)
2569 act.triggered.connect(self.esm.map) 2613 act.triggered.connect(self.esm.map)
2570 self.editActions.append(act) 2614 self.editActions.append(act)
2571 2615
2572 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"): 2616 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"):
2573 act = E5Action( 2617 act = E5Action(
2574 QApplication.translate( 2618 QCoreApplication.translate(
2575 'ViewManager', 'Move selected lines down one line'), 2619 'ViewManager', 'Move selected lines down one line'),
2576 QApplication.translate( 2620 QCoreApplication.translate(
2577 'ViewManager', 'Move selected lines down one line'), 2621 'ViewManager', 'Move selected lines down one line'),
2578 0, 0, 2622 0, 0,
2579 self.editorActGrp, 'vm_edit_move_selection_down_one_line') 2623 self.editorActGrp, 'vm_edit_move_selection_down_one_line')
2580 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN) 2624 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN)
2581 act.triggered.connect(self.esm.map) 2625 act.triggered.connect(self.esm.map)
2582 self.editActions.append(act) 2626 self.editActions.append(act)
2583 2627
2584 self.editorActGrp.setEnabled(False) 2628 self.editorActGrp.setEnabled(False)
2585 2629
2586 self.editLowerCaseAct = E5Action( 2630 self.editLowerCaseAct = E5Action(
2587 QApplication.translate( 2631 QCoreApplication.translate(
2588 'ViewManager', 'Convert selection to lower case'), 2632 'ViewManager', 'Convert selection to lower case'),
2589 QApplication.translate( 2633 QCoreApplication.translate(
2590 'ViewManager', 'Convert selection to lower case'), 2634 'ViewManager', 'Convert selection to lower case'),
2591 QKeySequence(QApplication.translate('ViewManager', 'Alt+Shift+U')), 2635 QKeySequence(QCoreApplication.translate('ViewManager',
2592 0, 2636 'Alt+Shift+U')),
2593 self.editActGrp, 'vm_edit_convert_selection_lower') 2637 0, self.editActGrp, 'vm_edit_convert_selection_lower')
2594 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE) 2638 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE)
2595 self.editLowerCaseAct.triggered.connect(self.esm.map) 2639 self.editLowerCaseAct.triggered.connect(self.esm.map)
2596 self.editActions.append(self.editLowerCaseAct) 2640 self.editActions.append(self.editLowerCaseAct)
2597 2641
2598 self.editUpperCaseAct = E5Action( 2642 self.editUpperCaseAct = E5Action(
2599 QApplication.translate( 2643 QCoreApplication.translate(
2600 'ViewManager', 'Convert selection to upper case'), 2644 'ViewManager', 'Convert selection to upper case'),
2601 QApplication.translate( 2645 QCoreApplication.translate(
2602 'ViewManager', 'Convert selection to upper case'), 2646 'ViewManager', 'Convert selection to upper case'),
2603 QKeySequence(QApplication.translate( 2647 QKeySequence(QCoreApplication.translate(
2604 'ViewManager', 'Ctrl+Shift+U')), 2648 'ViewManager', 'Ctrl+Shift+U')),
2605 0, 2649 0,
2606 self.editActGrp, 'vm_edit_convert_selection_upper') 2650 self.editActGrp, 'vm_edit_convert_selection_upper')
2607 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE) 2651 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE)
2608 self.editUpperCaseAct.triggered.connect(self.esm.map) 2652 self.editUpperCaseAct.triggered.connect(self.esm.map)
2613 Public method to create the Edit menu. 2657 Public method to create the Edit menu.
2614 2658
2615 @return the generated menu 2659 @return the generated menu
2616 """ 2660 """
2617 autocompletionMenu = QMenu( 2661 autocompletionMenu = QMenu(
2618 QApplication.translate('ViewManager', '&Autocomplete'), self.ui) 2662 QCoreApplication.translate('ViewManager', '&Autocomplete'),
2663 self.ui)
2619 autocompletionMenu.setTearOffEnabled(True) 2664 autocompletionMenu.setTearOffEnabled(True)
2620 autocompletionMenu.addAction(self.autoCompleteAct) 2665 autocompletionMenu.addAction(self.autoCompleteAct)
2621 autocompletionMenu.addAction(self.autoCompleteFromDocAct) 2666 autocompletionMenu.addAction(self.autoCompleteFromDocAct)
2622 autocompletionMenu.addAction(self.autoCompleteFromAPIsAct) 2667 autocompletionMenu.addAction(self.autoCompleteFromAPIsAct)
2623 autocompletionMenu.addAction(self.autoCompleteFromAllAct) 2668 autocompletionMenu.addAction(self.autoCompleteFromAllAct)
2624 autocompletionMenu.addSeparator() 2669 autocompletionMenu.addSeparator()
2625 autocompletionMenu.addAction(self.calltipsAct) 2670 autocompletionMenu.addAction(self.calltipsAct)
2626 2671
2627 searchMenu = \ 2672 searchMenu = QMenu(
2628 QMenu(QApplication.translate('ViewManager', '&Search'), self.ui) 2673 QCoreApplication.translate('ViewManager', '&Search'),
2674 self.ui)
2629 searchMenu.setTearOffEnabled(True) 2675 searchMenu.setTearOffEnabled(True)
2630 searchMenu.addAction(self.quickSearchAct) 2676 searchMenu.addAction(self.quickSearchAct)
2631 searchMenu.addAction(self.quickSearchBackAct) 2677 searchMenu.addAction(self.quickSearchBackAct)
2632 searchMenu.addAction(self.searchAct) 2678 searchMenu.addAction(self.searchAct)
2633 searchMenu.addAction(self.searchNextAct) 2679 searchMenu.addAction(self.searchNextAct)
2642 searchMenu.addAction(self.replaceFilesAct) 2688 searchMenu.addAction(self.replaceFilesAct)
2643 searchMenu.addSeparator() 2689 searchMenu.addSeparator()
2644 searchMenu.addAction(self.searchOpenFilesAct) 2690 searchMenu.addAction(self.searchOpenFilesAct)
2645 searchMenu.addAction(self.replaceOpenFilesAct) 2691 searchMenu.addAction(self.replaceOpenFilesAct)
2646 2692
2647 menu = QMenu(QApplication.translate('ViewManager', '&Edit'), self.ui) 2693 menu = QMenu(QCoreApplication.translate('ViewManager', '&Edit'),
2694 self.ui)
2648 menu.setTearOffEnabled(True) 2695 menu.setTearOffEnabled(True)
2649 menu.addAction(self.undoAct) 2696 menu.addAction(self.undoAct)
2650 menu.addAction(self.redoAct) 2697 menu.addAction(self.redoAct)
2651 menu.addAction(self.revertAct) 2698 menu.addAction(self.revertAct)
2652 menu.addSeparator() 2699 menu.addSeparator()
2694 2741
2695 @param toolbarManager reference to a toolbar manager object 2742 @param toolbarManager reference to a toolbar manager object
2696 (E5ToolBarManager) 2743 (E5ToolBarManager)
2697 @return the generated toolbar 2744 @return the generated toolbar
2698 """ 2745 """
2699 tb = QToolBar(QApplication.translate('ViewManager', 'Edit'), self.ui) 2746 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Edit'),
2747 self.ui)
2700 tb.setIconSize(UI.Config.ToolBarIconSize) 2748 tb.setIconSize(UI.Config.ToolBarIconSize)
2701 tb.setObjectName("EditToolbar") 2749 tb.setObjectName("EditToolbar")
2702 tb.setToolTip(QApplication.translate('ViewManager', 'Edit')) 2750 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Edit'))
2703 2751
2704 tb.addAction(self.undoAct) 2752 tb.addAction(self.undoAct)
2705 tb.addAction(self.redoAct) 2753 tb.addAction(self.redoAct)
2706 tb.addSeparator() 2754 tb.addSeparator()
2707 tb.addAction(self.cutAct) 2755 tb.addAction(self.cutAct)
2731 commands. 2779 commands.
2732 """ 2780 """
2733 self.searchActGrp = createActionGroup(self) 2781 self.searchActGrp = createActionGroup(self)
2734 2782
2735 self.searchAct = E5Action( 2783 self.searchAct = E5Action(
2736 QApplication.translate('ViewManager', 'Search'), 2784 QCoreApplication.translate('ViewManager', 'Search'),
2737 UI.PixmapCache.getIcon("find.png"), 2785 UI.PixmapCache.getIcon("find.png"),
2738 QApplication.translate('ViewManager', '&Search...'), 2786 QCoreApplication.translate('ViewManager', '&Search...'),
2739 QKeySequence(QApplication.translate( 2787 QKeySequence(QCoreApplication.translate(
2740 'ViewManager', "Ctrl+F", "Search|Search")), 2788 'ViewManager', "Ctrl+F", "Search|Search")),
2741 0, 2789 0,
2742 self.searchActGrp, 'vm_search') 2790 self.searchActGrp, 'vm_search')
2743 self.searchAct.setStatusTip(QApplication.translate( 2791 self.searchAct.setStatusTip(QCoreApplication.translate(
2744 'ViewManager', 'Search for a text')) 2792 'ViewManager', 'Search for a text'))
2745 self.searchAct.setWhatsThis(QApplication.translate( 2793 self.searchAct.setWhatsThis(QCoreApplication.translate(
2746 'ViewManager', 2794 'ViewManager',
2747 """<b>Search</b>""" 2795 """<b>Search</b>"""
2748 """<p>Search for some text in the current editor. A""" 2796 """<p>Search for some text in the current editor. A"""
2749 """ dialog is shown to enter the searchtext and options""" 2797 """ dialog is shown to enter the searchtext and options"""
2750 """ for the search.</p>""" 2798 """ for the search.</p>"""
2751 )) 2799 ))
2752 self.searchAct.triggered.connect(self.__search) 2800 self.searchAct.triggered.connect(self.__search)
2753 self.searchActions.append(self.searchAct) 2801 self.searchActions.append(self.searchAct)
2754 2802
2755 self.searchNextAct = E5Action( 2803 self.searchNextAct = E5Action(
2756 QApplication.translate( 2804 QCoreApplication.translate(
2757 'ViewManager', 'Search next'), 2805 'ViewManager', 'Search next'),
2758 UI.PixmapCache.getIcon("findNext.png"), 2806 UI.PixmapCache.getIcon("findNext.png"),
2759 QApplication.translate('ViewManager', 'Search &next'), 2807 QCoreApplication.translate('ViewManager', 'Search &next'),
2760 QKeySequence(QApplication.translate( 2808 QKeySequence(QCoreApplication.translate(
2761 'ViewManager', "F3", "Search|Search next")), 2809 'ViewManager', "F3", "Search|Search next")),
2762 0, 2810 0,
2763 self.searchActGrp, 'vm_search_next') 2811 self.searchActGrp, 'vm_search_next')
2764 self.searchNextAct.setStatusTip(QApplication.translate( 2812 self.searchNextAct.setStatusTip(QCoreApplication.translate(
2765 'ViewManager', 'Search next occurrence of text')) 2813 'ViewManager', 'Search next occurrence of text'))
2766 self.searchNextAct.setWhatsThis(QApplication.translate( 2814 self.searchNextAct.setWhatsThis(QCoreApplication.translate(
2767 'ViewManager', 2815 'ViewManager',
2768 """<b>Search next</b>""" 2816 """<b>Search next</b>"""
2769 """<p>Search the next occurrence of some text in the current""" 2817 """<p>Search the next occurrence of some text in the current"""
2770 """ editor. The previously entered searchtext and options are""" 2818 """ editor. The previously entered searchtext and options are"""
2771 """ reused.</p>""" 2819 """ reused.</p>"""
2772 )) 2820 ))
2773 self.searchNextAct.triggered.connect(self.__searchWidget.findNext) 2821 self.searchNextAct.triggered.connect(self.__searchWidget.findNext)
2774 self.searchActions.append(self.searchNextAct) 2822 self.searchActions.append(self.searchNextAct)
2775 2823
2776 self.searchPrevAct = E5Action( 2824 self.searchPrevAct = E5Action(
2777 QApplication.translate('ViewManager', 'Search previous'), 2825 QCoreApplication.translate('ViewManager', 'Search previous'),
2778 UI.PixmapCache.getIcon("findPrev.png"), 2826 UI.PixmapCache.getIcon("findPrev.png"),
2779 QApplication.translate('ViewManager', 'Search &previous'), 2827 QCoreApplication.translate('ViewManager', 'Search &previous'),
2780 QKeySequence(QApplication.translate( 2828 QKeySequence(QCoreApplication.translate(
2781 'ViewManager', "Shift+F3", "Search|Search previous")), 2829 'ViewManager', "Shift+F3", "Search|Search previous")),
2782 0, 2830 0,
2783 self.searchActGrp, 'vm_search_previous') 2831 self.searchActGrp, 'vm_search_previous')
2784 self.searchPrevAct.setStatusTip(QApplication.translate( 2832 self.searchPrevAct.setStatusTip(QCoreApplication.translate(
2785 'ViewManager', 'Search previous occurrence of text')) 2833 'ViewManager', 'Search previous occurrence of text'))
2786 self.searchPrevAct.setWhatsThis(QApplication.translate( 2834 self.searchPrevAct.setWhatsThis(QCoreApplication.translate(
2787 'ViewManager', 2835 'ViewManager',
2788 """<b>Search previous</b>""" 2836 """<b>Search previous</b>"""
2789 """<p>Search the previous occurrence of some text in the current""" 2837 """<p>Search the previous occurrence of some text in the current"""
2790 """ editor. The previously entered searchtext and options are""" 2838 """ editor. The previously entered searchtext and options are"""
2791 """ reused.</p>""" 2839 """ reused.</p>"""
2792 )) 2840 ))
2793 self.searchPrevAct.triggered.connect(self.__searchWidget.findPrev) 2841 self.searchPrevAct.triggered.connect(self.__searchWidget.findPrev)
2794 self.searchActions.append(self.searchPrevAct) 2842 self.searchActions.append(self.searchPrevAct)
2795 2843
2796 self.searchClearMarkersAct = E5Action( 2844 self.searchClearMarkersAct = E5Action(
2797 QApplication.translate('ViewManager', 'Clear search markers'), 2845 QCoreApplication.translate('ViewManager', 'Clear search markers'),
2798 UI.PixmapCache.getIcon("findClear.png"), 2846 UI.PixmapCache.getIcon("findClear.png"),
2799 QApplication.translate('ViewManager', 'Clear search markers'), 2847 QCoreApplication.translate('ViewManager', 'Clear search markers'),
2800 QKeySequence(QApplication.translate( 2848 QKeySequence(QCoreApplication.translate(
2801 'ViewManager', "Ctrl+3", "Search|Clear search markers")), 2849 'ViewManager', "Ctrl+3", "Search|Clear search markers")),
2802 0, 2850 0,
2803 self.searchActGrp, 'vm_clear_search_markers') 2851 self.searchActGrp, 'vm_clear_search_markers')
2804 self.searchClearMarkersAct.setStatusTip(QApplication.translate( 2852 self.searchClearMarkersAct.setStatusTip(QCoreApplication.translate(
2805 'ViewManager', 'Clear all displayed search markers')) 2853 'ViewManager', 'Clear all displayed search markers'))
2806 self.searchClearMarkersAct.setWhatsThis(QApplication.translate( 2854 self.searchClearMarkersAct.setWhatsThis(QCoreApplication.translate(
2807 'ViewManager', 2855 'ViewManager',
2808 """<b>Clear search markers</b>""" 2856 """<b>Clear search markers</b>"""
2809 """<p>Clear all displayed search markers.</p>""" 2857 """<p>Clear all displayed search markers.</p>"""
2810 )) 2858 ))
2811 self.searchClearMarkersAct.triggered.connect( 2859 self.searchClearMarkersAct.triggered.connect(
2812 self.__searchClearMarkers) 2860 self.__searchClearMarkers)
2813 self.searchActions.append(self.searchClearMarkersAct) 2861 self.searchActions.append(self.searchClearMarkersAct)
2814 2862
2815 self.searchNextWordAct = E5Action( 2863 self.searchNextWordAct = E5Action(
2816 QApplication.translate( 2864 QCoreApplication.translate(
2817 'ViewManager', 'Search current word forward'), 2865 'ViewManager', 'Search current word forward'),
2818 UI.PixmapCache.getIcon("findWordNext.png"), 2866 UI.PixmapCache.getIcon("findWordNext.png"),
2819 QApplication.translate( 2867 QCoreApplication.translate(
2820 'ViewManager', 'Search current word forward'), 2868 'ViewManager', 'Search current word forward'),
2821 QKeySequence(QApplication.translate( 2869 QKeySequence(QCoreApplication.translate(
2822 'ViewManager', 2870 'ViewManager',
2823 "Ctrl+.", "Search|Search current word forward")), 2871 "Ctrl+.", "Search|Search current word forward")),
2824 0, 2872 0,
2825 self.searchActGrp, 'vm_search_word_next') 2873 self.searchActGrp, 'vm_search_word_next')
2826 self.searchNextWordAct.setStatusTip(QApplication.translate( 2874 self.searchNextWordAct.setStatusTip(QCoreApplication.translate(
2827 'ViewManager', 2875 'ViewManager',
2828 'Search next occurrence of the current word')) 2876 'Search next occurrence of the current word'))
2829 self.searchNextWordAct.setWhatsThis(QApplication.translate( 2877 self.searchNextWordAct.setWhatsThis(QCoreApplication.translate(
2830 'ViewManager', 2878 'ViewManager',
2831 """<b>Search current word forward</b>""" 2879 """<b>Search current word forward</b>"""
2832 """<p>Search the next occurrence of the current word of the""" 2880 """<p>Search the next occurrence of the current word of the"""
2833 """ current editor.</p>""" 2881 """ current editor.</p>"""
2834 )) 2882 ))
2835 self.searchNextWordAct.triggered.connect(self.__findNextWord) 2883 self.searchNextWordAct.triggered.connect(self.__findNextWord)
2836 self.searchActions.append(self.searchNextWordAct) 2884 self.searchActions.append(self.searchNextWordAct)
2837 2885
2838 self.searchPrevWordAct = E5Action( 2886 self.searchPrevWordAct = E5Action(
2839 QApplication.translate( 2887 QCoreApplication.translate(
2840 'ViewManager', 'Search current word backward'), 2888 'ViewManager', 'Search current word backward'),
2841 UI.PixmapCache.getIcon("findWordPrev.png"), 2889 UI.PixmapCache.getIcon("findWordPrev.png"),
2842 QApplication.translate( 2890 QCoreApplication.translate(
2843 'ViewManager', 'Search current word backward'), 2891 'ViewManager', 'Search current word backward'),
2844 QKeySequence(QApplication.translate( 2892 QKeySequence(QCoreApplication.translate(
2845 'ViewManager', 2893 'ViewManager',
2846 "Ctrl+,", "Search|Search current word backward")), 2894 "Ctrl+,", "Search|Search current word backward")),
2847 0, 2895 0,
2848 self.searchActGrp, 'vm_search_word_previous') 2896 self.searchActGrp, 'vm_search_word_previous')
2849 self.searchPrevWordAct.setStatusTip(QApplication.translate( 2897 self.searchPrevWordAct.setStatusTip(QCoreApplication.translate(
2850 'ViewManager', 2898 'ViewManager',
2851 'Search previous occurrence of the current word')) 2899 'Search previous occurrence of the current word'))
2852 self.searchPrevWordAct.setWhatsThis(QApplication.translate( 2900 self.searchPrevWordAct.setWhatsThis(QCoreApplication.translate(
2853 'ViewManager', 2901 'ViewManager',
2854 """<b>Search current word backward</b>""" 2902 """<b>Search current word backward</b>"""
2855 """<p>Search the previous occurrence of the current word of the""" 2903 """<p>Search the previous occurrence of the current word of the"""
2856 """ current editor.</p>""" 2904 """ current editor.</p>"""
2857 )) 2905 ))
2858 self.searchPrevWordAct.triggered.connect(self.__findPrevWord) 2906 self.searchPrevWordAct.triggered.connect(self.__findPrevWord)
2859 self.searchActions.append(self.searchPrevWordAct) 2907 self.searchActions.append(self.searchPrevWordAct)
2860 2908
2861 self.replaceAct = E5Action( 2909 self.replaceAct = E5Action(
2862 QApplication.translate('ViewManager', 'Replace'), 2910 QCoreApplication.translate('ViewManager', 'Replace'),
2863 QApplication.translate('ViewManager', '&Replace...'), 2911 QCoreApplication.translate('ViewManager', '&Replace...'),
2864 QKeySequence(QApplication.translate( 2912 QKeySequence(QCoreApplication.translate(
2865 'ViewManager', "Ctrl+R", "Search|Replace")), 2913 'ViewManager', "Ctrl+R", "Search|Replace")),
2866 0, 2914 0,
2867 self.searchActGrp, 'vm_search_replace') 2915 self.searchActGrp, 'vm_search_replace')
2868 self.replaceAct.setStatusTip(QApplication.translate( 2916 self.replaceAct.setStatusTip(QCoreApplication.translate(
2869 'ViewManager', 'Replace some text')) 2917 'ViewManager', 'Replace some text'))
2870 self.replaceAct.setWhatsThis(QApplication.translate( 2918 self.replaceAct.setWhatsThis(QCoreApplication.translate(
2871 'ViewManager', 2919 'ViewManager',
2872 """<b>Replace</b>""" 2920 """<b>Replace</b>"""
2873 """<p>Search for some text in the current editor and replace it.""" 2921 """<p>Search for some text in the current editor and replace it."""
2874 """ A dialog is shown to enter the searchtext, the replacement""" 2922 """ A dialog is shown to enter the searchtext, the replacement"""
2875 """ text and options for the search and replace.</p>""" 2923 """ text and options for the search and replace.</p>"""
2876 )) 2924 ))
2877 self.replaceAct.triggered.connect(self.__replace) 2925 self.replaceAct.triggered.connect(self.__replace)
2878 self.searchActions.append(self.replaceAct) 2926 self.searchActions.append(self.replaceAct)
2879 2927
2880 self.quickSearchAct = E5Action( 2928 self.quickSearchAct = E5Action(
2881 QApplication.translate('ViewManager', 'Quicksearch'), 2929 QCoreApplication.translate('ViewManager', 'Quicksearch'),
2882 UI.PixmapCache.getIcon("quickFindNext.png"), 2930 UI.PixmapCache.getIcon("quickFindNext.png"),
2883 QApplication.translate('ViewManager', '&Quicksearch'), 2931 QCoreApplication.translate('ViewManager', '&Quicksearch'),
2884 QKeySequence(QApplication.translate( 2932 QKeySequence(QCoreApplication.translate(
2885 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")), 2933 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")),
2886 0, 2934 0,
2887 self.searchActGrp, 'vm_quicksearch') 2935 self.searchActGrp, 'vm_quicksearch')
2888 self.quickSearchAct.setStatusTip(QApplication.translate( 2936 self.quickSearchAct.setStatusTip(QCoreApplication.translate(
2889 'ViewManager', 'Perform a quicksearch')) 2937 'ViewManager', 'Perform a quicksearch'))
2890 self.quickSearchAct.setWhatsThis(QApplication.translate( 2938 self.quickSearchAct.setWhatsThis(QCoreApplication.translate(
2891 'ViewManager', 2939 'ViewManager',
2892 """<b>Quicksearch</b>""" 2940 """<b>Quicksearch</b>"""
2893 """<p>This activates the quicksearch function of the IDE by""" 2941 """<p>This activates the quicksearch function of the IDE by"""
2894 """ giving focus to the quicksearch entry field. If this field""" 2942 """ giving focus to the quicksearch entry field. If this field"""
2895 """ is already active and contains text, it searches for the""" 2943 """ is already active and contains text, it searches for the"""
2897 )) 2945 ))
2898 self.quickSearchAct.triggered.connect(self.__quickSearch) 2946 self.quickSearchAct.triggered.connect(self.__quickSearch)
2899 self.searchActions.append(self.quickSearchAct) 2947 self.searchActions.append(self.quickSearchAct)
2900 2948
2901 self.quickSearchBackAct = E5Action( 2949 self.quickSearchBackAct = E5Action(
2902 QApplication.translate('ViewManager', 'Quicksearch backwards'), 2950 QCoreApplication.translate(
2951 'ViewManager', 'Quicksearch backwards'),
2903 UI.PixmapCache.getIcon("quickFindPrev.png"), 2952 UI.PixmapCache.getIcon("quickFindPrev.png"),
2904 QApplication.translate('ViewManager', 'Quicksearch &backwards'), 2953 QCoreApplication.translate(
2905 QKeySequence(QApplication.translate( 2954 'ViewManager', 'Quicksearch &backwards'),
2955 QKeySequence(QCoreApplication.translate(
2906 'ViewManager', 2956 'ViewManager',
2907 "Ctrl+Shift+J", "Search|Quicksearch backwards")), 2957 "Ctrl+Shift+J", "Search|Quicksearch backwards")),
2908 0, self.searchActGrp, 'vm_quicksearch_backwards') 2958 0, self.searchActGrp, 'vm_quicksearch_backwards')
2909 self.quickSearchBackAct.setStatusTip(QApplication.translate( 2959 self.quickSearchBackAct.setStatusTip(QCoreApplication.translate(
2910 'ViewManager', 2960 'ViewManager',
2911 'Perform a quicksearch backwards')) 2961 'Perform a quicksearch backwards'))
2912 self.quickSearchBackAct.setWhatsThis(QApplication.translate( 2962 self.quickSearchBackAct.setWhatsThis(QCoreApplication.translate(
2913 'ViewManager', 2963 'ViewManager',
2914 """<b>Quicksearch backwards</b>""" 2964 """<b>Quicksearch backwards</b>"""
2915 """<p>This searches the previous occurrence of the quicksearch""" 2965 """<p>This searches the previous occurrence of the quicksearch"""
2916 """ text.</p>""" 2966 """ text.</p>"""
2917 )) 2967 ))
2918 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev) 2968 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev)
2919 self.searchActions.append(self.quickSearchBackAct) 2969 self.searchActions.append(self.quickSearchBackAct)
2920 2970
2921 self.quickSearchExtendAct = E5Action( 2971 self.quickSearchExtendAct = E5Action(
2922 QApplication.translate('ViewManager', 'Quicksearch extend'), 2972 QCoreApplication.translate('ViewManager', 'Quicksearch extend'),
2923 UI.PixmapCache.getIcon("quickFindExtend.png"), 2973 UI.PixmapCache.getIcon("quickFindExtend.png"),
2924 QApplication.translate('ViewManager', 'Quicksearch e&xtend'), 2974 QCoreApplication.translate('ViewManager', 'Quicksearch e&xtend'),
2925 QKeySequence(QApplication.translate( 2975 QKeySequence(QCoreApplication.translate(
2926 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")), 2976 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")),
2927 0, 2977 0,
2928 self.searchActGrp, 'vm_quicksearch_extend') 2978 self.searchActGrp, 'vm_quicksearch_extend')
2929 self.quickSearchExtendAct.setStatusTip(QApplication.translate( 2979 self.quickSearchExtendAct.setStatusTip(QCoreApplication.translate(
2930 'ViewManager', 2980 'ViewManager',
2931 'Extend the quicksearch to the end of the current word')) 2981 'Extend the quicksearch to the end of the current word'))
2932 self.quickSearchExtendAct.setWhatsThis(QApplication.translate( 2982 self.quickSearchExtendAct.setWhatsThis(QCoreApplication.translate(
2933 'ViewManager', 2983 'ViewManager',
2934 """<b>Quicksearch extend</b>""" 2984 """<b>Quicksearch extend</b>"""
2935 """<p>This extends the quicksearch text to the end of the word""" 2985 """<p>This extends the quicksearch text to the end of the word"""
2936 """ currently found.</p>""" 2986 """ currently found.</p>"""
2937 )) 2987 ))
2938 self.quickSearchExtendAct.triggered.connect( 2988 self.quickSearchExtendAct.triggered.connect(
2939 self.__quickSearchExtend) 2989 self.__quickSearchExtend)
2940 self.searchActions.append(self.quickSearchExtendAct) 2990 self.searchActions.append(self.quickSearchExtendAct)
2941 2991
2942 self.gotoAct = E5Action( 2992 self.gotoAct = E5Action(
2943 QApplication.translate('ViewManager', 'Goto Line'), 2993 QCoreApplication.translate('ViewManager', 'Goto Line'),
2944 UI.PixmapCache.getIcon("goto.png"), 2994 UI.PixmapCache.getIcon("goto.png"),
2945 QApplication.translate('ViewManager', '&Goto Line...'), 2995 QCoreApplication.translate('ViewManager', '&Goto Line...'),
2946 QKeySequence(QApplication.translate( 2996 QKeySequence(QCoreApplication.translate(
2947 'ViewManager', "Ctrl+G", "Search|Goto Line")), 2997 'ViewManager', "Ctrl+G", "Search|Goto Line")),
2948 0, 2998 0,
2949 self.searchActGrp, 'vm_search_goto_line') 2999 self.searchActGrp, 'vm_search_goto_line')
2950 self.gotoAct.setStatusTip(QApplication.translate( 3000 self.gotoAct.setStatusTip(QCoreApplication.translate(
2951 'ViewManager', 'Goto Line')) 3001 'ViewManager', 'Goto Line'))
2952 self.gotoAct.setWhatsThis(QApplication.translate( 3002 self.gotoAct.setWhatsThis(QCoreApplication.translate(
2953 'ViewManager', 3003 'ViewManager',
2954 """<b>Goto Line</b>""" 3004 """<b>Goto Line</b>"""
2955 """<p>Go to a specific line of text in the current editor.""" 3005 """<p>Go to a specific line of text in the current editor."""
2956 """ A dialog is shown to enter the linenumber.</p>""" 3006 """ A dialog is shown to enter the linenumber.</p>"""
2957 )) 3007 ))
2958 self.gotoAct.triggered.connect(self.__goto) 3008 self.gotoAct.triggered.connect(self.__goto)
2959 self.searchActions.append(self.gotoAct) 3009 self.searchActions.append(self.gotoAct)
2960 3010
2961 self.gotoBraceAct = E5Action( 3011 self.gotoBraceAct = E5Action(
2962 QApplication.translate('ViewManager', 'Goto Brace'), 3012 QCoreApplication.translate('ViewManager', 'Goto Brace'),
2963 UI.PixmapCache.getIcon("gotoBrace.png"), 3013 UI.PixmapCache.getIcon("gotoBrace.png"),
2964 QApplication.translate('ViewManager', 'Goto &Brace'), 3014 QCoreApplication.translate('ViewManager', 'Goto &Brace'),
2965 QKeySequence(QApplication.translate( 3015 QKeySequence(QCoreApplication.translate(
2966 'ViewManager', "Ctrl+L", "Search|Goto Brace")), 3016 'ViewManager', "Ctrl+L", "Search|Goto Brace")),
2967 0, 3017 0,
2968 self.searchActGrp, 'vm_search_goto_brace') 3018 self.searchActGrp, 'vm_search_goto_brace')
2969 self.gotoBraceAct.setStatusTip(QApplication.translate( 3019 self.gotoBraceAct.setStatusTip(QCoreApplication.translate(
2970 'ViewManager', 'Goto Brace')) 3020 'ViewManager', 'Goto Brace'))
2971 self.gotoBraceAct.setWhatsThis(QApplication.translate( 3021 self.gotoBraceAct.setWhatsThis(QCoreApplication.translate(
2972 'ViewManager', 3022 'ViewManager',
2973 """<b>Goto Brace</b>""" 3023 """<b>Goto Brace</b>"""
2974 """<p>Go to the matching brace in the current editor.</p>""" 3024 """<p>Go to the matching brace in the current editor.</p>"""
2975 )) 3025 ))
2976 self.gotoBraceAct.triggered.connect(self.__gotoBrace) 3026 self.gotoBraceAct.triggered.connect(self.__gotoBrace)
2977 self.searchActions.append(self.gotoBraceAct) 3027 self.searchActions.append(self.gotoBraceAct)
2978 3028
2979 self.gotoLastEditAct = E5Action( 3029 self.gotoLastEditAct = E5Action(
2980 QApplication.translate('ViewManager', 'Goto Last Edit Location'), 3030 QCoreApplication.translate(
3031 'ViewManager', 'Goto Last Edit Location'),
2981 UI.PixmapCache.getIcon("gotoLastEditPosition.png"), 3032 UI.PixmapCache.getIcon("gotoLastEditPosition.png"),
2982 QApplication.translate('ViewManager', 'Goto Last &Edit Location'), 3033 QCoreApplication.translate(
2983 QKeySequence(QApplication.translate( 3034 'ViewManager', 'Goto Last &Edit Location'),
3035 QKeySequence(QCoreApplication.translate(
2984 'ViewManager', 3036 'ViewManager',
2985 "Ctrl+Shift+G", "Search|Goto Last Edit Location")), 3037 "Ctrl+Shift+G", "Search|Goto Last Edit Location")),
2986 0, 3038 0,
2987 self.searchActGrp, 'vm_search_goto_last_edit_location') 3039 self.searchActGrp, 'vm_search_goto_last_edit_location')
2988 self.gotoLastEditAct.setStatusTip( 3040 self.gotoLastEditAct.setStatusTip(
2989 QApplication.translate('ViewManager', 'Goto Last Edit Location')) 3041 QCoreApplication.translate(
2990 self.gotoLastEditAct.setWhatsThis(QApplication.translate( 3042 'ViewManager', 'Goto Last Edit Location'))
3043 self.gotoLastEditAct.setWhatsThis(QCoreApplication.translate(
2991 'ViewManager', 3044 'ViewManager',
2992 """<b>Goto Last Edit Location</b>""" 3045 """<b>Goto Last Edit Location</b>"""
2993 """<p>Go to the location of the last edit in the current""" 3046 """<p>Go to the location of the last edit in the current"""
2994 """ editor.</p>""" 3047 """ editor.</p>"""
2995 )) 3048 ))
2996 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition) 3049 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition)
2997 self.searchActions.append(self.gotoLastEditAct) 3050 self.searchActions.append(self.gotoLastEditAct)
2998 3051
2999 self.gotoPreviousDefAct = E5Action( 3052 self.gotoPreviousDefAct = E5Action(
3000 QApplication.translate( 3053 QCoreApplication.translate(
3001 'ViewManager', 'Goto Previous Method or Class'), 3054 'ViewManager', 'Goto Previous Method or Class'),
3002 QApplication.translate( 3055 QCoreApplication.translate(
3003 'ViewManager', 'Goto Previous Method or Class'), 3056 'ViewManager', 'Goto Previous Method or Class'),
3004 QKeySequence(QApplication.translate( 3057 QKeySequence(QCoreApplication.translate(
3005 'ViewManager', 3058 'ViewManager',
3006 "Ctrl+Shift+Up", "Search|Goto Previous Method or Class")), 3059 "Ctrl+Shift+Up", "Search|Goto Previous Method or Class")),
3007 0, 3060 0,
3008 self.searchActGrp, 'vm_search_goto_previous_method_or_class') 3061 self.searchActGrp, 'vm_search_goto_previous_method_or_class')
3009 self.gotoPreviousDefAct.setStatusTip( 3062 self.gotoPreviousDefAct.setStatusTip(
3010 QApplication.translate( 3063 QCoreApplication.translate(
3011 'ViewManager', 3064 'ViewManager',
3012 'Go to the previous method or class definition')) 3065 'Go to the previous method or class definition'))
3013 self.gotoPreviousDefAct.setWhatsThis(QApplication.translate( 3066 self.gotoPreviousDefAct.setWhatsThis(QCoreApplication.translate(
3014 'ViewManager', 3067 'ViewManager',
3015 """<b>Goto Previous Method or Class</b>""" 3068 """<b>Goto Previous Method or Class</b>"""
3016 """<p>Goes to the line of the previous method or class""" 3069 """<p>Goes to the line of the previous method or class"""
3017 """ definition and highlights the name.</p>""" 3070 """ definition and highlights the name.</p>"""
3018 )) 3071 ))
3019 self.gotoPreviousDefAct.triggered.connect( 3072 self.gotoPreviousDefAct.triggered.connect(
3020 self.__gotoPreviousMethodClass) 3073 self.__gotoPreviousMethodClass)
3021 self.searchActions.append(self.gotoPreviousDefAct) 3074 self.searchActions.append(self.gotoPreviousDefAct)
3022 3075
3023 self.gotoNextDefAct = E5Action( 3076 self.gotoNextDefAct = E5Action(
3024 QApplication.translate('ViewManager', 'Goto Next Method or Class'), 3077 QCoreApplication.translate(
3025 QApplication.translate('ViewManager', 'Goto Next Method or Class'), 3078 'ViewManager', 'Goto Next Method or Class'),
3026 QKeySequence(QApplication.translate( 3079 QCoreApplication.translate(
3080 'ViewManager', 'Goto Next Method or Class'),
3081 QKeySequence(QCoreApplication.translate(
3027 'ViewManager', 3082 'ViewManager',
3028 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")), 3083 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")),
3029 0, 3084 0,
3030 self.searchActGrp, 'vm_search_goto_next_method_or_class') 3085 self.searchActGrp, 'vm_search_goto_next_method_or_class')
3031 self.gotoNextDefAct.setStatusTip(QApplication.translate( 3086 self.gotoNextDefAct.setStatusTip(QCoreApplication.translate(
3032 'ViewManager', 'Go to the next method or class definition')) 3087 'ViewManager', 'Go to the next method or class definition'))
3033 self.gotoNextDefAct.setWhatsThis(QApplication.translate( 3088 self.gotoNextDefAct.setWhatsThis(QCoreApplication.translate(
3034 'ViewManager', 3089 'ViewManager',
3035 """<b>Goto Next Method or Class</b>""" 3090 """<b>Goto Next Method or Class</b>"""
3036 """<p>Goes to the line of the next method or class definition""" 3091 """<p>Goes to the line of the next method or class definition"""
3037 """ and highlights the name.</p>""" 3092 """ and highlights the name.</p>"""
3038 )) 3093 ))
3040 self.searchActions.append(self.gotoNextDefAct) 3095 self.searchActions.append(self.gotoNextDefAct)
3041 3096
3042 self.searchActGrp.setEnabled(False) 3097 self.searchActGrp.setEnabled(False)
3043 3098
3044 self.searchFilesAct = E5Action( 3099 self.searchFilesAct = E5Action(
3045 QApplication.translate('ViewManager', 'Search in Files'), 3100 QCoreApplication.translate('ViewManager', 'Search in Files'),
3046 UI.PixmapCache.getIcon("projectFind.png"), 3101 UI.PixmapCache.getIcon("projectFind.png"),
3047 QApplication.translate('ViewManager', 'Search in &Files...'), 3102 QCoreApplication.translate('ViewManager', 'Search in &Files...'),
3048 QKeySequence(QApplication.translate( 3103 QKeySequence(QCoreApplication.translate(
3049 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")), 3104 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")),
3050 0, 3105 0,
3051 self, 'vm_search_in_files') 3106 self, 'vm_search_in_files')
3052 self.searchFilesAct.setStatusTip(QApplication.translate( 3107 self.searchFilesAct.setStatusTip(QCoreApplication.translate(
3053 'ViewManager', 'Search for a text in files')) 3108 'ViewManager', 'Search for a text in files'))
3054 self.searchFilesAct.setWhatsThis(QApplication.translate( 3109 self.searchFilesAct.setWhatsThis(QCoreApplication.translate(
3055 'ViewManager', 3110 'ViewManager',
3056 """<b>Search in Files</b>""" 3111 """<b>Search in Files</b>"""
3057 """<p>Search for some text in the files of a directory tree""" 3112 """<p>Search for some text in the files of a directory tree"""
3058 """ or the project. A dialog is shown to enter the searchtext""" 3113 """ or the project. A dialog is shown to enter the searchtext"""
3059 """ and options for the search and to display the result.</p>""" 3114 """ and options for the search and to display the result.</p>"""
3060 )) 3115 ))
3061 self.searchFilesAct.triggered.connect(self.__searchFiles) 3116 self.searchFilesAct.triggered.connect(self.__searchFiles)
3062 self.searchActions.append(self.searchFilesAct) 3117 self.searchActions.append(self.searchFilesAct)
3063 3118
3064 self.replaceFilesAct = E5Action( 3119 self.replaceFilesAct = E5Action(
3065 QApplication.translate('ViewManager', 'Replace in Files'), 3120 QCoreApplication.translate('ViewManager', 'Replace in Files'),
3066 QApplication.translate('ViewManager', 'Replace in F&iles...'), 3121 QCoreApplication.translate('ViewManager', 'Replace in F&iles...'),
3067 QKeySequence(QApplication.translate( 3122 QKeySequence(QCoreApplication.translate(
3068 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")), 3123 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")),
3069 0, 3124 0,
3070 self, 'vm_replace_in_files') 3125 self, 'vm_replace_in_files')
3071 self.replaceFilesAct.setStatusTip(QApplication.translate( 3126 self.replaceFilesAct.setStatusTip(QCoreApplication.translate(
3072 'ViewManager', 'Search for a text in files and replace it')) 3127 'ViewManager', 'Search for a text in files and replace it'))
3073 self.replaceFilesAct.setWhatsThis(QApplication.translate( 3128 self.replaceFilesAct.setWhatsThis(QCoreApplication.translate(
3074 'ViewManager', 3129 'ViewManager',
3075 """<b>Replace in Files</b>""" 3130 """<b>Replace in Files</b>"""
3076 """<p>Search for some text in the files of a directory tree""" 3131 """<p>Search for some text in the files of a directory tree"""
3077 """ or the project and replace it. A dialog is shown to enter""" 3132 """ or the project and replace it. A dialog is shown to enter"""
3078 """ the searchtext, the replacement text and options for the""" 3133 """ the searchtext, the replacement text and options for the"""
3080 )) 3135 ))
3081 self.replaceFilesAct.triggered.connect(self.__replaceFiles) 3136 self.replaceFilesAct.triggered.connect(self.__replaceFiles)
3082 self.searchActions.append(self.replaceFilesAct) 3137 self.searchActions.append(self.replaceFilesAct)
3083 3138
3084 self.searchOpenFilesAct = E5Action( 3139 self.searchOpenFilesAct = E5Action(
3085 QApplication.translate('ViewManager', 'Search in Open Files'), 3140 QCoreApplication.translate(
3141 'ViewManager', 'Search in Open Files'),
3086 UI.PixmapCache.getIcon("documentFind.png"), 3142 UI.PixmapCache.getIcon("documentFind.png"),
3087 QApplication.translate('ViewManager', 'Search in Open Files...'), 3143 QCoreApplication.translate(
3088 QKeySequence(QApplication.translate( 3144 'ViewManager', 'Search in Open Files...'),
3145 QKeySequence(QCoreApplication.translate(
3089 'ViewManager', 3146 'ViewManager',
3090 "Meta+Ctrl+Alt+F", "Search|Search Open Files")), 3147 "Meta+Ctrl+Alt+F", "Search|Search Open Files")),
3091 0, 3148 0,
3092 self.searchActGrp, 'vm_search_in_open_files') 3149 self.searchActGrp, 'vm_search_in_open_files')
3093 self.searchOpenFilesAct.setStatusTip(QApplication.translate( 3150 self.searchOpenFilesAct.setStatusTip(QCoreApplication.translate(
3094 'ViewManager', 'Search for a text in open files')) 3151 'ViewManager', 'Search for a text in open files'))
3095 self.searchOpenFilesAct.setWhatsThis(QApplication.translate( 3152 self.searchOpenFilesAct.setWhatsThis(QCoreApplication.translate(
3096 'ViewManager', 3153 'ViewManager',
3097 """<b>Search in Open Files</b>""" 3154 """<b>Search in Open Files</b>"""
3098 """<p>Search for some text in the currently opened files.""" 3155 """<p>Search for some text in the currently opened files."""
3099 """ A dialog is shown to enter the searchtext""" 3156 """ A dialog is shown to enter the searchtext"""
3100 """ and options for the search and to display the result.</p>""" 3157 """ and options for the search and to display the result.</p>"""
3101 )) 3158 ))
3102 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles) 3159 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles)
3103 self.searchActions.append(self.searchOpenFilesAct) 3160 self.searchActions.append(self.searchOpenFilesAct)
3104 3161
3105 self.replaceOpenFilesAct = E5Action( 3162 self.replaceOpenFilesAct = E5Action(
3106 QApplication.translate('ViewManager', 'Replace in Open Files'), 3163 QCoreApplication.translate(
3107 QApplication.translate('ViewManager', 'Replace in Open Files...'), 3164 'ViewManager', 'Replace in Open Files'),
3108 QKeySequence(QApplication.translate( 3165 QCoreApplication.translate(
3166 'ViewManager', 'Replace in Open Files...'),
3167 QKeySequence(QCoreApplication.translate(
3109 'ViewManager', 3168 'ViewManager',
3110 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")), 3169 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")),
3111 0, 3170 0,
3112 self.searchActGrp, 'vm_replace_in_open_files') 3171 self.searchActGrp, 'vm_replace_in_open_files')
3113 self.replaceOpenFilesAct.setStatusTip(QApplication.translate( 3172 self.replaceOpenFilesAct.setStatusTip(QCoreApplication.translate(
3114 'ViewManager', 'Search for a text in open files and replace it')) 3173 'ViewManager', 'Search for a text in open files and replace it'))
3115 self.replaceOpenFilesAct.setWhatsThis(QApplication.translate( 3174 self.replaceOpenFilesAct.setWhatsThis(QCoreApplication.translate(
3116 'ViewManager', 3175 'ViewManager',
3117 """<b>Replace in Open Files</b>""" 3176 """<b>Replace in Open Files</b>"""
3118 """<p>Search for some text in the currently opened files""" 3177 """<p>Search for some text in the currently opened files"""
3119 """ and replace it. A dialog is shown to enter""" 3178 """ and replace it. A dialog is shown to enter"""
3120 """ the searchtext, the replacement text and options for the""" 3179 """ the searchtext, the replacement text and options for the"""
3129 3188
3130 @param toolbarManager reference to a toolbar manager object 3189 @param toolbarManager reference to a toolbar manager object
3131 (E5ToolBarManager) 3190 (E5ToolBarManager)
3132 @return a tuple of the generated toolbar (search, quicksearch) 3191 @return a tuple of the generated toolbar (search, quicksearch)
3133 """ 3192 """
3134 qtb = QToolBar(QApplication.translate('ViewManager', 'Quicksearch'), 3193 qtb = QToolBar(QCoreApplication.translate(
3135 self.ui) 3194 'ViewManager', 'Quicksearch'), self.ui)
3136 qtb.setIconSize(UI.Config.ToolBarIconSize) 3195 qtb.setIconSize(UI.Config.ToolBarIconSize)
3137 qtb.setObjectName("QuicksearchToolbar") 3196 qtb.setObjectName("QuicksearchToolbar")
3138 qtb.setToolTip(QApplication.translate('ViewManager', 'Quicksearch')) 3197 qtb.setToolTip(QCoreApplication.translate(
3198 'ViewManager', 'Quicksearch'))
3139 3199
3140 self.quickFindLineEdit = QuickSearchLineEdit(self) 3200 self.quickFindLineEdit = QuickSearchLineEdit(self)
3141 self.quickFindtextCombo = QComboBox(self) 3201 self.quickFindtextCombo = QComboBox(self)
3142 self.quickFindtextCombo.setEditable(True) 3202 self.quickFindtextCombo.setEditable(True)
3143 self.quickFindtextCombo.setLineEdit(self.quickFindLineEdit) 3203 self.quickFindtextCombo.setLineEdit(self.quickFindLineEdit)
3151 self.quickFindtextCombo.lineEdit().palette().color(QPalette.Base) 3211 self.quickFindtextCombo.lineEdit().palette().color(QPalette.Base)
3152 self.quickFindtextCombo.lastSearchText = "" 3212 self.quickFindtextCombo.lastSearchText = ""
3153 self.quickFindtextCombo._editor = self.quickFindtextCombo.lineEdit() 3213 self.quickFindtextCombo._editor = self.quickFindtextCombo.lineEdit()
3154 # this allows us not to jump across searched text 3214 # this allows us not to jump across searched text
3155 # just because of autocompletion enabled 3215 # just because of autocompletion enabled
3156 self.quickFindtextCombo.setAutoCompletion(False)
3157 self.quickFindtextCombo.setMinimumWidth(250) 3216 self.quickFindtextCombo.setMinimumWidth(250)
3158 self.quickFindtextCombo.setSizeAdjustPolicy( 3217 self.quickFindtextCombo.setSizeAdjustPolicy(
3159 QComboBox.AdjustToMinimumContentsLengthWithIcon) 3218 QComboBox.AdjustToMinimumContentsLengthWithIcon)
3160 self.quickFindtextCombo.addItem("") 3219 self.quickFindtextCombo.addItem("")
3161 self.quickFindtextCombo.setWhatsThis(QApplication.translate( 3220 self.quickFindtextCombo.setWhatsThis(QCoreApplication.translate(
3162 'ViewManager', 3221 'ViewManager',
3163 """<p>Enter the searchtext directly into this field.""" 3222 """<p>Enter the searchtext directly into this field."""
3164 """ The search will be performed case insensitive.""" 3223 """ The search will be performed case insensitive."""
3165 """ The quicksearch function is activated upon activation""" 3224 """ The quicksearch function is activated upon activation"""
3166 """ of the quicksearch next action (default key Ctrl+Shift+K),""" 3225 """ of the quicksearch next action (default key Ctrl+Shift+K),"""
3192 qtb.addAction(self.quickSearchExtendAct) 3251 qtb.addAction(self.quickSearchExtendAct)
3193 self.quickFindtextCombo.setEnabled(False) 3252 self.quickFindtextCombo.setEnabled(False)
3194 self.__quickSearchToolbar = qtb 3253 self.__quickSearchToolbar = qtb
3195 self.__quickSearchToolbarVisibility = None 3254 self.__quickSearchToolbarVisibility = None
3196 3255
3197 tb = QToolBar(QApplication.translate('ViewManager', 'Search'), self.ui) 3256 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Search'),
3257 self.ui)
3198 tb.setIconSize(UI.Config.ToolBarIconSize) 3258 tb.setIconSize(UI.Config.ToolBarIconSize)
3199 tb.setObjectName("SearchToolbar") 3259 tb.setObjectName("SearchToolbar")
3200 tb.setToolTip(QApplication.translate('ViewManager', 'Search')) 3260 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Search'))
3201 3261
3202 tb.addAction(self.searchAct) 3262 tb.addAction(self.searchAct)
3203 tb.addAction(self.searchNextAct) 3263 tb.addAction(self.searchNextAct)
3204 tb.addAction(self.searchPrevAct) 3264 tb.addAction(self.searchPrevAct)
3205 tb.addAction(self.searchNextWordAct) 3265 tb.addAction(self.searchNextWordAct)
3233 """ 3293 """
3234 self.viewActGrp = createActionGroup(self) 3294 self.viewActGrp = createActionGroup(self)
3235 self.viewFoldActGrp = createActionGroup(self) 3295 self.viewFoldActGrp = createActionGroup(self)
3236 3296
3237 self.zoomInAct = E5Action( 3297 self.zoomInAct = E5Action(
3238 QApplication.translate('ViewManager', 'Zoom in'), 3298 QCoreApplication.translate('ViewManager', 'Zoom in'),
3239 UI.PixmapCache.getIcon("zoomIn.png"), 3299 UI.PixmapCache.getIcon("zoomIn.png"),
3240 QApplication.translate('ViewManager', 'Zoom &in'), 3300 QCoreApplication.translate('ViewManager', 'Zoom &in'),
3241 QKeySequence(QApplication.translate( 3301 QKeySequence(QCoreApplication.translate(
3242 'ViewManager', "Ctrl++", "View|Zoom in")), 3302 'ViewManager', "Ctrl++", "View|Zoom in")),
3243 QKeySequence(QApplication.translate( 3303 QKeySequence(QCoreApplication.translate(
3244 'ViewManager', "Zoom In", "View|Zoom in")), 3304 'ViewManager', "Zoom In", "View|Zoom in")),
3245 self.viewActGrp, 'vm_view_zoom_in') 3305 self.viewActGrp, 'vm_view_zoom_in')
3246 self.zoomInAct.setStatusTip(QApplication.translate( 3306 self.zoomInAct.setStatusTip(QCoreApplication.translate(
3247 'ViewManager', 'Zoom in on the text')) 3307 'ViewManager', 'Zoom in on the text'))
3248 self.zoomInAct.setWhatsThis(QApplication.translate( 3308 self.zoomInAct.setWhatsThis(QCoreApplication.translate(
3249 'ViewManager', 3309 'ViewManager',
3250 """<b>Zoom in</b>""" 3310 """<b>Zoom in</b>"""
3251 """<p>Zoom in on the text. This makes the text bigger.</p>""" 3311 """<p>Zoom in on the text. This makes the text bigger.</p>"""
3252 )) 3312 ))
3253 self.zoomInAct.triggered.connect(self.__zoomIn) 3313 self.zoomInAct.triggered.connect(self.__zoomIn)
3254 self.viewActions.append(self.zoomInAct) 3314 self.viewActions.append(self.zoomInAct)
3255 3315
3256 self.zoomOutAct = E5Action( 3316 self.zoomOutAct = E5Action(
3257 QApplication.translate('ViewManager', 'Zoom out'), 3317 QCoreApplication.translate('ViewManager', 'Zoom out'),
3258 UI.PixmapCache.getIcon("zoomOut.png"), 3318 UI.PixmapCache.getIcon("zoomOut.png"),
3259 QApplication.translate('ViewManager', 'Zoom &out'), 3319 QCoreApplication.translate('ViewManager', 'Zoom &out'),
3260 QKeySequence(QApplication.translate( 3320 QKeySequence(QCoreApplication.translate(
3261 'ViewManager', "Ctrl+-", "View|Zoom out")), 3321 'ViewManager', "Ctrl+-", "View|Zoom out")),
3262 QKeySequence(QApplication.translate( 3322 QKeySequence(QCoreApplication.translate(
3263 'ViewManager', "Zoom Out", "View|Zoom out")), 3323 'ViewManager', "Zoom Out", "View|Zoom out")),
3264 self.viewActGrp, 'vm_view_zoom_out') 3324 self.viewActGrp, 'vm_view_zoom_out')
3265 self.zoomOutAct.setStatusTip(QApplication.translate( 3325 self.zoomOutAct.setStatusTip(QCoreApplication.translate(
3266 'ViewManager', 'Zoom out on the text')) 3326 'ViewManager', 'Zoom out on the text'))
3267 self.zoomOutAct.setWhatsThis(QApplication.translate( 3327 self.zoomOutAct.setWhatsThis(QCoreApplication.translate(
3268 'ViewManager', 3328 'ViewManager',
3269 """<b>Zoom out</b>""" 3329 """<b>Zoom out</b>"""
3270 """<p>Zoom out on the text. This makes the text smaller.</p>""" 3330 """<p>Zoom out on the text. This makes the text smaller.</p>"""
3271 )) 3331 ))
3272 self.zoomOutAct.triggered.connect(self.__zoomOut) 3332 self.zoomOutAct.triggered.connect(self.__zoomOut)
3273 self.viewActions.append(self.zoomOutAct) 3333 self.viewActions.append(self.zoomOutAct)
3274 3334
3275 self.zoomResetAct = E5Action( 3335 self.zoomResetAct = E5Action(
3276 QApplication.translate('ViewManager', 'Zoom reset'), 3336 QCoreApplication.translate('ViewManager', 'Zoom reset'),
3277 UI.PixmapCache.getIcon("zoomReset.png"), 3337 UI.PixmapCache.getIcon("zoomReset.png"),
3278 QApplication.translate('ViewManager', 'Zoom &reset'), 3338 QCoreApplication.translate('ViewManager', 'Zoom &reset'),
3279 QKeySequence(QApplication.translate( 3339 QKeySequence(QCoreApplication.translate(
3280 'ViewManager', "Ctrl+0", "View|Zoom reset")), 3340 'ViewManager', "Ctrl+0", "View|Zoom reset")),
3281 0, 3341 0,
3282 self.viewActGrp, 'vm_view_zoom_reset') 3342 self.viewActGrp, 'vm_view_zoom_reset')
3283 self.zoomResetAct.setStatusTip(QApplication.translate( 3343 self.zoomResetAct.setStatusTip(QCoreApplication.translate(
3284 'ViewManager', 'Reset the zoom of the text')) 3344 'ViewManager', 'Reset the zoom of the text'))
3285 self.zoomResetAct.setWhatsThis(QApplication.translate( 3345 self.zoomResetAct.setWhatsThis(QCoreApplication.translate(
3286 'ViewManager', 3346 'ViewManager',
3287 """<b>Zoom reset</b>""" 3347 """<b>Zoom reset</b>"""
3288 """<p>Reset the zoom of the text. """ 3348 """<p>Reset the zoom of the text. """
3289 """This sets the zoom factor to 100%.</p>""" 3349 """This sets the zoom factor to 100%.</p>"""
3290 )) 3350 ))
3291 self.zoomResetAct.triggered.connect(self.__zoomReset) 3351 self.zoomResetAct.triggered.connect(self.__zoomReset)
3292 self.viewActions.append(self.zoomResetAct) 3352 self.viewActions.append(self.zoomResetAct)
3293 3353
3294 self.zoomToAct = E5Action( 3354 self.zoomToAct = E5Action(
3295 QApplication.translate('ViewManager', 'Zoom'), 3355 QCoreApplication.translate('ViewManager', 'Zoom'),
3296 UI.PixmapCache.getIcon("zoomTo.png"), 3356 UI.PixmapCache.getIcon("zoomTo.png"),
3297 QApplication.translate('ViewManager', '&Zoom'), 3357 QCoreApplication.translate('ViewManager', '&Zoom'),
3298 QKeySequence(QApplication.translate( 3358 QKeySequence(QCoreApplication.translate(
3299 'ViewManager', "Ctrl+#", "View|Zoom")), 3359 'ViewManager', "Ctrl+#", "View|Zoom")),
3300 0, 3360 0,
3301 self.viewActGrp, 'vm_view_zoom') 3361 self.viewActGrp, 'vm_view_zoom')
3302 self.zoomToAct.setStatusTip(QApplication.translate( 3362 self.zoomToAct.setStatusTip(QCoreApplication.translate(
3303 'ViewManager', 'Zoom the text')) 3363 'ViewManager', 'Zoom the text'))
3304 self.zoomToAct.setWhatsThis(QApplication.translate( 3364 self.zoomToAct.setWhatsThis(QCoreApplication.translate(
3305 'ViewManager', 3365 'ViewManager',
3306 """<b>Zoom</b>""" 3366 """<b>Zoom</b>"""
3307 """<p>Zoom the text. This opens a dialog where the""" 3367 """<p>Zoom the text. This opens a dialog where the"""
3308 """ desired size can be entered.</p>""" 3368 """ desired size can be entered.</p>"""
3309 )) 3369 ))
3310 self.zoomToAct.triggered.connect(self.__zoom) 3370 self.zoomToAct.triggered.connect(self.__zoom)
3311 self.viewActions.append(self.zoomToAct) 3371 self.viewActions.append(self.zoomToAct)
3312 3372
3313 self.toggleAllAct = E5Action( 3373 self.toggleAllAct = E5Action(
3314 QApplication.translate('ViewManager', 'Toggle all folds'), 3374 QCoreApplication.translate('ViewManager', 'Toggle all folds'),
3315 QApplication.translate('ViewManager', 'Toggle &all folds'), 3375 QCoreApplication.translate('ViewManager', 'Toggle &all folds'),
3316 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds') 3376 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds')
3317 self.toggleAllAct.setStatusTip(QApplication.translate( 3377 self.toggleAllAct.setStatusTip(QCoreApplication.translate(
3318 'ViewManager', 'Toggle all folds')) 3378 'ViewManager', 'Toggle all folds'))
3319 self.toggleAllAct.setWhatsThis(QApplication.translate( 3379 self.toggleAllAct.setWhatsThis(QCoreApplication.translate(
3320 'ViewManager', 3380 'ViewManager',
3321 """<b>Toggle all folds</b>""" 3381 """<b>Toggle all folds</b>"""
3322 """<p>Toggle all folds of the current editor.</p>""" 3382 """<p>Toggle all folds of the current editor.</p>"""
3323 )) 3383 ))
3324 self.toggleAllAct.triggered.connect(self.__toggleAll) 3384 self.toggleAllAct.triggered.connect(self.__toggleAll)
3325 self.viewActions.append(self.toggleAllAct) 3385 self.viewActions.append(self.toggleAllAct)
3326 3386
3327 self.toggleAllChildrenAct = E5Action( 3387 self.toggleAllChildrenAct = E5Action(
3328 QApplication.translate( 3388 QCoreApplication.translate(
3329 'ViewManager', 'Toggle all folds (including children)'), 3389 'ViewManager', 'Toggle all folds (including children)'),
3330 QApplication.translate( 3390 QCoreApplication.translate(
3331 'ViewManager', 'Toggle all &folds (including children)'), 3391 'ViewManager', 'Toggle all &folds (including children)'),
3332 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds_children') 3392 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds_children')
3333 self.toggleAllChildrenAct.setStatusTip(QApplication.translate( 3393 self.toggleAllChildrenAct.setStatusTip(QCoreApplication.translate(
3334 'ViewManager', 'Toggle all folds (including children)')) 3394 'ViewManager', 'Toggle all folds (including children)'))
3335 self.toggleAllChildrenAct.setWhatsThis(QApplication.translate( 3395 self.toggleAllChildrenAct.setWhatsThis(QCoreApplication.translate(
3336 'ViewManager', 3396 'ViewManager',
3337 """<b>Toggle all folds (including children)</b>""" 3397 """<b>Toggle all folds (including children)</b>"""
3338 """<p>Toggle all folds of the current editor including""" 3398 """<p>Toggle all folds of the current editor including"""
3339 """ all children.</p>""" 3399 """ all children.</p>"""
3340 )) 3400 ))
3341 self.toggleAllChildrenAct.triggered.connect( 3401 self.toggleAllChildrenAct.triggered.connect(
3342 self.__toggleAllChildren) 3402 self.__toggleAllChildren)
3343 self.viewActions.append(self.toggleAllChildrenAct) 3403 self.viewActions.append(self.toggleAllChildrenAct)
3344 3404
3345 self.toggleCurrentAct = E5Action( 3405 self.toggleCurrentAct = E5Action(
3346 QApplication.translate('ViewManager', 'Toggle current fold'), 3406 QCoreApplication.translate('ViewManager', 'Toggle current fold'),
3347 QApplication.translate('ViewManager', 'Toggle &current fold'), 3407 QCoreApplication.translate('ViewManager', 'Toggle &current fold'),
3348 0, 0, self.viewFoldActGrp, 'vm_view_toggle_current_fold') 3408 0, 0, self.viewFoldActGrp, 'vm_view_toggle_current_fold')
3349 self.toggleCurrentAct.setStatusTip(QApplication.translate( 3409 self.toggleCurrentAct.setStatusTip(QCoreApplication.translate(
3350 'ViewManager', 'Toggle current fold')) 3410 'ViewManager', 'Toggle current fold'))
3351 self.toggleCurrentAct.setWhatsThis(QApplication.translate( 3411 self.toggleCurrentAct.setWhatsThis(QCoreApplication.translate(
3352 'ViewManager', 3412 'ViewManager',
3353 """<b>Toggle current fold</b>""" 3413 """<b>Toggle current fold</b>"""
3354 """<p>Toggle the folds of the current line of the current""" 3414 """<p>Toggle the folds of the current line of the current"""
3355 """ editor.</p>""" 3415 """ editor.</p>"""
3356 )) 3416 ))
3357 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent) 3417 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent)
3358 self.viewActions.append(self.toggleCurrentAct) 3418 self.viewActions.append(self.toggleCurrentAct)
3359 3419
3360 self.unhighlightAct = E5Action( 3420 self.unhighlightAct = E5Action(
3361 QApplication.translate('ViewManager', 'Remove all highlights'), 3421 QCoreApplication.translate('ViewManager', 'Remove all highlights'),
3362 UI.PixmapCache.getIcon("unhighlight.png"), 3422 UI.PixmapCache.getIcon("unhighlight.png"),
3363 QApplication.translate('ViewManager', 'Remove all highlights'), 3423 QCoreApplication.translate('ViewManager', 'Remove all highlights'),
3364 0, 0, 3424 0, 0,
3365 self, 'vm_view_unhighlight') 3425 self, 'vm_view_unhighlight')
3366 self.unhighlightAct.setStatusTip(QApplication.translate( 3426 self.unhighlightAct.setStatusTip(QCoreApplication.translate(
3367 'ViewManager', 'Remove all highlights')) 3427 'ViewManager', 'Remove all highlights'))
3368 self.unhighlightAct.setWhatsThis(QApplication.translate( 3428 self.unhighlightAct.setWhatsThis(QCoreApplication.translate(
3369 'ViewManager', 3429 'ViewManager',
3370 """<b>Remove all highlights</b>""" 3430 """<b>Remove all highlights</b>"""
3371 """<p>Remove the highlights of all editors.</p>""" 3431 """<p>Remove the highlights of all editors.</p>"""
3372 )) 3432 ))
3373 self.unhighlightAct.triggered.connect(self.__unhighlight) 3433 self.unhighlightAct.triggered.connect(self.__unhighlight)
3374 self.viewActions.append(self.unhighlightAct) 3434 self.viewActions.append(self.unhighlightAct)
3375 3435
3376 self.newDocumentViewAct = E5Action( 3436 self.newDocumentViewAct = E5Action(
3377 QApplication.translate('ViewManager', 'New Document View'), 3437 QCoreApplication.translate('ViewManager', 'New Document View'),
3378 UI.PixmapCache.getIcon("documentNewView.png"), 3438 UI.PixmapCache.getIcon("documentNewView.png"),
3379 QApplication.translate('ViewManager', 'New &Document View'), 3439 QCoreApplication.translate('ViewManager', 'New &Document View'),
3380 0, 0, self, 'vm_view_new_document_view') 3440 0, 0, self, 'vm_view_new_document_view')
3381 self.newDocumentViewAct.setStatusTip(QApplication.translate( 3441 self.newDocumentViewAct.setStatusTip(QCoreApplication.translate(
3382 'ViewManager', 'Open a new view of the current document')) 3442 'ViewManager', 'Open a new view of the current document'))
3383 self.newDocumentViewAct.setWhatsThis(QApplication.translate( 3443 self.newDocumentViewAct.setWhatsThis(QCoreApplication.translate(
3384 'ViewManager', 3444 'ViewManager',
3385 """<b>New Document View</b>""" 3445 """<b>New Document View</b>"""
3386 """<p>Opens a new view of the current document. Both views show""" 3446 """<p>Opens a new view of the current document. Both views show"""
3387 """ the same document. However, the cursors may be positioned""" 3447 """ the same document. However, the cursors may be positioned"""
3388 """ independently.</p>""" 3448 """ independently.</p>"""
3389 )) 3449 ))
3390 self.newDocumentViewAct.triggered.connect(self.__newDocumentView) 3450 self.newDocumentViewAct.triggered.connect(self.__newDocumentView)
3391 self.viewActions.append(self.newDocumentViewAct) 3451 self.viewActions.append(self.newDocumentViewAct)
3392 3452
3393 self.newDocumentSplitViewAct = E5Action( 3453 self.newDocumentSplitViewAct = E5Action(
3394 QApplication.translate( 3454 QCoreApplication.translate(
3395 'ViewManager', 'New Document View (with new split)'), 3455 'ViewManager', 'New Document View (with new split)'),
3396 UI.PixmapCache.getIcon("splitVertical.png"), 3456 UI.PixmapCache.getIcon("splitVertical.png"),
3397 QApplication.translate( 3457 QCoreApplication.translate(
3398 'ViewManager', 'New Document View (with new split)'), 3458 'ViewManager', 'New Document View (with new split)'),
3399 0, 0, self, 'vm_view_new_document_split_view') 3459 0, 0, self, 'vm_view_new_document_split_view')
3400 self.newDocumentSplitViewAct.setStatusTip(QApplication.translate( 3460 self.newDocumentSplitViewAct.setStatusTip(QCoreApplication.translate(
3401 'ViewManager', 3461 'ViewManager',
3402 'Open a new view of the current document in a new split')) 3462 'Open a new view of the current document in a new split'))
3403 self.newDocumentSplitViewAct.setWhatsThis(QApplication.translate( 3463 self.newDocumentSplitViewAct.setWhatsThis(QCoreApplication.translate(
3404 'ViewManager', 3464 'ViewManager',
3405 """<b>New Document View</b>""" 3465 """<b>New Document View</b>"""
3406 """<p>Opens a new view of the current document in a new split.""" 3466 """<p>Opens a new view of the current document in a new split."""
3407 """ Both views show the same document. However, the cursors may""" 3467 """ Both views show the same document. However, the cursors may"""
3408 """ be positioned independently.</p>""" 3468 """ be positioned independently.</p>"""
3410 self.newDocumentSplitViewAct.triggered.connect( 3470 self.newDocumentSplitViewAct.triggered.connect(
3411 self.__newDocumentSplitView) 3471 self.__newDocumentSplitView)
3412 self.viewActions.append(self.newDocumentSplitViewAct) 3472 self.viewActions.append(self.newDocumentSplitViewAct)
3413 3473
3414 self.splitViewAct = E5Action( 3474 self.splitViewAct = E5Action(
3415 QApplication.translate('ViewManager', 'Split view'), 3475 QCoreApplication.translate('ViewManager', 'Split view'),
3416 UI.PixmapCache.getIcon("splitVertical.png"), 3476 UI.PixmapCache.getIcon("splitVertical.png"),
3417 QApplication.translate('ViewManager', '&Split view'), 3477 QCoreApplication.translate('ViewManager', '&Split view'),
3418 0, 0, self, 'vm_view_split_view') 3478 0, 0, self, 'vm_view_split_view')
3419 self.splitViewAct.setStatusTip(QApplication.translate( 3479 self.splitViewAct.setStatusTip(QCoreApplication.translate(
3420 'ViewManager', 'Add a split to the view')) 3480 'ViewManager', 'Add a split to the view'))
3421 self.splitViewAct.setWhatsThis(QApplication.translate( 3481 self.splitViewAct.setWhatsThis(QCoreApplication.translate(
3422 'ViewManager', 3482 'ViewManager',
3423 """<b>Split view</b>""" 3483 """<b>Split view</b>"""
3424 """<p>Add a split to the view.</p>""" 3484 """<p>Add a split to the view.</p>"""
3425 )) 3485 ))
3426 self.splitViewAct.triggered.connect(self.__splitView) 3486 self.splitViewAct.triggered.connect(self.__splitView)
3427 self.viewActions.append(self.splitViewAct) 3487 self.viewActions.append(self.splitViewAct)
3428 3488
3429 self.splitOrientationAct = E5Action( 3489 self.splitOrientationAct = E5Action(
3430 QApplication.translate('ViewManager', 'Arrange horizontally'), 3490 QCoreApplication.translate('ViewManager', 'Arrange horizontally'),
3431 QApplication.translate('ViewManager', 'Arrange &horizontally'), 3491 QCoreApplication.translate('ViewManager', 'Arrange &horizontally'),
3432 0, 0, self, 'vm_view_arrange_horizontally', True) 3492 0, 0, self, 'vm_view_arrange_horizontally', True)
3433 self.splitOrientationAct.setStatusTip(QApplication.translate( 3493 self.splitOrientationAct.setStatusTip(QCoreApplication.translate(
3434 'ViewManager', 'Arrange the splitted views horizontally')) 3494 'ViewManager', 'Arrange the splitted views horizontally'))
3435 self.splitOrientationAct.setWhatsThis(QApplication.translate( 3495 self.splitOrientationAct.setWhatsThis(QCoreApplication.translate(
3436 'ViewManager', 3496 'ViewManager',
3437 """<b>Arrange horizontally</b>""" 3497 """<b>Arrange horizontally</b>"""
3438 """<p>Arrange the splitted views horizontally.</p>""" 3498 """<p>Arrange the splitted views horizontally.</p>"""
3439 )) 3499 ))
3440 self.splitOrientationAct.setChecked(False) 3500 self.splitOrientationAct.setChecked(False)
3441 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation) 3501 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation)
3442 self.viewActions.append(self.splitOrientationAct) 3502 self.viewActions.append(self.splitOrientationAct)
3443 3503
3444 self.splitRemoveAct = E5Action( 3504 self.splitRemoveAct = E5Action(
3445 QApplication.translate('ViewManager', 'Remove split'), 3505 QCoreApplication.translate('ViewManager', 'Remove split'),
3446 UI.PixmapCache.getIcon("remsplitVertical.png"), 3506 UI.PixmapCache.getIcon("remsplitVertical.png"),
3447 QApplication.translate('ViewManager', '&Remove split'), 3507 QCoreApplication.translate('ViewManager', '&Remove split'),
3448 0, 0, self, 'vm_view_remove_split') 3508 0, 0, self, 'vm_view_remove_split')
3449 self.splitRemoveAct.setStatusTip(QApplication.translate( 3509 self.splitRemoveAct.setStatusTip(QCoreApplication.translate(
3450 'ViewManager', 'Remove the current split')) 3510 'ViewManager', 'Remove the current split'))
3451 self.splitRemoveAct.setWhatsThis(QApplication.translate( 3511 self.splitRemoveAct.setWhatsThis(QCoreApplication.translate(
3452 'ViewManager', 3512 'ViewManager',
3453 """<b>Remove split</b>""" 3513 """<b>Remove split</b>"""
3454 """<p>Remove the current split.</p>""" 3514 """<p>Remove the current split.</p>"""
3455 )) 3515 ))
3456 self.splitRemoveAct.triggered.connect(self.removeSplit) 3516 self.splitRemoveAct.triggered.connect(self.removeSplit)
3457 self.viewActions.append(self.splitRemoveAct) 3517 self.viewActions.append(self.splitRemoveAct)
3458 3518
3459 self.nextSplitAct = E5Action( 3519 self.nextSplitAct = E5Action(
3460 QApplication.translate('ViewManager', 'Next split'), 3520 QCoreApplication.translate('ViewManager', 'Next split'),
3461 QApplication.translate('ViewManager', '&Next split'), 3521 QCoreApplication.translate('ViewManager', '&Next split'),
3462 QKeySequence(QApplication.translate( 3522 QKeySequence(QCoreApplication.translate(
3463 'ViewManager', "Ctrl+Alt+N", "View|Next split")), 3523 'ViewManager', "Ctrl+Alt+N", "View|Next split")),
3464 0, 3524 0,
3465 self, 'vm_next_split') 3525 self, 'vm_next_split')
3466 self.nextSplitAct.setStatusTip(QApplication.translate( 3526 self.nextSplitAct.setStatusTip(QCoreApplication.translate(
3467 'ViewManager', 'Move to the next split')) 3527 'ViewManager', 'Move to the next split'))
3468 self.nextSplitAct.setWhatsThis(QApplication.translate( 3528 self.nextSplitAct.setWhatsThis(QCoreApplication.translate(
3469 'ViewManager', 3529 'ViewManager',
3470 """<b>Next split</b>""" 3530 """<b>Next split</b>"""
3471 """<p>Move to the next split.</p>""" 3531 """<p>Move to the next split.</p>"""
3472 )) 3532 ))
3473 self.nextSplitAct.triggered.connect(self.nextSplit) 3533 self.nextSplitAct.triggered.connect(self.nextSplit)
3474 self.viewActions.append(self.nextSplitAct) 3534 self.viewActions.append(self.nextSplitAct)
3475 3535
3476 self.prevSplitAct = E5Action( 3536 self.prevSplitAct = E5Action(
3477 QApplication.translate('ViewManager', 'Previous split'), 3537 QCoreApplication.translate('ViewManager', 'Previous split'),
3478 QApplication.translate('ViewManager', '&Previous split'), 3538 QCoreApplication.translate('ViewManager', '&Previous split'),
3479 QKeySequence(QApplication.translate( 3539 QKeySequence(QCoreApplication.translate(
3480 'ViewManager', "Ctrl+Alt+P", "View|Previous split")), 3540 'ViewManager', "Ctrl+Alt+P", "View|Previous split")),
3481 0, self, 'vm_previous_split') 3541 0, self, 'vm_previous_split')
3482 self.prevSplitAct.setStatusTip(QApplication.translate( 3542 self.prevSplitAct.setStatusTip(QCoreApplication.translate(
3483 'ViewManager', 'Move to the previous split')) 3543 'ViewManager', 'Move to the previous split'))
3484 self.prevSplitAct.setWhatsThis(QApplication.translate( 3544 self.prevSplitAct.setWhatsThis(QCoreApplication.translate(
3485 'ViewManager', 3545 'ViewManager',
3486 """<b>Previous split</b>""" 3546 """<b>Previous split</b>"""
3487 """<p>Move to the previous split.</p>""" 3547 """<p>Move to the previous split.</p>"""
3488 )) 3548 ))
3489 self.prevSplitAct.triggered.connect(self.prevSplit) 3549 self.prevSplitAct.triggered.connect(self.prevSplit)
3490 self.viewActions.append(self.prevSplitAct) 3550 self.viewActions.append(self.prevSplitAct)
3491 3551
3492 self.previewAct = E5Action( 3552 self.previewAct = E5Action(
3493 QApplication.translate('ViewManager', 'Preview'), 3553 QCoreApplication.translate('ViewManager', 'Preview'),
3494 UI.PixmapCache.getIcon("previewer.png"), 3554 UI.PixmapCache.getIcon("previewer.png"),
3495 QApplication.translate('ViewManager', 'Preview'), 3555 QCoreApplication.translate('ViewManager', 'Preview'),
3496 0, 0, self, 'vm_preview', True) 3556 0, 0, self, 'vm_preview', True)
3497 self.previewAct.setStatusTip(QApplication.translate( 3557 self.previewAct.setStatusTip(QCoreApplication.translate(
3498 'ViewManager', 'Preview the current file in the web browser')) 3558 'ViewManager', 'Preview the current file in the web browser'))
3499 self.previewAct.setWhatsThis(QApplication.translate( 3559 self.previewAct.setWhatsThis(QCoreApplication.translate(
3500 'ViewManager', 3560 'ViewManager',
3501 """<b>Preview</b>""" 3561 """<b>Preview</b>"""
3502 """<p>This opens the web browser with a preview of""" 3562 """<p>This opens the web browser with a preview of"""
3503 """ the current file.</p>""" 3563 """ the current file.</p>"""
3504 )) 3564 ))
3523 """ 3583 """
3524 Public method to create the View menu. 3584 Public method to create the View menu.
3525 3585
3526 @return the generated menu 3586 @return the generated menu
3527 """ 3587 """
3528 menu = QMenu(QApplication.translate('ViewManager', '&View'), self.ui) 3588 menu = QMenu(QCoreApplication.translate('ViewManager', '&View'),
3589 self.ui)
3529 menu.setTearOffEnabled(True) 3590 menu.setTearOffEnabled(True)
3530 menu.addActions(self.viewActGrp.actions()) 3591 menu.addActions(self.viewActGrp.actions())
3531 menu.addSeparator() 3592 menu.addSeparator()
3532 menu.addActions(self.viewFoldActGrp.actions()) 3593 menu.addActions(self.viewFoldActGrp.actions())
3533 menu.addSeparator() 3594 menu.addSeparator()
3553 3614
3554 @param toolbarManager reference to a toolbar manager object 3615 @param toolbarManager reference to a toolbar manager object
3555 (E5ToolBarManager) 3616 (E5ToolBarManager)
3556 @return the generated toolbar 3617 @return the generated toolbar
3557 """ 3618 """
3558 tb = QToolBar(QApplication.translate('ViewManager', 'View'), self.ui) 3619 tb = QToolBar(QCoreApplication.translate('ViewManager', 'View'),
3620 self.ui)
3559 tb.setIconSize(UI.Config.ToolBarIconSize) 3621 tb.setIconSize(UI.Config.ToolBarIconSize)
3560 tb.setObjectName("ViewToolbar") 3622 tb.setObjectName("ViewToolbar")
3561 tb.setToolTip(QApplication.translate('ViewManager', 'View')) 3623 tb.setToolTip(QCoreApplication.translate('ViewManager', 'View'))
3562 3624
3563 tb.addActions(self.viewActGrp.actions()) 3625 tb.addActions(self.viewActGrp.actions())
3564 tb.addSeparator() 3626 tb.addSeparator()
3565 tb.addAction(self.previewAct) 3627 tb.addAction(self.previewAct)
3566 tb.addSeparator() 3628 tb.addSeparator()
3585 commands. 3647 commands.
3586 """ 3648 """
3587 self.macroActGrp = createActionGroup(self) 3649 self.macroActGrp = createActionGroup(self)
3588 3650
3589 self.macroStartRecAct = E5Action( 3651 self.macroStartRecAct = E5Action(
3590 QApplication.translate('ViewManager', 'Start Macro Recording'), 3652 QCoreApplication.translate(
3591 QApplication.translate('ViewManager', 'S&tart Macro Recording'), 3653 'ViewManager', 'Start Macro Recording'),
3654 QCoreApplication.translate(
3655 'ViewManager', 'S&tart Macro Recording'),
3592 0, 0, self.macroActGrp, 'vm_macro_start_recording') 3656 0, 0, self.macroActGrp, 'vm_macro_start_recording')
3593 self.macroStartRecAct.setStatusTip(QApplication.translate( 3657 self.macroStartRecAct.setStatusTip(QCoreApplication.translate(
3594 'ViewManager', 'Start Macro Recording')) 3658 'ViewManager', 'Start Macro Recording'))
3595 self.macroStartRecAct.setWhatsThis(QApplication.translate( 3659 self.macroStartRecAct.setWhatsThis(QCoreApplication.translate(
3596 'ViewManager', 3660 'ViewManager',
3597 """<b>Start Macro Recording</b>""" 3661 """<b>Start Macro Recording</b>"""
3598 """<p>Start recording editor commands into a new macro.</p>""" 3662 """<p>Start recording editor commands into a new macro.</p>"""
3599 )) 3663 ))
3600 self.macroStartRecAct.triggered.connect(self.__macroStartRecording) 3664 self.macroStartRecAct.triggered.connect(self.__macroStartRecording)
3601 self.macroActions.append(self.macroStartRecAct) 3665 self.macroActions.append(self.macroStartRecAct)
3602 3666
3603 self.macroStopRecAct = E5Action( 3667 self.macroStopRecAct = E5Action(
3604 QApplication.translate('ViewManager', 'Stop Macro Recording'), 3668 QCoreApplication.translate('ViewManager', 'Stop Macro Recording'),
3605 QApplication.translate('ViewManager', 'Sto&p Macro Recording'), 3669 QCoreApplication.translate('ViewManager', 'Sto&p Macro Recording'),
3606 0, 0, self.macroActGrp, 'vm_macro_stop_recording') 3670 0, 0, self.macroActGrp, 'vm_macro_stop_recording')
3607 self.macroStopRecAct.setStatusTip(QApplication.translate( 3671 self.macroStopRecAct.setStatusTip(QCoreApplication.translate(
3608 'ViewManager', 'Stop Macro Recording')) 3672 'ViewManager', 'Stop Macro Recording'))
3609 self.macroStopRecAct.setWhatsThis(QApplication.translate( 3673 self.macroStopRecAct.setWhatsThis(QCoreApplication.translate(
3610 'ViewManager', 3674 'ViewManager',
3611 """<b>Stop Macro Recording</b>""" 3675 """<b>Stop Macro Recording</b>"""
3612 """<p>Stop recording editor commands into a new macro.</p>""" 3676 """<p>Stop recording editor commands into a new macro.</p>"""
3613 )) 3677 ))
3614 self.macroStopRecAct.triggered.connect(self.__macroStopRecording) 3678 self.macroStopRecAct.triggered.connect(self.__macroStopRecording)
3615 self.macroActions.append(self.macroStopRecAct) 3679 self.macroActions.append(self.macroStopRecAct)
3616 3680
3617 self.macroRunAct = E5Action( 3681 self.macroRunAct = E5Action(
3618 QApplication.translate('ViewManager', 'Run Macro'), 3682 QCoreApplication.translate('ViewManager', 'Run Macro'),
3619 QApplication.translate('ViewManager', '&Run Macro'), 3683 QCoreApplication.translate('ViewManager', '&Run Macro'),
3620 0, 0, self.macroActGrp, 'vm_macro_run') 3684 0, 0, self.macroActGrp, 'vm_macro_run')
3621 self.macroRunAct.setStatusTip(QApplication.translate( 3685 self.macroRunAct.setStatusTip(QCoreApplication.translate(
3622 'ViewManager', 'Run Macro')) 3686 'ViewManager', 'Run Macro'))
3623 self.macroRunAct.setWhatsThis(QApplication.translate( 3687 self.macroRunAct.setWhatsThis(QCoreApplication.translate(
3624 'ViewManager', 3688 'ViewManager',
3625 """<b>Run Macro</b>""" 3689 """<b>Run Macro</b>"""
3626 """<p>Run a previously recorded editor macro.</p>""" 3690 """<p>Run a previously recorded editor macro.</p>"""
3627 )) 3691 ))
3628 self.macroRunAct.triggered.connect(self.__macroRun) 3692 self.macroRunAct.triggered.connect(self.__macroRun)
3629 self.macroActions.append(self.macroRunAct) 3693 self.macroActions.append(self.macroRunAct)
3630 3694
3631 self.macroDeleteAct = E5Action( 3695 self.macroDeleteAct = E5Action(
3632 QApplication.translate('ViewManager', 'Delete Macro'), 3696 QCoreApplication.translate('ViewManager', 'Delete Macro'),
3633 QApplication.translate('ViewManager', '&Delete Macro'), 3697 QCoreApplication.translate('ViewManager', '&Delete Macro'),
3634 0, 0, self.macroActGrp, 'vm_macro_delete') 3698 0, 0, self.macroActGrp, 'vm_macro_delete')
3635 self.macroDeleteAct.setStatusTip(QApplication.translate( 3699 self.macroDeleteAct.setStatusTip(QCoreApplication.translate(
3636 'ViewManager', 'Delete Macro')) 3700 'ViewManager', 'Delete Macro'))
3637 self.macroDeleteAct.setWhatsThis(QApplication.translate( 3701 self.macroDeleteAct.setWhatsThis(QCoreApplication.translate(
3638 'ViewManager', 3702 'ViewManager',
3639 """<b>Delete Macro</b>""" 3703 """<b>Delete Macro</b>"""
3640 """<p>Delete a previously recorded editor macro.</p>""" 3704 """<p>Delete a previously recorded editor macro.</p>"""
3641 )) 3705 ))
3642 self.macroDeleteAct.triggered.connect(self.__macroDelete) 3706 self.macroDeleteAct.triggered.connect(self.__macroDelete)
3643 self.macroActions.append(self.macroDeleteAct) 3707 self.macroActions.append(self.macroDeleteAct)
3644 3708
3645 self.macroLoadAct = E5Action( 3709 self.macroLoadAct = E5Action(
3646 QApplication.translate('ViewManager', 'Load Macro'), 3710 QCoreApplication.translate('ViewManager', 'Load Macro'),
3647 QApplication.translate('ViewManager', '&Load Macro'), 3711 QCoreApplication.translate('ViewManager', '&Load Macro'),
3648 0, 0, self.macroActGrp, 'vm_macro_load') 3712 0, 0, self.macroActGrp, 'vm_macro_load')
3649 self.macroLoadAct.setStatusTip(QApplication.translate( 3713 self.macroLoadAct.setStatusTip(QCoreApplication.translate(
3650 'ViewManager', 'Load Macro')) 3714 'ViewManager', 'Load Macro'))
3651 self.macroLoadAct.setWhatsThis(QApplication.translate( 3715 self.macroLoadAct.setWhatsThis(QCoreApplication.translate(
3652 'ViewManager', 3716 'ViewManager',
3653 """<b>Load Macro</b>""" 3717 """<b>Load Macro</b>"""
3654 """<p>Load an editor macro from a file.</p>""" 3718 """<p>Load an editor macro from a file.</p>"""
3655 )) 3719 ))
3656 self.macroLoadAct.triggered.connect(self.__macroLoad) 3720 self.macroLoadAct.triggered.connect(self.__macroLoad)
3657 self.macroActions.append(self.macroLoadAct) 3721 self.macroActions.append(self.macroLoadAct)
3658 3722
3659 self.macroSaveAct = E5Action( 3723 self.macroSaveAct = E5Action(
3660 QApplication.translate('ViewManager', 'Save Macro'), 3724 QCoreApplication.translate('ViewManager', 'Save Macro'),
3661 QApplication.translate('ViewManager', '&Save Macro'), 3725 QCoreApplication.translate('ViewManager', '&Save Macro'),
3662 0, 0, self.macroActGrp, 'vm_macro_save') 3726 0, 0, self.macroActGrp, 'vm_macro_save')
3663 self.macroSaveAct.setStatusTip(QApplication.translate( 3727 self.macroSaveAct.setStatusTip(QCoreApplication.translate(
3664 'ViewManager', 'Save Macro')) 3728 'ViewManager', 'Save Macro'))
3665 self.macroSaveAct.setWhatsThis(QApplication.translate( 3729 self.macroSaveAct.setWhatsThis(QCoreApplication.translate(
3666 'ViewManager', 3730 'ViewManager',
3667 """<b>Save Macro</b>""" 3731 """<b>Save Macro</b>"""
3668 """<p>Save a previously recorded editor macro to a file.</p>""" 3732 """<p>Save a previously recorded editor macro to a file.</p>"""
3669 )) 3733 ))
3670 self.macroSaveAct.triggered.connect(self.__macroSave) 3734 self.macroSaveAct.triggered.connect(self.__macroSave)
3676 """ 3740 """
3677 Public method to create the Macro menu. 3741 Public method to create the Macro menu.
3678 3742
3679 @return the generated menu 3743 @return the generated menu
3680 """ 3744 """
3681 menu = QMenu(QApplication.translate('ViewManager', "&Macros"), self.ui) 3745 menu = QMenu(QCoreApplication.translate('ViewManager', "&Macros"),
3746 self.ui)
3682 menu.setTearOffEnabled(True) 3747 menu.setTearOffEnabled(True)
3683 menu.addActions(self.macroActGrp.actions()) 3748 menu.addActions(self.macroActGrp.actions())
3684 3749
3685 return menu 3750 return menu
3686 3751
3694 commands. 3759 commands.
3695 """ 3760 """
3696 self.bookmarkActGrp = createActionGroup(self) 3761 self.bookmarkActGrp = createActionGroup(self)
3697 3762
3698 self.bookmarkToggleAct = E5Action( 3763 self.bookmarkToggleAct = E5Action(
3699 QApplication.translate('ViewManager', 'Toggle Bookmark'), 3764 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'),
3700 UI.PixmapCache.getIcon("bookmarkToggle.png"), 3765 UI.PixmapCache.getIcon("bookmarkToggle.png"),
3701 QApplication.translate('ViewManager', '&Toggle Bookmark'), 3766 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'),
3702 QKeySequence(QApplication.translate( 3767 QKeySequence(QCoreApplication.translate(
3703 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")), 3768 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")),
3704 0, 3769 0,
3705 self.bookmarkActGrp, 'vm_bookmark_toggle') 3770 self.bookmarkActGrp, 'vm_bookmark_toggle')
3706 self.bookmarkToggleAct.setStatusTip(QApplication.translate( 3771 self.bookmarkToggleAct.setStatusTip(QCoreApplication.translate(
3707 'ViewManager', 'Toggle Bookmark')) 3772 'ViewManager', 'Toggle Bookmark'))
3708 self.bookmarkToggleAct.setWhatsThis(QApplication.translate( 3773 self.bookmarkToggleAct.setWhatsThis(QCoreApplication.translate(
3709 'ViewManager', 3774 'ViewManager',
3710 """<b>Toggle Bookmark</b>""" 3775 """<b>Toggle Bookmark</b>"""
3711 """<p>Toggle a bookmark at the current line of the current""" 3776 """<p>Toggle a bookmark at the current line of the current"""
3712 """ editor.</p>""" 3777 """ editor.</p>"""
3713 )) 3778 ))
3714 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark) 3779 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark)
3715 self.bookmarkActions.append(self.bookmarkToggleAct) 3780 self.bookmarkActions.append(self.bookmarkToggleAct)
3716 3781
3717 self.bookmarkNextAct = E5Action( 3782 self.bookmarkNextAct = E5Action(
3718 QApplication.translate('ViewManager', 'Next Bookmark'), 3783 QCoreApplication.translate('ViewManager', 'Next Bookmark'),
3719 UI.PixmapCache.getIcon("bookmarkNext.png"), 3784 UI.PixmapCache.getIcon("bookmarkNext.png"),
3720 QApplication.translate('ViewManager', '&Next Bookmark'), 3785 QCoreApplication.translate('ViewManager', '&Next Bookmark'),
3721 QKeySequence(QApplication.translate( 3786 QKeySequence(QCoreApplication.translate(
3722 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")), 3787 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")),
3723 0, 3788 0,
3724 self.bookmarkActGrp, 'vm_bookmark_next') 3789 self.bookmarkActGrp, 'vm_bookmark_next')
3725 self.bookmarkNextAct.setStatusTip(QApplication.translate( 3790 self.bookmarkNextAct.setStatusTip(QCoreApplication.translate(
3726 'ViewManager', 'Next Bookmark')) 3791 'ViewManager', 'Next Bookmark'))
3727 self.bookmarkNextAct.setWhatsThis(QApplication.translate( 3792 self.bookmarkNextAct.setWhatsThis(QCoreApplication.translate(
3728 'ViewManager', 3793 'ViewManager',
3729 """<b>Next Bookmark</b>""" 3794 """<b>Next Bookmark</b>"""
3730 """<p>Go to next bookmark of the current editor.</p>""" 3795 """<p>Go to next bookmark of the current editor.</p>"""
3731 )) 3796 ))
3732 self.bookmarkNextAct.triggered.connect(self.__nextBookmark) 3797 self.bookmarkNextAct.triggered.connect(self.__nextBookmark)
3733 self.bookmarkActions.append(self.bookmarkNextAct) 3798 self.bookmarkActions.append(self.bookmarkNextAct)
3734 3799
3735 self.bookmarkPreviousAct = E5Action( 3800 self.bookmarkPreviousAct = E5Action(
3736 QApplication.translate('ViewManager', 'Previous Bookmark'), 3801 QCoreApplication.translate('ViewManager', 'Previous Bookmark'),
3737 UI.PixmapCache.getIcon("bookmarkPrevious.png"), 3802 UI.PixmapCache.getIcon("bookmarkPrevious.png"),
3738 QApplication.translate('ViewManager', '&Previous Bookmark'), 3803 QCoreApplication.translate('ViewManager', '&Previous Bookmark'),
3739 QKeySequence(QApplication.translate( 3804 QKeySequence(QCoreApplication.translate(
3740 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")), 3805 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")),
3741 0, 3806 0,
3742 self.bookmarkActGrp, 'vm_bookmark_previous') 3807 self.bookmarkActGrp, 'vm_bookmark_previous')
3743 self.bookmarkPreviousAct.setStatusTip(QApplication.translate( 3808 self.bookmarkPreviousAct.setStatusTip(QCoreApplication.translate(
3744 'ViewManager', 'Previous Bookmark')) 3809 'ViewManager', 'Previous Bookmark'))
3745 self.bookmarkPreviousAct.setWhatsThis(QApplication.translate( 3810 self.bookmarkPreviousAct.setWhatsThis(QCoreApplication.translate(
3746 'ViewManager', 3811 'ViewManager',
3747 """<b>Previous Bookmark</b>""" 3812 """<b>Previous Bookmark</b>"""
3748 """<p>Go to previous bookmark of the current editor.</p>""" 3813 """<p>Go to previous bookmark of the current editor.</p>"""
3749 )) 3814 ))
3750 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark) 3815 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark)
3751 self.bookmarkActions.append(self.bookmarkPreviousAct) 3816 self.bookmarkActions.append(self.bookmarkPreviousAct)
3752 3817
3753 self.bookmarkClearAct = E5Action( 3818 self.bookmarkClearAct = E5Action(
3754 QApplication.translate('ViewManager', 'Clear Bookmarks'), 3819 QCoreApplication.translate('ViewManager', 'Clear Bookmarks'),
3755 QApplication.translate('ViewManager', '&Clear Bookmarks'), 3820 QCoreApplication.translate('ViewManager', '&Clear Bookmarks'),
3756 QKeySequence(QApplication.translate( 3821 QKeySequence(QCoreApplication.translate(
3757 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")), 3822 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")),
3758 0, 3823 0,
3759 self.bookmarkActGrp, 'vm_bookmark_clear') 3824 self.bookmarkActGrp, 'vm_bookmark_clear')
3760 self.bookmarkClearAct.setStatusTip(QApplication.translate( 3825 self.bookmarkClearAct.setStatusTip(QCoreApplication.translate(
3761 'ViewManager', 'Clear Bookmarks')) 3826 'ViewManager', 'Clear Bookmarks'))
3762 self.bookmarkClearAct.setWhatsThis(QApplication.translate( 3827 self.bookmarkClearAct.setWhatsThis(QCoreApplication.translate(
3763 'ViewManager', 3828 'ViewManager',
3764 """<b>Clear Bookmarks</b>""" 3829 """<b>Clear Bookmarks</b>"""
3765 """<p>Clear bookmarks of all editors.</p>""" 3830 """<p>Clear bookmarks of all editors.</p>"""
3766 )) 3831 ))
3767 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks) 3832 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks)
3768 self.bookmarkActions.append(self.bookmarkClearAct) 3833 self.bookmarkActions.append(self.bookmarkClearAct)
3769 3834
3770 self.syntaxErrorGotoAct = E5Action( 3835 self.syntaxErrorGotoAct = E5Action(
3771 QApplication.translate('ViewManager', 'Goto Syntax Error'), 3836 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'),
3772 UI.PixmapCache.getIcon("syntaxErrorGoto.png"), 3837 UI.PixmapCache.getIcon("syntaxErrorGoto.png"),
3773 QApplication.translate('ViewManager', '&Goto Syntax Error'), 3838 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'),
3774 0, 0, 3839 0, 0,
3775 self.bookmarkActGrp, 'vm_syntaxerror_goto') 3840 self.bookmarkActGrp, 'vm_syntaxerror_goto')
3776 self.syntaxErrorGotoAct.setStatusTip(QApplication.translate( 3841 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate(
3777 'ViewManager', 'Goto Syntax Error')) 3842 'ViewManager', 'Goto Syntax Error'))
3778 self.syntaxErrorGotoAct.setWhatsThis(QApplication.translate( 3843 self.syntaxErrorGotoAct.setWhatsThis(QCoreApplication.translate(
3779 'ViewManager', 3844 'ViewManager',
3780 """<b>Goto Syntax Error</b>""" 3845 """<b>Goto Syntax Error</b>"""
3781 """<p>Go to next syntax error of the current editor.</p>""" 3846 """<p>Go to next syntax error of the current editor.</p>"""
3782 )) 3847 ))
3783 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError) 3848 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError)
3784 self.bookmarkActions.append(self.syntaxErrorGotoAct) 3849 self.bookmarkActions.append(self.syntaxErrorGotoAct)
3785 3850
3786 self.syntaxErrorClearAct = E5Action( 3851 self.syntaxErrorClearAct = E5Action(
3787 QApplication.translate('ViewManager', 'Clear Syntax Errors'), 3852 QCoreApplication.translate('ViewManager', 'Clear Syntax Errors'),
3788 QApplication.translate('ViewManager', 'Clear &Syntax Errors'), 3853 QCoreApplication.translate('ViewManager', 'Clear &Syntax Errors'),
3789 0, 0, 3854 0, 0,
3790 self.bookmarkActGrp, 'vm_syntaxerror_clear') 3855 self.bookmarkActGrp, 'vm_syntaxerror_clear')
3791 self.syntaxErrorClearAct.setStatusTip(QApplication.translate( 3856 self.syntaxErrorClearAct.setStatusTip(QCoreApplication.translate(
3792 'ViewManager', 'Clear Syntax Errors')) 3857 'ViewManager', 'Clear Syntax Errors'))
3793 self.syntaxErrorClearAct.setWhatsThis(QApplication.translate( 3858 self.syntaxErrorClearAct.setWhatsThis(QCoreApplication.translate(
3794 'ViewManager', 3859 'ViewManager',
3795 """<b>Clear Syntax Errors</b>""" 3860 """<b>Clear Syntax Errors</b>"""
3796 """<p>Clear syntax errors of all editors.</p>""" 3861 """<p>Clear syntax errors of all editors.</p>"""
3797 )) 3862 ))
3798 self.syntaxErrorClearAct.triggered.connect( 3863 self.syntaxErrorClearAct.triggered.connect(
3799 self.__clearAllSyntaxErrors) 3864 self.__clearAllSyntaxErrors)
3800 self.bookmarkActions.append(self.syntaxErrorClearAct) 3865 self.bookmarkActions.append(self.syntaxErrorClearAct)
3801 3866
3802 self.warningsNextAct = E5Action( 3867 self.warningsNextAct = E5Action(
3803 QApplication.translate('ViewManager', 'Next warning message'), 3868 QCoreApplication.translate('ViewManager', 'Next warning message'),
3804 UI.PixmapCache.getIcon("warningNext.png"), 3869 UI.PixmapCache.getIcon("warningNext.png"),
3805 QApplication.translate('ViewManager', '&Next warning message'), 3870 QCoreApplication.translate('ViewManager', '&Next warning message'),
3806 0, 0, 3871 0, 0,
3807 self.bookmarkActGrp, 'vm_warning_next') 3872 self.bookmarkActGrp, 'vm_warning_next')
3808 self.warningsNextAct.setStatusTip(QApplication.translate( 3873 self.warningsNextAct.setStatusTip(QCoreApplication.translate(
3809 'ViewManager', 'Next warning message')) 3874 'ViewManager', 'Next warning message'))
3810 self.warningsNextAct.setWhatsThis(QApplication.translate( 3875 self.warningsNextAct.setWhatsThis(QCoreApplication.translate(
3811 'ViewManager', 3876 'ViewManager',
3812 """<b>Next warning message</b>""" 3877 """<b>Next warning message</b>"""
3813 """<p>Go to next line of the current editor""" 3878 """<p>Go to next line of the current editor"""
3814 """ having a pyflakes warning.</p>""" 3879 """ having a pyflakes warning.</p>"""
3815 )) 3880 ))
3816 self.warningsNextAct.triggered.connect(self.__nextWarning) 3881 self.warningsNextAct.triggered.connect(self.__nextWarning)
3817 self.bookmarkActions.append(self.warningsNextAct) 3882 self.bookmarkActions.append(self.warningsNextAct)
3818 3883
3819 self.warningsPreviousAct = E5Action( 3884 self.warningsPreviousAct = E5Action(
3820 QApplication.translate('ViewManager', 'Previous warning message'), 3885 QCoreApplication.translate(
3886 'ViewManager', 'Previous warning message'),
3821 UI.PixmapCache.getIcon("warningPrev.png"), 3887 UI.PixmapCache.getIcon("warningPrev.png"),
3822 QApplication.translate( 3888 QCoreApplication.translate(
3823 'ViewManager', '&Previous warning message'), 3889 'ViewManager', '&Previous warning message'),
3824 0, 0, 3890 0, 0,
3825 self.bookmarkActGrp, 'vm_warning_previous') 3891 self.bookmarkActGrp, 'vm_warning_previous')
3826 self.warningsPreviousAct.setStatusTip(QApplication.translate( 3892 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate(
3827 'ViewManager', 'Previous warning message')) 3893 'ViewManager', 'Previous warning message'))
3828 self.warningsPreviousAct.setWhatsThis(QApplication.translate( 3894 self.warningsPreviousAct.setWhatsThis(QCoreApplication.translate(
3829 'ViewManager', 3895 'ViewManager',
3830 """<b>Previous warning message</b>""" 3896 """<b>Previous warning message</b>"""
3831 """<p>Go to previous line of the current editor""" 3897 """<p>Go to previous line of the current editor"""
3832 """ having a pyflakes warning.</p>""" 3898 """ having a pyflakes warning.</p>"""
3833 )) 3899 ))
3834 self.warningsPreviousAct.triggered.connect(self.__previousWarning) 3900 self.warningsPreviousAct.triggered.connect(self.__previousWarning)
3835 self.bookmarkActions.append(self.warningsPreviousAct) 3901 self.bookmarkActions.append(self.warningsPreviousAct)
3836 3902
3837 self.warningsClearAct = E5Action( 3903 self.warningsClearAct = E5Action(
3838 QApplication.translate('ViewManager', 'Clear Warning Messages'), 3904 QCoreApplication.translate(
3839 QApplication.translate('ViewManager', 'Clear &Warning Messages'), 3905 'ViewManager', 'Clear Warning Messages'),
3906 QCoreApplication.translate(
3907 'ViewManager', 'Clear &Warning Messages'),
3840 0, 0, 3908 0, 0,
3841 self.bookmarkActGrp, 'vm_warnings_clear') 3909 self.bookmarkActGrp, 'vm_warnings_clear')
3842 self.warningsClearAct.setStatusTip(QApplication.translate( 3910 self.warningsClearAct.setStatusTip(QCoreApplication.translate(
3843 'ViewManager', 'Clear Warning Messages')) 3911 'ViewManager', 'Clear Warning Messages'))
3844 self.warningsClearAct.setWhatsThis(QApplication.translate( 3912 self.warningsClearAct.setWhatsThis(QCoreApplication.translate(
3845 'ViewManager', 3913 'ViewManager',
3846 """<b>Clear Warning Messages</b>""" 3914 """<b>Clear Warning Messages</b>"""
3847 """<p>Clear pyflakes warning messages of all editors.</p>""" 3915 """<p>Clear pyflakes warning messages of all editors.</p>"""
3848 )) 3916 ))
3849 self.warningsClearAct.triggered.connect(self.__clearAllWarnings) 3917 self.warningsClearAct.triggered.connect(self.__clearAllWarnings)
3850 self.bookmarkActions.append(self.warningsClearAct) 3918 self.bookmarkActions.append(self.warningsClearAct)
3851 3919
3852 self.notcoveredNextAct = E5Action( 3920 self.notcoveredNextAct = E5Action(
3853 QApplication.translate('ViewManager', 'Next uncovered line'), 3921 QCoreApplication.translate('ViewManager', 'Next uncovered line'),
3854 UI.PixmapCache.getIcon("notcoveredNext.png"), 3922 UI.PixmapCache.getIcon("notcoveredNext.png"),
3855 QApplication.translate('ViewManager', '&Next uncovered line'), 3923 QCoreApplication.translate('ViewManager', '&Next uncovered line'),
3856 0, 0, 3924 0, 0,
3857 self.bookmarkActGrp, 'vm_uncovered_next') 3925 self.bookmarkActGrp, 'vm_uncovered_next')
3858 self.notcoveredNextAct.setStatusTip(QApplication.translate( 3926 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate(
3859 'ViewManager', 'Next uncovered line')) 3927 'ViewManager', 'Next uncovered line'))
3860 self.notcoveredNextAct.setWhatsThis(QApplication.translate( 3928 self.notcoveredNextAct.setWhatsThis(QCoreApplication.translate(
3861 'ViewManager', 3929 'ViewManager',
3862 """<b>Next uncovered line</b>""" 3930 """<b>Next uncovered line</b>"""
3863 """<p>Go to next line of the current editor marked as not""" 3931 """<p>Go to next line of the current editor marked as not"""
3864 """ covered.</p>""" 3932 """ covered.</p>"""
3865 )) 3933 ))
3866 self.notcoveredNextAct.triggered.connect(self.__nextUncovered) 3934 self.notcoveredNextAct.triggered.connect(self.__nextUncovered)
3867 self.bookmarkActions.append(self.notcoveredNextAct) 3935 self.bookmarkActions.append(self.notcoveredNextAct)
3868 3936
3869 self.notcoveredPreviousAct = E5Action( 3937 self.notcoveredPreviousAct = E5Action(
3870 QApplication.translate('ViewManager', 'Previous uncovered line'), 3938 QCoreApplication.translate(
3939 'ViewManager', 'Previous uncovered line'),
3871 UI.PixmapCache.getIcon("notcoveredPrev.png"), 3940 UI.PixmapCache.getIcon("notcoveredPrev.png"),
3872 QApplication.translate( 3941 QCoreApplication.translate(
3873 'ViewManager', '&Previous uncovered line'), 3942 'ViewManager', '&Previous uncovered line'),
3874 0, 0, 3943 0, 0,
3875 self.bookmarkActGrp, 'vm_uncovered_previous') 3944 self.bookmarkActGrp, 'vm_uncovered_previous')
3876 self.notcoveredPreviousAct.setStatusTip(QApplication.translate( 3945 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate(
3877 'ViewManager', 'Previous uncovered line')) 3946 'ViewManager', 'Previous uncovered line'))
3878 self.notcoveredPreviousAct.setWhatsThis(QApplication.translate( 3947 self.notcoveredPreviousAct.setWhatsThis(QCoreApplication.translate(
3879 'ViewManager', 3948 'ViewManager',
3880 """<b>Previous uncovered line</b>""" 3949 """<b>Previous uncovered line</b>"""
3881 """<p>Go to previous line of the current editor marked""" 3950 """<p>Go to previous line of the current editor marked"""
3882 """ as not covered.</p>""" 3951 """ as not covered.</p>"""
3883 )) 3952 ))
3884 self.notcoveredPreviousAct.triggered.connect( 3953 self.notcoveredPreviousAct.triggered.connect(
3885 self.__previousUncovered) 3954 self.__previousUncovered)
3886 self.bookmarkActions.append(self.notcoveredPreviousAct) 3955 self.bookmarkActions.append(self.notcoveredPreviousAct)
3887 3956
3888 self.taskNextAct = E5Action( 3957 self.taskNextAct = E5Action(
3889 QApplication.translate('ViewManager', 'Next Task'), 3958 QCoreApplication.translate('ViewManager', 'Next Task'),
3890 UI.PixmapCache.getIcon("taskNext.png"), 3959 UI.PixmapCache.getIcon("taskNext.png"),
3891 QApplication.translate('ViewManager', '&Next Task'), 3960 QCoreApplication.translate('ViewManager', '&Next Task'),
3892 0, 0, 3961 0, 0,
3893 self.bookmarkActGrp, 'vm_task_next') 3962 self.bookmarkActGrp, 'vm_task_next')
3894 self.taskNextAct.setStatusTip(QApplication.translate( 3963 self.taskNextAct.setStatusTip(QCoreApplication.translate(
3895 'ViewManager', 'Next Task')) 3964 'ViewManager', 'Next Task'))
3896 self.taskNextAct.setWhatsThis(QApplication.translate( 3965 self.taskNextAct.setWhatsThis(QCoreApplication.translate(
3897 'ViewManager', 3966 'ViewManager',
3898 """<b>Next Task</b>""" 3967 """<b>Next Task</b>"""
3899 """<p>Go to next line of the current editor having a task.</p>""" 3968 """<p>Go to next line of the current editor having a task.</p>"""
3900 )) 3969 ))
3901 self.taskNextAct.triggered.connect(self.__nextTask) 3970 self.taskNextAct.triggered.connect(self.__nextTask)
3902 self.bookmarkActions.append(self.taskNextAct) 3971 self.bookmarkActions.append(self.taskNextAct)
3903 3972
3904 self.taskPreviousAct = E5Action( 3973 self.taskPreviousAct = E5Action(
3905 QApplication.translate('ViewManager', 'Previous Task'), 3974 QCoreApplication.translate('ViewManager', 'Previous Task'),
3906 UI.PixmapCache.getIcon("taskPrev.png"), 3975 UI.PixmapCache.getIcon("taskPrev.png"),
3907 QApplication.translate( 3976 QCoreApplication.translate(
3908 'ViewManager', '&Previous Task'), 3977 'ViewManager', '&Previous Task'),
3909 0, 0, 3978 0, 0,
3910 self.bookmarkActGrp, 'vm_task_previous') 3979 self.bookmarkActGrp, 'vm_task_previous')
3911 self.taskPreviousAct.setStatusTip(QApplication.translate( 3980 self.taskPreviousAct.setStatusTip(QCoreApplication.translate(
3912 'ViewManager', 'Previous Task')) 3981 'ViewManager', 'Previous Task'))
3913 self.taskPreviousAct.setWhatsThis(QApplication.translate( 3982 self.taskPreviousAct.setWhatsThis(QCoreApplication.translate(
3914 'ViewManager', 3983 'ViewManager',
3915 """<b>Previous Task</b>""" 3984 """<b>Previous Task</b>"""
3916 """<p>Go to previous line of the current editor having a""" 3985 """<p>Go to previous line of the current editor having a"""
3917 """ task.</p>""" 3986 """ task.</p>"""
3918 )) 3987 ))
3919 self.taskPreviousAct.triggered.connect(self.__previousTask) 3988 self.taskPreviousAct.triggered.connect(self.__previousTask)
3920 self.bookmarkActions.append(self.taskPreviousAct) 3989 self.bookmarkActions.append(self.taskPreviousAct)
3921 3990
3922 self.changeNextAct = E5Action( 3991 self.changeNextAct = E5Action(
3923 QApplication.translate('ViewManager', 'Next Change'), 3992 QCoreApplication.translate('ViewManager', 'Next Change'),
3924 UI.PixmapCache.getIcon("changeNext.png"), 3993 UI.PixmapCache.getIcon("changeNext.png"),
3925 QApplication.translate('ViewManager', '&Next Change'), 3994 QCoreApplication.translate('ViewManager', '&Next Change'),
3926 0, 0, 3995 0, 0,
3927 self.bookmarkActGrp, 'vm_change_next') 3996 self.bookmarkActGrp, 'vm_change_next')
3928 self.changeNextAct.setStatusTip(QApplication.translate( 3997 self.changeNextAct.setStatusTip(QCoreApplication.translate(
3929 'ViewManager', 'Next Change')) 3998 'ViewManager', 'Next Change'))
3930 self.changeNextAct.setWhatsThis(QApplication.translate( 3999 self.changeNextAct.setWhatsThis(QCoreApplication.translate(
3931 'ViewManager', 4000 'ViewManager',
3932 """<b>Next Change</b>""" 4001 """<b>Next Change</b>"""
3933 """<p>Go to next line of the current editor having a change""" 4002 """<p>Go to next line of the current editor having a change"""
3934 """ marker.</p>""" 4003 """ marker.</p>"""
3935 )) 4004 ))
3936 self.changeNextAct.triggered.connect(self.__nextChange) 4005 self.changeNextAct.triggered.connect(self.__nextChange)
3937 self.bookmarkActions.append(self.changeNextAct) 4006 self.bookmarkActions.append(self.changeNextAct)
3938 4007
3939 self.changePreviousAct = E5Action( 4008 self.changePreviousAct = E5Action(
3940 QApplication.translate('ViewManager', 'Previous Change'), 4009 QCoreApplication.translate('ViewManager', 'Previous Change'),
3941 UI.PixmapCache.getIcon("changePrev.png"), 4010 UI.PixmapCache.getIcon("changePrev.png"),
3942 QApplication.translate( 4011 QCoreApplication.translate(
3943 'ViewManager', '&Previous Change'), 4012 'ViewManager', '&Previous Change'),
3944 0, 0, 4013 0, 0,
3945 self.bookmarkActGrp, 'vm_change_previous') 4014 self.bookmarkActGrp, 'vm_change_previous')
3946 self.changePreviousAct.setStatusTip(QApplication.translate( 4015 self.changePreviousAct.setStatusTip(QCoreApplication.translate(
3947 'ViewManager', 'Previous Change')) 4016 'ViewManager', 'Previous Change'))
3948 self.changePreviousAct.setWhatsThis(QApplication.translate( 4017 self.changePreviousAct.setWhatsThis(QCoreApplication.translate(
3949 'ViewManager', 4018 'ViewManager',
3950 """<b>Previous Change</b>""" 4019 """<b>Previous Change</b>"""
3951 """<p>Go to previous line of the current editor having""" 4020 """<p>Go to previous line of the current editor having"""
3952 """ a change marker.</p>""" 4021 """ a change marker.</p>"""
3953 )) 4022 ))
3960 """ 4029 """
3961 Public method to create the Bookmark menu. 4030 Public method to create the Bookmark menu.
3962 4031
3963 @return the generated menu 4032 @return the generated menu
3964 """ 4033 """
3965 menu = QMenu(QApplication.translate('ViewManager', '&Bookmarks'), 4034 menu = QMenu(QCoreApplication.translate('ViewManager', '&Bookmarks'),
3966 self.ui) 4035 self.ui)
3967 self.bookmarksMenu = QMenu( 4036 self.bookmarksMenu = QMenu(
3968 QApplication.translate('ViewManager', '&Bookmarks'), 4037 QCoreApplication.translate('ViewManager', '&Bookmarks'),
3969 menu) 4038 menu)
3970 menu.setTearOffEnabled(True) 4039 menu.setTearOffEnabled(True)
3971 4040
3972 menu.addAction(self.bookmarkToggleAct) 4041 menu.addAction(self.bookmarkToggleAct)
3973 menu.addAction(self.bookmarkNextAct) 4042 menu.addAction(self.bookmarkNextAct)
4004 4073
4005 @param toolbarManager reference to a toolbar manager object 4074 @param toolbarManager reference to a toolbar manager object
4006 (E5ToolBarManager) 4075 (E5ToolBarManager)
4007 @return the generated toolbar 4076 @return the generated toolbar
4008 """ 4077 """
4009 tb = QToolBar(QApplication.translate('ViewManager', 'Bookmarks'), 4078 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Bookmarks'),
4010 self.ui) 4079 self.ui)
4011 tb.setIconSize(UI.Config.ToolBarIconSize) 4080 tb.setIconSize(UI.Config.ToolBarIconSize)
4012 tb.setObjectName("BookmarksToolbar") 4081 tb.setObjectName("BookmarksToolbar")
4013 tb.setToolTip(QApplication.translate('ViewManager', 'Bookmarks')) 4082 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Bookmarks'))
4014 4083
4015 tb.addAction(self.bookmarkToggleAct) 4084 tb.addAction(self.bookmarkToggleAct)
4016 tb.addAction(self.bookmarkNextAct) 4085 tb.addAction(self.bookmarkNextAct)
4017 tb.addAction(self.bookmarkPreviousAct) 4086 tb.addAction(self.bookmarkPreviousAct)
4018 tb.addSeparator() 4087 tb.addSeparator()
4042 Private method to initialize the spell checking actions. 4111 Private method to initialize the spell checking actions.
4043 """ 4112 """
4044 self.spellingActGrp = createActionGroup(self) 4113 self.spellingActGrp = createActionGroup(self)
4045 4114
4046 self.spellCheckAct = E5Action( 4115 self.spellCheckAct = E5Action(
4047 QApplication.translate('ViewManager', 'Check spelling'), 4116 QCoreApplication.translate('ViewManager', 'Check spelling'),
4048 UI.PixmapCache.getIcon("spellchecking.png"), 4117 UI.PixmapCache.getIcon("spellchecking.png"),
4049 QApplication.translate( 4118 QCoreApplication.translate(
4050 'ViewManager', 'Check &spelling...'), 4119 'ViewManager', 'Check &spelling...'),
4051 QKeySequence(QApplication.translate( 4120 QKeySequence(QCoreApplication.translate(
4052 'ViewManager', "Shift+F7", "Spelling|Spell Check")), 4121 'ViewManager', "Shift+F7", "Spelling|Spell Check")),
4053 0, 4122 0,
4054 self.spellingActGrp, 'vm_spelling_spellcheck') 4123 self.spellingActGrp, 'vm_spelling_spellcheck')
4055 self.spellCheckAct.setStatusTip(QApplication.translate( 4124 self.spellCheckAct.setStatusTip(QCoreApplication.translate(
4056 'ViewManager', 'Perform spell check of current editor')) 4125 'ViewManager', 'Perform spell check of current editor'))
4057 self.spellCheckAct.setWhatsThis(QApplication.translate( 4126 self.spellCheckAct.setWhatsThis(QCoreApplication.translate(
4058 'ViewManager', 4127 'ViewManager',
4059 """<b>Check spelling</b>""" 4128 """<b>Check spelling</b>"""
4060 """<p>Perform a spell check of the current editor.</p>""" 4129 """<p>Perform a spell check of the current editor.</p>"""
4061 )) 4130 ))
4062 self.spellCheckAct.triggered.connect(self.__spellCheck) 4131 self.spellCheckAct.triggered.connect(self.__spellCheck)
4063 self.spellingActions.append(self.spellCheckAct) 4132 self.spellingActions.append(self.spellCheckAct)
4064 4133
4065 self.autoSpellCheckAct = E5Action( 4134 self.autoSpellCheckAct = E5Action(
4066 QApplication.translate('ViewManager', 'Automatic spell checking'), 4135 QCoreApplication.translate(
4136 'ViewManager', 'Automatic spell checking'),
4067 UI.PixmapCache.getIcon("autospellchecking.png"), 4137 UI.PixmapCache.getIcon("autospellchecking.png"),
4068 QApplication.translate( 4138 QCoreApplication.translate(
4069 'ViewManager', '&Automatic spell checking'), 4139 'ViewManager', '&Automatic spell checking'),
4070 0, 0, 4140 0, 0,
4071 self.spellingActGrp, 'vm_spelling_autospellcheck', True) 4141 self.spellingActGrp, 'vm_spelling_autospellcheck', True)
4072 self.autoSpellCheckAct.setStatusTip(QApplication.translate( 4142 self.autoSpellCheckAct.setStatusTip(QCoreApplication.translate(
4073 'ViewManager', '(De-)Activate automatic spell checking')) 4143 'ViewManager', '(De-)Activate automatic spell checking'))
4074 self.autoSpellCheckAct.setWhatsThis(QApplication.translate( 4144 self.autoSpellCheckAct.setWhatsThis(QCoreApplication.translate(
4075 'ViewManager', 4145 'ViewManager',
4076 """<b>Automatic spell checking</b>""" 4146 """<b>Automatic spell checking</b>"""
4077 """<p>Activate or deactivate the automatic spell checking""" 4147 """<p>Activate or deactivate the automatic spell checking"""
4078 """ function of all editors.</p>""" 4148 """ function of all editors.</p>"""
4079 )) 4149 ))
4100 """ 4170 """
4101 Public method to add some actions to the extras menu. 4171 Public method to add some actions to the extras menu.
4102 4172
4103 @param menu reference to the menu to add actions to (QMenu) 4173 @param menu reference to the menu to add actions to (QMenu)
4104 """ 4174 """
4105 self.__editSpellingMenu = QMenu(QApplication.translate( 4175 self.__editSpellingMenu = QMenu(QCoreApplication.translate(
4106 'ViewManager', "Edit Dictionary")) 4176 'ViewManager', "Edit Dictionary"))
4107 self.__editProjectPwlAct = self.__editSpellingMenu.addAction( 4177 self.__editProjectPwlAct = self.__editSpellingMenu.addAction(
4108 QApplication.translate('ViewManager', "Project Word List"), 4178 QCoreApplication.translate('ViewManager', "Project Word List"),
4109 self.__editProjectPWL) 4179 self.__editProjectPWL)
4110 self.__editProjectPelAct = self.__editSpellingMenu.addAction( 4180 self.__editProjectPelAct = self.__editSpellingMenu.addAction(
4111 QApplication.translate('ViewManager', "Project Exception List"), 4181 QCoreApplication.translate(
4182 'ViewManager', "Project Exception List"),
4112 self.__editProjectPEL) 4183 self.__editProjectPEL)
4113 self.__editSpellingMenu.addSeparator() 4184 self.__editSpellingMenu.addSeparator()
4114 self.__editUserPwlAct = self.__editSpellingMenu.addAction( 4185 self.__editUserPwlAct = self.__editSpellingMenu.addAction(
4115 QApplication.translate('ViewManager', "User Word List"), 4186 QCoreApplication.translate('ViewManager', "User Word List"),
4116 self.__editUserPWL) 4187 self.__editUserPWL)
4117 self.__editUserPelAct = self.__editSpellingMenu.addAction( 4188 self.__editUserPelAct = self.__editSpellingMenu.addAction(
4118 QApplication.translate('ViewManager', "User Exception List"), 4189 QCoreApplication.translate('ViewManager', "User Exception List"),
4119 self.__editUserPEL) 4190 self.__editUserPEL)
4120 self.__editSpellingMenu.aboutToShow.connect( 4191 self.__editSpellingMenu.aboutToShow.connect(
4121 self.__showEditSpellingMenu) 4192 self.__showEditSpellingMenu)
4122 4193
4123 menu.addAction(self.spellCheckAct) 4194 menu.addAction(self.spellCheckAct)
4131 4202
4132 @param toolbarManager reference to a toolbar manager object 4203 @param toolbarManager reference to a toolbar manager object
4133 (E5ToolBarManager) 4204 (E5ToolBarManager)
4134 @return the generated toolbar 4205 @return the generated toolbar
4135 """ 4206 """
4136 tb = QToolBar(QApplication.translate('ViewManager', 'Spelling'), 4207 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Spelling'),
4137 self.ui) 4208 self.ui)
4138 tb.setIconSize(UI.Config.ToolBarIconSize) 4209 tb.setIconSize(UI.Config.ToolBarIconSize)
4139 tb.setObjectName("SpellingToolbar") 4210 tb.setObjectName("SpellingToolbar")
4140 tb.setToolTip(QApplication.translate('ViewManager', 'Spelling')) 4211 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Spelling'))
4141 4212
4142 tb.addAction(self.spellCheckAct) 4213 tb.addAction(self.spellCheckAct)
4143 tb.addAction(self.autoSpellCheckAct) 4214 tb.addAction(self.autoSpellCheckAct)
4144 4215
4145 toolbarManager.addToolBar(tb, tb.windowTitle()) 4216 toolbarManager.addToolBar(tb, tb.windowTitle())
4160 # 3: CWD 4231 # 3: CWD
4161 import QScintilla.Lexers 4232 import QScintilla.Lexers
4162 filter = self._getOpenFileFilter() 4233 filter = self._getOpenFileFilter()
4163 progs = E5FileDialog.getOpenFileNamesAndFilter( 4234 progs = E5FileDialog.getOpenFileNamesAndFilter(
4164 self.ui, 4235 self.ui,
4165 QApplication.translate('ViewManager', "Open files"), 4236 QCoreApplication.translate('ViewManager', "Open files"),
4166 self._getOpenStartDir(), 4237 self._getOpenStartDir(),
4167 QScintilla.Lexers.getOpenFileFiltersList(True, True), 4238 QScintilla.Lexers.getOpenFileFiltersList(True, True),
4168 filter)[0] 4239 filter)[0]
4169 for prog in progs: 4240 for prog in progs:
4170 self.openFiles(prog) 4241 self.openFiles(prog)
4201 if autosave: 4272 if autosave:
4202 res = editor.saveFile() 4273 res = editor.saveFile()
4203 else: 4274 else:
4204 res = E5MessageBox.okToClearData( 4275 res = E5MessageBox.okToClearData(
4205 self.ui, 4276 self.ui,
4206 QApplication.translate('ViewManager', "File Modified"), 4277 QCoreApplication.translate('ViewManager', "File Modified"),
4207 QApplication.translate( 4278 QCoreApplication.translate(
4208 'ViewManager', 4279 'ViewManager',
4209 """<p>The file <b>{0}</b> has unsaved changes.</p>""") 4280 """<p>The file <b>{0}</b> has unsaved changes.</p>""")
4210 .format(fn), 4281 .format(fn),
4211 editor.saveFile) 4282 editor.saveFile)
4212 if res: 4283 if res:
4510 self.sbWritable.setText(writ) 4581 self.sbWritable.setText(writ)
4511 4582
4512 if line is None: 4583 if line is None:
4513 line = '' 4584 line = ''
4514 self.sbLine.setText( 4585 self.sbLine.setText(
4515 QApplication.translate('ViewManager', 'Line: {0:5}').format(line)) 4586 QCoreApplication.translate('ViewManager', 'Line: {0:5}')
4587 .format(line))
4516 4588
4517 if pos is None: 4589 if pos is None:
4518 pos = '' 4590 pos = ''
4519 self.sbPos.setText( 4591 self.sbPos.setText(
4520 QApplication.translate('ViewManager', 'Pos: {0:5}').format(pos)) 4592 QCoreApplication.translate('ViewManager', 'Pos: {0:5}')
4593 .format(pos))
4521 4594
4522 if encoding is None: 4595 if encoding is None:
4523 encoding = '' 4596 encoding = ''
4524 self.sbEnc.setText(encoding) 4597 self.sbEnc.setText(encoding)
4525 4598
4532 self.sbLang.setText(language) 4605 self.sbLang.setText(language)
4533 self.sbLang.setToolTip("") 4606 self.sbLang.setToolTip("")
4534 else: 4607 else:
4535 self.sbLang.setText("") 4608 self.sbLang.setText("")
4536 self.sbLang.setToolTip( 4609 self.sbLang.setToolTip(
4537 QApplication.translate('ViewManager', 'Language: {0}') 4610 QCoreApplication.translate('ViewManager', 'Language: {0}')
4538 .format(language)) 4611 .format(language))
4539 4612
4540 if eol is None: 4613 if eol is None:
4541 eol = '' 4614 eol = ''
4542 self.sbEol.setPixmap(self.__eolPixmap(eol)) 4615 self.sbEol.setPixmap(self.__eolPixmap(eol))
4543 self.sbEol.setToolTip( 4616 self.sbEol.setToolTip(
4544 QApplication.translate('ViewManager', 'EOL Mode: {0}').format(eol)) 4617 QCoreApplication.translate('ViewManager', 'EOL Mode: {0}')
4618 .format(eol))
4545 4619
4546 if zoom is None: 4620 if zoom is None:
4547 if QApplication.focusWidget() == e5App().getObject("Shell"): 4621 if QApplication.focusWidget() == e5App().getObject("Shell"):
4548 aw = e5App().getObject("Shell") 4622 aw = e5App().getObject("Shell")
4549 else: 4623 else:
4869 act.setEnabled(QFileInfo(rs).exists()) 4943 act.setEnabled(QFileInfo(rs).exists())
4870 idx += 1 4944 idx += 1
4871 4945
4872 self.recentMenu.addSeparator() 4946 self.recentMenu.addSeparator()
4873 self.recentMenu.addAction( 4947 self.recentMenu.addAction(
4874 QApplication.translate('ViewManager', '&Clear'), 4948 QCoreApplication.translate('ViewManager', '&Clear'),
4875 self.__clearRecent) 4949 self.__clearRecent)
4876 4950
4877 def __openSourceFile(self, act): 4951 def __openSourceFile(self, act):
4878 """ 4952 """
4879 Private method to open a file from the list of recently opened files. 4953 Private method to open a file from the list of recently opened files.
4903 act.setEnabled(QFileInfo(rp).exists()) 4977 act.setEnabled(QFileInfo(rp).exists())
4904 4978
4905 if len(self.bookmarked): 4979 if len(self.bookmarked):
4906 self.bookmarkedMenu.addSeparator() 4980 self.bookmarkedMenu.addSeparator()
4907 self.bookmarkedMenu.addAction( 4981 self.bookmarkedMenu.addAction(
4908 QApplication.translate('ViewManager', '&Add'), 4982 QCoreApplication.translate('ViewManager', '&Add'),
4909 self.__addBookmarked) 4983 self.__addBookmarked)
4910 self.bookmarkedMenu.addAction( 4984 self.bookmarkedMenu.addAction(
4911 QApplication.translate('ViewManager', '&Edit...'), 4985 QCoreApplication.translate('ViewManager', '&Edit...'),
4912 self.__editBookmarked) 4986 self.__editBookmarked)
4913 self.bookmarkedMenu.addAction( 4987 self.bookmarkedMenu.addAction(
4914 QApplication.translate('ViewManager', '&Clear'), 4988 QCoreApplication.translate('ViewManager', '&Clear'),
4915 self.__clearBookmarked) 4989 self.__clearBookmarked)
4916 4990
4917 def __addBookmarked(self): 4991 def __addBookmarked(self):
4918 """ 4992 """
4919 Private method to add the current file to the list of bookmarked files. 4993 Private method to add the current file to the list of bookmarked files.
6066 data = f.read() 6140 data = f.read()
6067 f.close() 6141 f.close()
6068 except (IOError, OSError) as err: 6142 except (IOError, OSError) as err:
6069 E5MessageBox.critical( 6143 E5MessageBox.critical(
6070 self.ui, 6144 self.ui,
6071 QApplication.translate( 6145 QCoreApplication.translate(
6072 'ViewManager', "Edit Spelling Dictionary"), 6146 'ViewManager', "Edit Spelling Dictionary"),
6073 QApplication.translate( 6147 QCoreApplication.translate(
6074 'ViewManager', 6148 'ViewManager',
6075 """<p>The spelling dictionary file <b>{0}</b> could""" 6149 """<p>The spelling dictionary file <b>{0}</b> could"""
6076 """ not be read.</p><p>Reason: {1}</p>""").format( 6150 """ not be read.</p><p>Reason: {1}</p>""").format(
6077 dictionaryFile, str(err))) 6151 dictionaryFile, str(err)))
6078 return 6152 return
6081 else "...{0}".format(dictionaryFile[-40:]) 6155 else "...{0}".format(dictionaryFile[-40:])
6082 from QScintilla.SpellingDictionaryEditDialog import \ 6156 from QScintilla.SpellingDictionaryEditDialog import \
6083 SpellingDictionaryEditDialog 6157 SpellingDictionaryEditDialog
6084 dlg = SpellingDictionaryEditDialog( 6158 dlg = SpellingDictionaryEditDialog(
6085 data, 6159 data,
6086 QApplication.translate('ViewManager', "Editing {0}") 6160 QCoreApplication.translate('ViewManager', "Editing {0}")
6087 .format(fileInfo), 6161 .format(fileInfo),
6088 self.ui) 6162 self.ui)
6089 if dlg.exec_() == QDialog.Accepted: 6163 if dlg.exec_() == QDialog.Accepted:
6090 data = dlg.getData() 6164 data = dlg.getData()
6091 try: 6165 try:
6093 f.write(data) 6167 f.write(data)
6094 f.close() 6168 f.close()
6095 except (IOError, OSError) as err: 6169 except (IOError, OSError) as err:
6096 E5MessageBox.critical( 6170 E5MessageBox.critical(
6097 self.ui, 6171 self.ui,
6098 QApplication.translate( 6172 QCoreApplication.translate(
6099 'ViewManager', "Edit Spelling Dictionary"), 6173 'ViewManager', "Edit Spelling Dictionary"),
6100 QApplication.translate( 6174 QCoreApplication.translate(
6101 'ViewManager', 6175 'ViewManager',
6102 """<p>The spelling dictionary file <b>{0}</b>""" 6176 """<p>The spelling dictionary file <b>{0}</b>"""
6103 """ could not be written.</p>""" 6177 """ could not be written.</p>"""
6104 """<p>Reason: {1}</p>""").format( 6178 """<p>Reason: {1}</p>""").format(
6105 dictionaryFile, str(err))) 6179 dictionaryFile, str(err)))
6106 return 6180 return
6107 6181
6108 if self.ui.notificationsEnabled(): 6182 if self.ui.notificationsEnabled():
6109 self.ui.showNotification( 6183 self.ui.showNotification(
6110 UI.PixmapCache.getPixmap("spellchecking48.png"), 6184 UI.PixmapCache.getPixmap("spellchecking48.png"),
6111 QApplication.translate( 6185 QCoreApplication.translate(
6112 'ViewManager', "Edit Spelling Dictionary"), 6186 'ViewManager', "Edit Spelling Dictionary"),
6113 QApplication.translate( 6187 QCoreApplication.translate(
6114 'ViewManager', 6188 'ViewManager',
6115 "The spelling dictionary was saved successfully.")) 6189 "The spelling dictionary was saved successfully."))
6116 6190
6117 ################################################################## 6191 ##################################################################
6118 ## Below are general utility methods 6192 ## Below are general utility methods

eric ide

mercurial