153 self.setWindowTitle(self.tr("eric6 Web Browser (Private Mode)")) |
153 self.setWindowTitle(self.tr("eric6 Web Browser (Private Mode)")) |
154 else: |
154 else: |
155 self.setWindowTitle(self.tr("eric6 Web Browser")) |
155 self.setWindowTitle(self.tr("eric6 Web Browser")) |
156 |
156 |
157 self.__settingsDir = settingsDir |
157 self.__settingsDir = settingsDir |
158 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb.png")) |
158 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb")) |
159 |
159 |
160 self.__mHistory = [] |
160 self.__mHistory = [] |
161 self.__lastConfigurationPageName = "" |
161 self.__lastConfigurationPageName = "" |
162 |
162 |
163 WebBrowserWindow._isPrivate = private |
163 WebBrowserWindow._isPrivate = private |
213 else: |
213 else: |
214 self.__helpEngine = None |
214 self.__helpEngine = None |
215 self.__helpInstaller = None |
215 self.__helpInstaller = None |
216 |
216 |
217 self.__zoomWidget = E5ZoomWidget( |
217 self.__zoomWidget = E5ZoomWidget( |
218 UI.PixmapCache.getPixmap("zoomOut.png"), |
218 UI.PixmapCache.getPixmap("zoomOut"), |
219 UI.PixmapCache.getPixmap("zoomIn.png"), |
219 UI.PixmapCache.getPixmap("zoomIn"), |
220 UI.PixmapCache.getPixmap("zoomReset.png"), self) |
220 UI.PixmapCache.getPixmap("zoomReset"), self) |
221 self.statusBar().addPermanentWidget(self.__zoomWidget) |
221 self.statusBar().addPermanentWidget(self.__zoomWidget) |
222 self.__zoomWidget.setMapping( |
222 self.__zoomWidget.setMapping( |
223 WebBrowserView.ZoomLevels, WebBrowserView.ZoomLevelDefault) |
223 WebBrowserView.ZoomLevels, WebBrowserView.ZoomLevelDefault) |
224 self.__zoomWidget.valueChanged.connect(self.__zoomValueChanged) |
224 self.__zoomWidget.valueChanged.connect(self.__zoomValueChanged) |
225 |
225 |
706 # list of all actions |
706 # list of all actions |
707 self.__actions = [] |
707 self.__actions = [] |
708 |
708 |
709 self.newTabAct = E5Action( |
709 self.newTabAct = E5Action( |
710 self.tr('New Tab'), |
710 self.tr('New Tab'), |
711 UI.PixmapCache.getIcon("tabNew.png"), |
711 UI.PixmapCache.getIcon("tabNew"), |
712 self.tr('&New Tab'), |
712 self.tr('&New Tab'), |
713 QKeySequence(self.tr("Ctrl+T", "File|New Tab")), |
713 QKeySequence(self.tr("Ctrl+T", "File|New Tab")), |
714 0, self, 'webbrowser_file_new_tab') |
714 0, self, 'webbrowser_file_new_tab') |
715 self.newTabAct.setStatusTip(self.tr('Open a new web browser tab')) |
715 self.newTabAct.setStatusTip(self.tr('Open a new web browser tab')) |
716 self.newTabAct.setWhatsThis(self.tr( |
716 self.newTabAct.setWhatsThis(self.tr( |
720 self.newTabAct.triggered.connect(self.newTab) |
720 self.newTabAct.triggered.connect(self.newTab) |
721 self.__actions.append(self.newTabAct) |
721 self.__actions.append(self.newTabAct) |
722 |
722 |
723 self.newAct = E5Action( |
723 self.newAct = E5Action( |
724 self.tr('New Window'), |
724 self.tr('New Window'), |
725 UI.PixmapCache.getIcon("newWindow.png"), |
725 UI.PixmapCache.getIcon("newWindow"), |
726 self.tr('New &Window'), |
726 self.tr('New &Window'), |
727 QKeySequence(self.tr("Ctrl+N", "File|New Window")), |
727 QKeySequence(self.tr("Ctrl+N", "File|New Window")), |
728 0, self, 'webbrowser_file_new_window') |
728 0, self, 'webbrowser_file_new_window') |
729 self.newAct.setStatusTip(self.tr('Open a new web browser window')) |
729 self.newAct.setStatusTip(self.tr('Open a new web browser window')) |
730 self.newAct.setWhatsThis(self.tr( |
730 self.newAct.setWhatsThis(self.tr( |
735 self.newAct.triggered.connect(self.newWindow) |
735 self.newAct.triggered.connect(self.newWindow) |
736 self.__actions.append(self.newAct) |
736 self.__actions.append(self.newAct) |
737 |
737 |
738 self.newPrivateAct = E5Action( |
738 self.newPrivateAct = E5Action( |
739 self.tr('New Private Window'), |
739 self.tr('New Private Window'), |
740 UI.PixmapCache.getIcon("privateMode.png"), |
740 UI.PixmapCache.getIcon("privateMode"), |
741 self.tr('New &Private Window'), |
741 self.tr('New &Private Window'), |
742 QKeySequence(self.tr("Ctrl+Shift+P", "File|New Private Window")), |
742 QKeySequence(self.tr("Ctrl+Shift+P", "File|New Private Window")), |
743 0, self, 'webbrowser_file_new_private_window') |
743 0, self, 'webbrowser_file_new_private_window') |
744 self.newPrivateAct.setStatusTip(self.tr( |
744 self.newPrivateAct.setStatusTip(self.tr( |
745 'Open a new private web browser window')) |
745 'Open a new private web browser window')) |
751 self.newPrivateAct.triggered.connect(self.newPrivateWindow) |
751 self.newPrivateAct.triggered.connect(self.newPrivateWindow) |
752 self.__actions.append(self.newPrivateAct) |
752 self.__actions.append(self.newPrivateAct) |
753 |
753 |
754 self.openAct = E5Action( |
754 self.openAct = E5Action( |
755 self.tr('Open File'), |
755 self.tr('Open File'), |
756 UI.PixmapCache.getIcon("open.png"), |
756 UI.PixmapCache.getIcon("open"), |
757 self.tr('&Open File'), |
757 self.tr('&Open File'), |
758 QKeySequence(self.tr("Ctrl+O", "File|Open")), |
758 QKeySequence(self.tr("Ctrl+O", "File|Open")), |
759 0, self, 'webbrowser_file_open') |
759 0, self, 'webbrowser_file_open') |
760 self.openAct.setStatusTip(self.tr('Open a file for display')) |
760 self.openAct.setStatusTip(self.tr('Open a file for display')) |
761 self.openAct.setWhatsThis(self.tr( |
761 self.openAct.setWhatsThis(self.tr( |
766 self.openAct.triggered.connect(self.__openFile) |
766 self.openAct.triggered.connect(self.__openFile) |
767 self.__actions.append(self.openAct) |
767 self.__actions.append(self.openAct) |
768 |
768 |
769 self.openTabAct = E5Action( |
769 self.openTabAct = E5Action( |
770 self.tr('Open File in New Tab'), |
770 self.tr('Open File in New Tab'), |
771 UI.PixmapCache.getIcon("openNewTab.png"), |
771 UI.PixmapCache.getIcon("openNewTab"), |
772 self.tr('Open File in New &Tab'), |
772 self.tr('Open File in New &Tab'), |
773 QKeySequence(self.tr("Shift+Ctrl+O", "File|Open in new tab")), |
773 QKeySequence(self.tr("Shift+Ctrl+O", "File|Open in new tab")), |
774 0, self, 'webbrowser_file_open_tab') |
774 0, self, 'webbrowser_file_open_tab') |
775 self.openTabAct.setStatusTip( |
775 self.openTabAct.setStatusTip( |
776 self.tr('Open a file for display in a new tab')) |
776 self.tr('Open a file for display in a new tab')) |
783 self.__actions.append(self.openTabAct) |
783 self.__actions.append(self.openTabAct) |
784 |
784 |
785 if hasattr(QWebEnginePage, "SavePage"): |
785 if hasattr(QWebEnginePage, "SavePage"): |
786 self.saveAsAct = E5Action( |
786 self.saveAsAct = E5Action( |
787 self.tr('Save As'), |
787 self.tr('Save As'), |
788 UI.PixmapCache.getIcon("fileSaveAs.png"), |
788 UI.PixmapCache.getIcon("fileSaveAs"), |
789 self.tr('&Save As...'), |
789 self.tr('&Save As...'), |
790 QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), |
790 QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), |
791 0, self, 'webbrowser_file_save_as') |
791 0, self, 'webbrowser_file_save_as') |
792 self.saveAsAct.setStatusTip( |
792 self.saveAsAct.setStatusTip( |
793 self.tr('Save the current page to disk')) |
793 self.tr('Save the current page to disk')) |
800 else: |
800 else: |
801 self.saveAsAct = None |
801 self.saveAsAct = None |
802 |
802 |
803 self.saveVisiblePageScreenAct = E5Action( |
803 self.saveVisiblePageScreenAct = E5Action( |
804 self.tr('Save Page Screen'), |
804 self.tr('Save Page Screen'), |
805 UI.PixmapCache.getIcon("fileSavePixmap.png"), |
805 UI.PixmapCache.getIcon("fileSavePixmap"), |
806 self.tr('Save Page Screen...'), |
806 self.tr('Save Page Screen...'), |
807 0, 0, self, 'webbrowser_file_save_visible_page_screen') |
807 0, 0, self, 'webbrowser_file_save_visible_page_screen') |
808 self.saveVisiblePageScreenAct.setStatusTip( |
808 self.saveVisiblePageScreenAct.setStatusTip( |
809 self.tr('Save the visible part of the current page as a' |
809 self.tr('Save the visible part of the current page as a' |
810 ' screen shot')) |
810 ' screen shot')) |
846 bookmarksManager.exportBookmarks) |
846 bookmarksManager.exportBookmarks) |
847 self.__actions.append(self.exportBookmarksAct) |
847 self.__actions.append(self.exportBookmarksAct) |
848 |
848 |
849 self.printAct = E5Action( |
849 self.printAct = E5Action( |
850 self.tr('Print'), |
850 self.tr('Print'), |
851 UI.PixmapCache.getIcon("print.png"), |
851 UI.PixmapCache.getIcon("print"), |
852 self.tr('&Print'), |
852 self.tr('&Print'), |
853 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
853 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
854 0, self, 'webbrowser_file_print') |
854 0, self, 'webbrowser_file_print') |
855 self.printAct.setStatusTip(self.tr('Print the displayed help')) |
855 self.printAct.setStatusTip(self.tr('Print the displayed help')) |
856 self.printAct.setWhatsThis(self.tr( |
856 self.printAct.setWhatsThis(self.tr( |
860 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
860 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
861 self.__actions.append(self.printAct) |
861 self.__actions.append(self.printAct) |
862 |
862 |
863 self.printPdfAct = E5Action( |
863 self.printPdfAct = E5Action( |
864 self.tr('Print as PDF'), |
864 self.tr('Print as PDF'), |
865 UI.PixmapCache.getIcon("printPdf.png"), |
865 UI.PixmapCache.getIcon("printPdf"), |
866 self.tr('Print as PDF'), |
866 self.tr('Print as PDF'), |
867 0, 0, self, 'webbrowser_file_print_pdf') |
867 0, 0, self, 'webbrowser_file_print_pdf') |
868 self.printPdfAct.setStatusTip(self.tr( |
868 self.printPdfAct.setStatusTip(self.tr( |
869 'Print the displayed help as PDF')) |
869 'Print the displayed help as PDF')) |
870 self.printPdfAct.setWhatsThis(self.tr( |
870 self.printPdfAct.setWhatsThis(self.tr( |
875 self.__tabWidget.printBrowserPdf) |
875 self.__tabWidget.printBrowserPdf) |
876 self.__actions.append(self.printPdfAct) |
876 self.__actions.append(self.printPdfAct) |
877 |
877 |
878 self.printPreviewAct = E5Action( |
878 self.printPreviewAct = E5Action( |
879 self.tr('Print Preview'), |
879 self.tr('Print Preview'), |
880 UI.PixmapCache.getIcon("printPreview.png"), |
880 UI.PixmapCache.getIcon("printPreview"), |
881 self.tr('Print Preview'), |
881 self.tr('Print Preview'), |
882 0, 0, self, 'webbrowser_file_print_preview') |
882 0, 0, self, 'webbrowser_file_print_preview') |
883 self.printPreviewAct.setStatusTip(self.tr( |
883 self.printPreviewAct.setStatusTip(self.tr( |
884 'Print preview of the displayed help')) |
884 'Print preview of the displayed help')) |
885 self.printPreviewAct.setWhatsThis(self.tr( |
885 self.printPreviewAct.setWhatsThis(self.tr( |
890 self.__tabWidget.printPreviewBrowser) |
890 self.__tabWidget.printPreviewBrowser) |
891 self.__actions.append(self.printPreviewAct) |
891 self.__actions.append(self.printPreviewAct) |
892 |
892 |
893 self.sendPageLinkAct = E5Action( |
893 self.sendPageLinkAct = E5Action( |
894 self.tr('Send Page Link'), |
894 self.tr('Send Page Link'), |
895 UI.PixmapCache.getIcon("mailSend.png"), |
895 UI.PixmapCache.getIcon("mailSend"), |
896 self.tr('Send Page Link'), |
896 self.tr('Send Page Link'), |
897 0, 0, self, 'webbrowser_send_page_link') |
897 0, 0, self, 'webbrowser_send_page_link') |
898 self.sendPageLinkAct.setStatusTip(self.tr( |
898 self.sendPageLinkAct.setStatusTip(self.tr( |
899 'Send the link of the current page via email')) |
899 'Send the link of the current page via email')) |
900 self.sendPageLinkAct.setWhatsThis(self.tr( |
900 self.sendPageLinkAct.setWhatsThis(self.tr( |
904 self.sendPageLinkAct.triggered.connect(self.__sendPageLink) |
904 self.sendPageLinkAct.triggered.connect(self.__sendPageLink) |
905 self.__actions.append(self.sendPageLinkAct) |
905 self.__actions.append(self.sendPageLinkAct) |
906 |
906 |
907 self.closeAct = E5Action( |
907 self.closeAct = E5Action( |
908 self.tr('Close'), |
908 self.tr('Close'), |
909 UI.PixmapCache.getIcon("close.png"), |
909 UI.PixmapCache.getIcon("close"), |
910 self.tr('&Close'), |
910 self.tr('&Close'), |
911 QKeySequence(self.tr("Ctrl+W", "File|Close")), |
911 QKeySequence(self.tr("Ctrl+W", "File|Close")), |
912 0, self, 'webbrowser_file_close') |
912 0, self, 'webbrowser_file_close') |
913 self.closeAct.setStatusTip(self.tr( |
913 self.closeAct.setStatusTip(self.tr( |
914 'Close the current help window')) |
914 'Close the current help window')) |
932 self.__tabWidget.closeAllBrowsers) |
932 self.__tabWidget.closeAllBrowsers) |
933 self.__actions.append(self.closeAllAct) |
933 self.__actions.append(self.closeAllAct) |
934 |
934 |
935 self.exitAct = E5Action( |
935 self.exitAct = E5Action( |
936 self.tr('Quit'), |
936 self.tr('Quit'), |
937 UI.PixmapCache.getIcon("exit.png"), |
937 UI.PixmapCache.getIcon("exit"), |
938 self.tr('&Quit'), |
938 self.tr('&Quit'), |
939 QKeySequence(self.tr("Ctrl+Q", "File|Quit")), |
939 QKeySequence(self.tr("Ctrl+Q", "File|Quit")), |
940 0, self, 'webbrowser_file_quit') |
940 0, self, 'webbrowser_file_quit') |
941 self.exitAct.setStatusTip(self.tr('Quit the eric6 Web Browser')) |
941 self.exitAct.setStatusTip(self.tr('Quit the eric6 Web Browser')) |
942 self.exitAct.setWhatsThis(self.tr( |
942 self.exitAct.setWhatsThis(self.tr( |
946 self.exitAct.triggered.connect(self.shutdown) |
946 self.exitAct.triggered.connect(self.shutdown) |
947 self.__actions.append(self.exitAct) |
947 self.__actions.append(self.exitAct) |
948 |
948 |
949 self.backAct = E5Action( |
949 self.backAct = E5Action( |
950 self.tr('Backward'), |
950 self.tr('Backward'), |
951 UI.PixmapCache.getIcon("back.png"), |
951 UI.PixmapCache.getIcon("back"), |
952 self.tr('&Backward'), |
952 self.tr('&Backward'), |
953 QKeySequence(self.tr("Alt+Left", "Go|Backward")), |
953 QKeySequence(self.tr("Alt+Left", "Go|Backward")), |
954 0, self, 'webbrowser_go_backward') |
954 0, self, 'webbrowser_go_backward') |
955 self.backAct.setStatusTip(self.tr('Move one screen backward')) |
955 self.backAct.setStatusTip(self.tr('Move one screen backward')) |
956 self.backAct.setWhatsThis(self.tr( |
956 self.backAct.setWhatsThis(self.tr( |
961 self.backAct.triggered.connect(self.__backward) |
961 self.backAct.triggered.connect(self.__backward) |
962 self.__actions.append(self.backAct) |
962 self.__actions.append(self.backAct) |
963 |
963 |
964 self.forwardAct = E5Action( |
964 self.forwardAct = E5Action( |
965 self.tr('Forward'), |
965 self.tr('Forward'), |
966 UI.PixmapCache.getIcon("forward.png"), |
966 UI.PixmapCache.getIcon("forward"), |
967 self.tr('&Forward'), |
967 self.tr('&Forward'), |
968 QKeySequence(self.tr("Alt+Right", "Go|Forward")), |
968 QKeySequence(self.tr("Alt+Right", "Go|Forward")), |
969 0, self, 'webbrowser_go_foreward') |
969 0, self, 'webbrowser_go_foreward') |
970 self.forwardAct.setStatusTip(self.tr( |
970 self.forwardAct.setStatusTip(self.tr( |
971 'Move one screen forward')) |
971 'Move one screen forward')) |
977 self.forwardAct.triggered.connect(self.__forward) |
977 self.forwardAct.triggered.connect(self.__forward) |
978 self.__actions.append(self.forwardAct) |
978 self.__actions.append(self.forwardAct) |
979 |
979 |
980 self.homeAct = E5Action( |
980 self.homeAct = E5Action( |
981 self.tr('Home'), |
981 self.tr('Home'), |
982 UI.PixmapCache.getIcon("home.png"), |
982 UI.PixmapCache.getIcon("home"), |
983 self.tr('&Home'), |
983 self.tr('&Home'), |
984 QKeySequence(self.tr("Ctrl+Home", "Go|Home")), |
984 QKeySequence(self.tr("Ctrl+Home", "Go|Home")), |
985 0, self, 'webbrowser_go_home') |
985 0, self, 'webbrowser_go_home') |
986 self.homeAct.setStatusTip(self.tr( |
986 self.homeAct.setStatusTip(self.tr( |
987 'Move to the initial screen')) |
987 'Move to the initial screen')) |
992 self.homeAct.triggered.connect(self.__home) |
992 self.homeAct.triggered.connect(self.__home) |
993 self.__actions.append(self.homeAct) |
993 self.__actions.append(self.homeAct) |
994 |
994 |
995 self.reloadAct = E5Action( |
995 self.reloadAct = E5Action( |
996 self.tr('Reload'), |
996 self.tr('Reload'), |
997 UI.PixmapCache.getIcon("reload.png"), |
997 UI.PixmapCache.getIcon("reload"), |
998 self.tr('&Reload'), |
998 self.tr('&Reload'), |
999 QKeySequence(self.tr("Ctrl+R", "Go|Reload")), |
999 QKeySequence(self.tr("Ctrl+R", "Go|Reload")), |
1000 QKeySequence(self.tr("F5", "Go|Reload")), |
1000 QKeySequence(self.tr("F5", "Go|Reload")), |
1001 self, 'webbrowser_go_reload') |
1001 self, 'webbrowser_go_reload') |
1002 self.reloadAct.setStatusTip(self.tr( |
1002 self.reloadAct.setStatusTip(self.tr( |
1008 self.reloadAct.triggered.connect(self.__reload) |
1008 self.reloadAct.triggered.connect(self.__reload) |
1009 self.__actions.append(self.reloadAct) |
1009 self.__actions.append(self.reloadAct) |
1010 |
1010 |
1011 self.stopAct = E5Action( |
1011 self.stopAct = E5Action( |
1012 self.tr('Stop'), |
1012 self.tr('Stop'), |
1013 UI.PixmapCache.getIcon("stopLoading.png"), |
1013 UI.PixmapCache.getIcon("stopLoading"), |
1014 self.tr('&Stop'), |
1014 self.tr('&Stop'), |
1015 QKeySequence(self.tr("Ctrl+.", "Go|Stop")), |
1015 QKeySequence(self.tr("Ctrl+.", "Go|Stop")), |
1016 QKeySequence(self.tr("Esc", "Go|Stop")), |
1016 QKeySequence(self.tr("Esc", "Go|Stop")), |
1017 self, 'webbrowser_go_stop') |
1017 self, 'webbrowser_go_stop') |
1018 self.stopAct.setStatusTip(self.tr('Stop loading')) |
1018 self.stopAct.setStatusTip(self.tr('Stop loading')) |
1023 self.stopAct.triggered.connect(self.__stopLoading) |
1023 self.stopAct.triggered.connect(self.__stopLoading) |
1024 self.__actions.append(self.stopAct) |
1024 self.__actions.append(self.stopAct) |
1025 |
1025 |
1026 self.copyAct = E5Action( |
1026 self.copyAct = E5Action( |
1027 self.tr('Copy'), |
1027 self.tr('Copy'), |
1028 UI.PixmapCache.getIcon("editCopy.png"), |
1028 UI.PixmapCache.getIcon("editCopy"), |
1029 self.tr('&Copy'), |
1029 self.tr('&Copy'), |
1030 QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), |
1030 QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), |
1031 0, self, 'webbrowser_edit_copy') |
1031 0, self, 'webbrowser_edit_copy') |
1032 self.copyAct.setStatusTip(self.tr('Copy the selected text')) |
1032 self.copyAct.setStatusTip(self.tr('Copy the selected text')) |
1033 self.copyAct.setWhatsThis(self.tr( |
1033 self.copyAct.setWhatsThis(self.tr( |
1037 self.copyAct.triggered.connect(self.__copy) |
1037 self.copyAct.triggered.connect(self.__copy) |
1038 self.__actions.append(self.copyAct) |
1038 self.__actions.append(self.copyAct) |
1039 |
1039 |
1040 self.cutAct = E5Action( |
1040 self.cutAct = E5Action( |
1041 self.tr('Cut'), |
1041 self.tr('Cut'), |
1042 UI.PixmapCache.getIcon("editCut.png"), |
1042 UI.PixmapCache.getIcon("editCut"), |
1043 self.tr('Cu&t'), |
1043 self.tr('Cu&t'), |
1044 QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), |
1044 QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), |
1045 0, self, 'webbrowser_edit_cut') |
1045 0, self, 'webbrowser_edit_cut') |
1046 self.cutAct.setStatusTip(self.tr('Cut the selected text')) |
1046 self.cutAct.setStatusTip(self.tr('Cut the selected text')) |
1047 self.cutAct.setWhatsThis(self.tr( |
1047 self.cutAct.setWhatsThis(self.tr( |
1051 self.cutAct.triggered.connect(self.__cut) |
1051 self.cutAct.triggered.connect(self.__cut) |
1052 self.__actions.append(self.cutAct) |
1052 self.__actions.append(self.cutAct) |
1053 |
1053 |
1054 self.pasteAct = E5Action( |
1054 self.pasteAct = E5Action( |
1055 self.tr('Paste'), |
1055 self.tr('Paste'), |
1056 UI.PixmapCache.getIcon("editPaste.png"), |
1056 UI.PixmapCache.getIcon("editPaste"), |
1057 self.tr('&Paste'), |
1057 self.tr('&Paste'), |
1058 QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), |
1058 QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), |
1059 0, self, 'webbrowser_edit_paste') |
1059 0, self, 'webbrowser_edit_paste') |
1060 self.pasteAct.setStatusTip(self.tr('Paste text from the clipboard')) |
1060 self.pasteAct.setStatusTip(self.tr('Paste text from the clipboard')) |
1061 self.pasteAct.setWhatsThis(self.tr( |
1061 self.pasteAct.setWhatsThis(self.tr( |
1065 self.pasteAct.triggered.connect(self.__paste) |
1065 self.pasteAct.triggered.connect(self.__paste) |
1066 self.__actions.append(self.pasteAct) |
1066 self.__actions.append(self.pasteAct) |
1067 |
1067 |
1068 self.undoAct = E5Action( |
1068 self.undoAct = E5Action( |
1069 self.tr('Undo'), |
1069 self.tr('Undo'), |
1070 UI.PixmapCache.getIcon("editUndo.png"), |
1070 UI.PixmapCache.getIcon("editUndo"), |
1071 self.tr('&Undo'), |
1071 self.tr('&Undo'), |
1072 QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), |
1072 QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), |
1073 0, self, 'webbrowser_edit_undo') |
1073 0, self, 'webbrowser_edit_undo') |
1074 self.undoAct.setStatusTip(self.tr('Undo the last edit action')) |
1074 self.undoAct.setStatusTip(self.tr('Undo the last edit action')) |
1075 self.undoAct.setWhatsThis(self.tr( |
1075 self.undoAct.setWhatsThis(self.tr( |
1079 self.undoAct.triggered.connect(self.__undo) |
1079 self.undoAct.triggered.connect(self.__undo) |
1080 self.__actions.append(self.undoAct) |
1080 self.__actions.append(self.undoAct) |
1081 |
1081 |
1082 self.redoAct = E5Action( |
1082 self.redoAct = E5Action( |
1083 self.tr('Redo'), |
1083 self.tr('Redo'), |
1084 UI.PixmapCache.getIcon("editRedo.png"), |
1084 UI.PixmapCache.getIcon("editRedo"), |
1085 self.tr('&Redo'), |
1085 self.tr('&Redo'), |
1086 QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), |
1086 QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), |
1087 0, self, 'webbrowser_edit_redo') |
1087 0, self, 'webbrowser_edit_redo') |
1088 self.redoAct.setStatusTip(self.tr('Redo the last edit action')) |
1088 self.redoAct.setStatusTip(self.tr('Redo the last edit action')) |
1089 self.redoAct.setWhatsThis(self.tr( |
1089 self.redoAct.setWhatsThis(self.tr( |
1093 self.redoAct.triggered.connect(self.__redo) |
1093 self.redoAct.triggered.connect(self.__redo) |
1094 self.__actions.append(self.redoAct) |
1094 self.__actions.append(self.redoAct) |
1095 |
1095 |
1096 self.selectAllAct = E5Action( |
1096 self.selectAllAct = E5Action( |
1097 self.tr('Select All'), |
1097 self.tr('Select All'), |
1098 UI.PixmapCache.getIcon("editSelectAll.png"), |
1098 UI.PixmapCache.getIcon("editSelectAll"), |
1099 self.tr('&Select All'), |
1099 self.tr('&Select All'), |
1100 QKeySequence(self.tr("Ctrl+A", "Edit|Select All")), |
1100 QKeySequence(self.tr("Ctrl+A", "Edit|Select All")), |
1101 0, self, 'webbrowser_edit_select_all') |
1101 0, self, 'webbrowser_edit_select_all') |
1102 self.selectAllAct.setStatusTip(self.tr('Select all text')) |
1102 self.selectAllAct.setStatusTip(self.tr('Select all text')) |
1103 self.selectAllAct.setWhatsThis(self.tr( |
1103 self.selectAllAct.setWhatsThis(self.tr( |
1120 self.unselectAct.triggered.connect(self.__unselect) |
1120 self.unselectAct.triggered.connect(self.__unselect) |
1121 self.__actions.append(self.unselectAct) |
1121 self.__actions.append(self.unselectAct) |
1122 |
1122 |
1123 self.findAct = E5Action( |
1123 self.findAct = E5Action( |
1124 self.tr('Find...'), |
1124 self.tr('Find...'), |
1125 UI.PixmapCache.getIcon("find.png"), |
1125 UI.PixmapCache.getIcon("find"), |
1126 self.tr('&Find...'), |
1126 self.tr('&Find...'), |
1127 QKeySequence(self.tr("Ctrl+F", "Edit|Find")), |
1127 QKeySequence(self.tr("Ctrl+F", "Edit|Find")), |
1128 0, self, 'webbrowser_edit_find') |
1128 0, self, 'webbrowser_edit_find') |
1129 self.findAct.setStatusTip(self.tr('Find text in page')) |
1129 self.findAct.setStatusTip(self.tr('Find text in page')) |
1130 self.findAct.setWhatsThis(self.tr( |
1130 self.findAct.setWhatsThis(self.tr( |
1134 self.findAct.triggered.connect(self.__find) |
1134 self.findAct.triggered.connect(self.__find) |
1135 self.__actions.append(self.findAct) |
1135 self.__actions.append(self.findAct) |
1136 |
1136 |
1137 self.findNextAct = E5Action( |
1137 self.findNextAct = E5Action( |
1138 self.tr('Find next'), |
1138 self.tr('Find next'), |
1139 UI.PixmapCache.getIcon("findNext.png"), |
1139 UI.PixmapCache.getIcon("findNext"), |
1140 self.tr('Find &next'), |
1140 self.tr('Find &next'), |
1141 QKeySequence(self.tr("F3", "Edit|Find next")), |
1141 QKeySequence(self.tr("F3", "Edit|Find next")), |
1142 0, self, 'webbrowser_edit_find_next') |
1142 0, self, 'webbrowser_edit_find_next') |
1143 self.findNextAct.setStatusTip(self.tr( |
1143 self.findNextAct.setStatusTip(self.tr( |
1144 'Find next occurrence of text in page')) |
1144 'Find next occurrence of text in page')) |
1149 self.findNextAct.triggered.connect(self.__searchWidget.findNext) |
1149 self.findNextAct.triggered.connect(self.__searchWidget.findNext) |
1150 self.__actions.append(self.findNextAct) |
1150 self.__actions.append(self.findNextAct) |
1151 |
1151 |
1152 self.findPrevAct = E5Action( |
1152 self.findPrevAct = E5Action( |
1153 self.tr('Find previous'), |
1153 self.tr('Find previous'), |
1154 UI.PixmapCache.getIcon("findPrev.png"), |
1154 UI.PixmapCache.getIcon("findPrev"), |
1155 self.tr('Find &previous'), |
1155 self.tr('Find &previous'), |
1156 QKeySequence(self.tr("Shift+F3", "Edit|Find previous")), |
1156 QKeySequence(self.tr("Shift+F3", "Edit|Find previous")), |
1157 0, self, 'webbrowser_edit_find_previous') |
1157 0, self, 'webbrowser_edit_find_previous') |
1158 self.findPrevAct.setStatusTip( |
1158 self.findPrevAct.setStatusTip( |
1159 self.tr('Find previous occurrence of text in page')) |
1159 self.tr('Find previous occurrence of text in page')) |
1181 self.__showBookmarksDialog) |
1181 self.__showBookmarksDialog) |
1182 self.__actions.append(self.bookmarksManageAct) |
1182 self.__actions.append(self.bookmarksManageAct) |
1183 |
1183 |
1184 self.bookmarksAddAct = E5Action( |
1184 self.bookmarksAddAct = E5Action( |
1185 self.tr('Add Bookmark'), |
1185 self.tr('Add Bookmark'), |
1186 UI.PixmapCache.getIcon("addBookmark.png"), |
1186 UI.PixmapCache.getIcon("addBookmark"), |
1187 self.tr('Add &Bookmark...'), |
1187 self.tr('Add &Bookmark...'), |
1188 QKeySequence(self.tr("Ctrl+D", "Help|Add bookmark")), |
1188 QKeySequence(self.tr("Ctrl+D", "Help|Add bookmark")), |
1189 0, self, 'webbrowser_bookmark_add') |
1189 0, self, 'webbrowser_bookmark_add') |
1190 self.bookmarksAddAct.setIconVisibleInMenu(False) |
1190 self.bookmarksAddAct.setIconVisibleInMenu(False) |
1191 self.bookmarksAddAct.setStatusTip(self.tr( |
1191 self.bookmarksAddAct.setStatusTip(self.tr( |
1225 self.bookmarksAllTabsAct.triggered.connect(self.bookmarkAll) |
1225 self.bookmarksAllTabsAct.triggered.connect(self.bookmarkAll) |
1226 self.__actions.append(self.bookmarksAllTabsAct) |
1226 self.__actions.append(self.bookmarksAllTabsAct) |
1227 |
1227 |
1228 self.whatsThisAct = E5Action( |
1228 self.whatsThisAct = E5Action( |
1229 self.tr('What\'s This?'), |
1229 self.tr('What\'s This?'), |
1230 UI.PixmapCache.getIcon("whatsThis.png"), |
1230 UI.PixmapCache.getIcon("whatsThis"), |
1231 self.tr('&What\'s This?'), |
1231 self.tr('&What\'s This?'), |
1232 QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), |
1232 QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), |
1233 0, self, 'webbrowser_help_whats_this') |
1233 0, self, 'webbrowser_help_whats_this') |
1234 self.whatsThisAct.setStatusTip(self.tr('Context sensitive help')) |
1234 self.whatsThisAct.setStatusTip(self.tr('Context sensitive help')) |
1235 self.whatsThisAct.setWhatsThis(self.tr( |
1235 self.whatsThisAct.setWhatsThis(self.tr( |
1269 self.aboutQtAct.triggered.connect(self.__aboutQt) |
1269 self.aboutQtAct.triggered.connect(self.__aboutQt) |
1270 self.__actions.append(self.aboutQtAct) |
1270 self.__actions.append(self.aboutQtAct) |
1271 |
1271 |
1272 self.zoomInAct = E5Action( |
1272 self.zoomInAct = E5Action( |
1273 self.tr('Zoom in'), |
1273 self.tr('Zoom in'), |
1274 UI.PixmapCache.getIcon("zoomIn.png"), |
1274 UI.PixmapCache.getIcon("zoomIn"), |
1275 self.tr('Zoom &in'), |
1275 self.tr('Zoom &in'), |
1276 QKeySequence(self.tr("Ctrl++", "View|Zoom in")), |
1276 QKeySequence(self.tr("Ctrl++", "View|Zoom in")), |
1277 QKeySequence(self.tr("Zoom In", "View|Zoom in")), |
1277 QKeySequence(self.tr("Zoom In", "View|Zoom in")), |
1278 self, 'webbrowser_view_zoom_in') |
1278 self, 'webbrowser_view_zoom_in') |
1279 self.zoomInAct.setStatusTip(self.tr('Zoom in on the web page')) |
1279 self.zoomInAct.setStatusTip(self.tr('Zoom in on the web page')) |
1285 self.zoomInAct.triggered.connect(self.__zoomIn) |
1285 self.zoomInAct.triggered.connect(self.__zoomIn) |
1286 self.__actions.append(self.zoomInAct) |
1286 self.__actions.append(self.zoomInAct) |
1287 |
1287 |
1288 self.zoomOutAct = E5Action( |
1288 self.zoomOutAct = E5Action( |
1289 self.tr('Zoom out'), |
1289 self.tr('Zoom out'), |
1290 UI.PixmapCache.getIcon("zoomOut.png"), |
1290 UI.PixmapCache.getIcon("zoomOut"), |
1291 self.tr('Zoom &out'), |
1291 self.tr('Zoom &out'), |
1292 QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), |
1292 QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), |
1293 QKeySequence(self.tr("Zoom Out", "View|Zoom out")), |
1293 QKeySequence(self.tr("Zoom Out", "View|Zoom out")), |
1294 self, 'webbrowser_view_zoom_out') |
1294 self, 'webbrowser_view_zoom_out') |
1295 self.zoomOutAct.setStatusTip(self.tr('Zoom out on the web page')) |
1295 self.zoomOutAct.setStatusTip(self.tr('Zoom out on the web page')) |
1301 self.zoomOutAct.triggered.connect(self.__zoomOut) |
1301 self.zoomOutAct.triggered.connect(self.__zoomOut) |
1302 self.__actions.append(self.zoomOutAct) |
1302 self.__actions.append(self.zoomOutAct) |
1303 |
1303 |
1304 self.zoomResetAct = E5Action( |
1304 self.zoomResetAct = E5Action( |
1305 self.tr('Zoom reset'), |
1305 self.tr('Zoom reset'), |
1306 UI.PixmapCache.getIcon("zoomReset.png"), |
1306 UI.PixmapCache.getIcon("zoomReset"), |
1307 self.tr('Zoom &reset'), |
1307 self.tr('Zoom &reset'), |
1308 QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), |
1308 QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), |
1309 0, self, 'webbrowser_view_zoom_reset') |
1309 0, self, 'webbrowser_view_zoom_reset') |
1310 self.zoomResetAct.setStatusTip(self.tr( |
1310 self.zoomResetAct.setStatusTip(self.tr( |
1311 'Reset the zoom of the web page')) |
1311 'Reset the zoom of the web page')) |
1332 self.__actions.append(self.pageSourceAct) |
1332 self.__actions.append(self.pageSourceAct) |
1333 self.addAction(self.pageSourceAct) |
1333 self.addAction(self.pageSourceAct) |
1334 |
1334 |
1335 self.fullScreenAct = E5Action( |
1335 self.fullScreenAct = E5Action( |
1336 self.tr('Full Screen'), |
1336 self.tr('Full Screen'), |
1337 UI.PixmapCache.getIcon("windowFullscreen.png"), |
1337 UI.PixmapCache.getIcon("windowFullscreen"), |
1338 self.tr('&Full Screen'), |
1338 self.tr('&Full Screen'), |
1339 0, 0, |
1339 0, 0, |
1340 self, 'webbrowser_view_full_screen') |
1340 self, 'webbrowser_view_full_screen') |
1341 if Globals.isMacPlatform(): |
1341 if Globals.isMacPlatform(): |
1342 self.fullScreenAct.setShortcut( |
1342 self.fullScreenAct.setShortcut( |
1374 self.__actions.append(self.switchTabAct) |
1374 self.__actions.append(self.switchTabAct) |
1375 self.addAction(self.switchTabAct) |
1375 self.addAction(self.switchTabAct) |
1376 |
1376 |
1377 self.prefAct = E5Action( |
1377 self.prefAct = E5Action( |
1378 self.tr('Preferences'), |
1378 self.tr('Preferences'), |
1379 UI.PixmapCache.getIcon("configure.png"), |
1379 UI.PixmapCache.getIcon("configure"), |
1380 self.tr('&Preferences...'), 0, 0, self, 'webbrowser_preferences') |
1380 self.tr('&Preferences...'), 0, 0, self, 'webbrowser_preferences') |
1381 self.prefAct.setStatusTip(self.tr( |
1381 self.prefAct.setStatusTip(self.tr( |
1382 'Set the prefered configuration')) |
1382 'Set the prefered configuration')) |
1383 self.prefAct.setWhatsThis(self.tr( |
1383 self.prefAct.setWhatsThis(self.tr( |
1384 """<b>Preferences</b>""" |
1384 """<b>Preferences</b>""" |
1388 self.prefAct.triggered.connect(self.__showPreferences) |
1388 self.prefAct.triggered.connect(self.__showPreferences) |
1389 self.__actions.append(self.prefAct) |
1389 self.__actions.append(self.prefAct) |
1390 |
1390 |
1391 self.acceptedLanguagesAct = E5Action( |
1391 self.acceptedLanguagesAct = E5Action( |
1392 self.tr('Languages'), |
1392 self.tr('Languages'), |
1393 UI.PixmapCache.getIcon("flag.png"), |
1393 UI.PixmapCache.getIcon("flag"), |
1394 self.tr('&Languages...'), 0, 0, |
1394 self.tr('&Languages...'), 0, 0, |
1395 self, 'webbrowser_accepted_languages') |
1395 self, 'webbrowser_accepted_languages') |
1396 self.acceptedLanguagesAct.setStatusTip(self.tr( |
1396 self.acceptedLanguagesAct.setStatusTip(self.tr( |
1397 'Configure the accepted languages for web pages')) |
1397 'Configure the accepted languages for web pages')) |
1398 self.acceptedLanguagesAct.setWhatsThis(self.tr( |
1398 self.acceptedLanguagesAct.setWhatsThis(self.tr( |
1403 self.__showAcceptedLanguages) |
1403 self.__showAcceptedLanguages) |
1404 self.__actions.append(self.acceptedLanguagesAct) |
1404 self.__actions.append(self.acceptedLanguagesAct) |
1405 |
1405 |
1406 self.cookiesAct = E5Action( |
1406 self.cookiesAct = E5Action( |
1407 self.tr('Cookies'), |
1407 self.tr('Cookies'), |
1408 UI.PixmapCache.getIcon("cookie.png"), |
1408 UI.PixmapCache.getIcon("cookie"), |
1409 self.tr('C&ookies...'), 0, 0, self, 'webbrowser_cookies') |
1409 self.tr('C&ookies...'), 0, 0, self, 'webbrowser_cookies') |
1410 self.cookiesAct.setStatusTip(self.tr( |
1410 self.cookiesAct.setStatusTip(self.tr( |
1411 'Configure cookies handling')) |
1411 'Configure cookies handling')) |
1412 self.cookiesAct.setWhatsThis(self.tr( |
1412 self.cookiesAct.setWhatsThis(self.tr( |
1413 """<b>Cookies</b>""" |
1413 """<b>Cookies</b>""" |
1417 self.__showCookiesConfiguration) |
1417 self.__showCookiesConfiguration) |
1418 self.__actions.append(self.cookiesAct) |
1418 self.__actions.append(self.cookiesAct) |
1419 |
1419 |
1420 self.flashCookiesAct = E5Action( |
1420 self.flashCookiesAct = E5Action( |
1421 self.tr('Flash Cookies'), |
1421 self.tr('Flash Cookies'), |
1422 UI.PixmapCache.getIcon("flashCookie.png"), |
1422 UI.PixmapCache.getIcon("flashCookie"), |
1423 self.tr('&Flash Cookies...'), 0, 0, self, |
1423 self.tr('&Flash Cookies...'), 0, 0, self, |
1424 'webbrowser_flash_cookies') |
1424 'webbrowser_flash_cookies') |
1425 self.flashCookiesAct.setStatusTip(self.tr( |
1425 self.flashCookiesAct.setStatusTip(self.tr( |
1426 'Manage flash cookies')) |
1426 'Manage flash cookies')) |
1427 self.flashCookiesAct.setWhatsThis(self.tr( |
1427 self.flashCookiesAct.setWhatsThis(self.tr( |
1432 self.__showFlashCookiesManagement) |
1432 self.__showFlashCookiesManagement) |
1433 self.__actions.append(self.flashCookiesAct) |
1433 self.__actions.append(self.flashCookiesAct) |
1434 |
1434 |
1435 self.personalDataAct = E5Action( |
1435 self.personalDataAct = E5Action( |
1436 self.tr('Personal Information'), |
1436 self.tr('Personal Information'), |
1437 UI.PixmapCache.getIcon("pim.png"), |
1437 UI.PixmapCache.getIcon("pim"), |
1438 self.tr('Personal Information...'), |
1438 self.tr('Personal Information...'), |
1439 0, 0, |
1439 0, 0, |
1440 self, 'webbrowser_personal_information') |
1440 self, 'webbrowser_personal_information') |
1441 self.personalDataAct.setStatusTip(self.tr( |
1441 self.personalDataAct.setStatusTip(self.tr( |
1442 'Configure personal information for completing form fields')) |
1442 'Configure personal information for completing form fields')) |
1449 self.__showPersonalInformationDialog) |
1449 self.__showPersonalInformationDialog) |
1450 self.__actions.append(self.personalDataAct) |
1450 self.__actions.append(self.personalDataAct) |
1451 |
1451 |
1452 self.greaseMonkeyAct = E5Action( |
1452 self.greaseMonkeyAct = E5Action( |
1453 self.tr('GreaseMonkey Scripts'), |
1453 self.tr('GreaseMonkey Scripts'), |
1454 UI.PixmapCache.getIcon("greaseMonkey.png"), |
1454 UI.PixmapCache.getIcon("greaseMonkey"), |
1455 self.tr('GreaseMonkey Scripts...'), |
1455 self.tr('GreaseMonkey Scripts...'), |
1456 0, 0, |
1456 0, 0, |
1457 self, 'webbrowser_greasemonkey') |
1457 self, 'webbrowser_greasemonkey') |
1458 self.greaseMonkeyAct.setStatusTip(self.tr( |
1458 self.greaseMonkeyAct.setStatusTip(self.tr( |
1459 'Configure the GreaseMonkey Scripts')) |
1459 'Configure the GreaseMonkey Scripts')) |
1466 self.__showGreaseMonkeyConfigDialog) |
1466 self.__showGreaseMonkeyConfigDialog) |
1467 self.__actions.append(self.greaseMonkeyAct) |
1467 self.__actions.append(self.greaseMonkeyAct) |
1468 |
1468 |
1469 self.editMessageFilterAct = E5Action( |
1469 self.editMessageFilterAct = E5Action( |
1470 self.tr('Edit Message Filters'), |
1470 self.tr('Edit Message Filters'), |
1471 UI.PixmapCache.getIcon("warning.png"), |
1471 UI.PixmapCache.getIcon("warning"), |
1472 self.tr('Edit Message Filters...'), 0, 0, self, |
1472 self.tr('Edit Message Filters...'), 0, 0, self, |
1473 'webbrowser_manage_message_filters') |
1473 'webbrowser_manage_message_filters') |
1474 self.editMessageFilterAct.setStatusTip(self.tr( |
1474 self.editMessageFilterAct.setStatusTip(self.tr( |
1475 'Edit the message filters used to suppress unwanted messages')) |
1475 'Edit the message filters used to suppress unwanted messages')) |
1476 self.editMessageFilterAct.setWhatsThis(self.tr( |
1476 self.editMessageFilterAct.setWhatsThis(self.tr( |
1483 E5ErrorMessage.editMessageFilters) |
1483 E5ErrorMessage.editMessageFilters) |
1484 self.__actions.append(self.editMessageFilterAct) |
1484 self.__actions.append(self.editMessageFilterAct) |
1485 |
1485 |
1486 self.featurePermissionAct = E5Action( |
1486 self.featurePermissionAct = E5Action( |
1487 self.tr('Edit HTML5 Feature Permissions'), |
1487 self.tr('Edit HTML5 Feature Permissions'), |
1488 UI.PixmapCache.getIcon("featurePermission.png"), |
1488 UI.PixmapCache.getIcon("featurePermission"), |
1489 self.tr('Edit HTML5 Feature Permissions...'), 0, 0, self, |
1489 self.tr('Edit HTML5 Feature Permissions...'), 0, 0, self, |
1490 'webbrowser_edit_feature_permissions') |
1490 'webbrowser_edit_feature_permissions') |
1491 self.featurePermissionAct.setStatusTip(self.tr( |
1491 self.featurePermissionAct.setStatusTip(self.tr( |
1492 'Edit the remembered HTML5 feature permissions')) |
1492 'Edit the remembered HTML5 feature permissions')) |
1493 self.featurePermissionAct.setWhatsThis(self.tr( |
1493 self.featurePermissionAct.setWhatsThis(self.tr( |
1500 self.__actions.append(self.featurePermissionAct) |
1500 self.__actions.append(self.featurePermissionAct) |
1501 |
1501 |
1502 if WebBrowserWindow._useQtHelp: |
1502 if WebBrowserWindow._useQtHelp: |
1503 self.syncTocAct = E5Action( |
1503 self.syncTocAct = E5Action( |
1504 self.tr('Sync with Table of Contents'), |
1504 self.tr('Sync with Table of Contents'), |
1505 UI.PixmapCache.getIcon("syncToc.png"), |
1505 UI.PixmapCache.getIcon("syncToc"), |
1506 self.tr('Sync with Table of Contents'), |
1506 self.tr('Sync with Table of Contents'), |
1507 0, 0, self, 'webbrowser_sync_toc') |
1507 0, 0, self, 'webbrowser_sync_toc') |
1508 self.syncTocAct.setStatusTip(self.tr( |
1508 self.syncTocAct.setStatusTip(self.tr( |
1509 'Synchronizes the table of contents with current page')) |
1509 'Synchronizes the table of contents with current page')) |
1510 self.syncTocAct.setWhatsThis(self.tr( |
1510 self.syncTocAct.setWhatsThis(self.tr( |
1584 self.__searchEngine.reindexDocumentation) |
1584 self.__searchEngine.reindexDocumentation) |
1585 self.__actions.append(self.reindexDocumentationAct) |
1585 self.__actions.append(self.reindexDocumentationAct) |
1586 |
1586 |
1587 self.clearPrivateDataAct = E5Action( |
1587 self.clearPrivateDataAct = E5Action( |
1588 self.tr('Clear private data'), |
1588 self.tr('Clear private data'), |
1589 UI.PixmapCache.getIcon("clearPrivateData.png"), |
1589 UI.PixmapCache.getIcon("clearPrivateData"), |
1590 self.tr('Clear private data'), |
1590 self.tr('Clear private data'), |
1591 0, 0, |
1591 0, 0, |
1592 self, 'webbrowser_clear_private_data') |
1592 self, 'webbrowser_clear_private_data') |
1593 self.clearPrivateDataAct.setStatusTip(self.tr( |
1593 self.clearPrivateDataAct.setStatusTip(self.tr( |
1594 'Clear private data')) |
1594 'Clear private data')) |
1616 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase) |
1616 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase) |
1617 self.__actions.append(self.clearIconsAct) |
1617 self.__actions.append(self.clearIconsAct) |
1618 |
1618 |
1619 self.manageIconsAct = E5Action( |
1619 self.manageIconsAct = E5Action( |
1620 self.tr('Manage saved Favicons'), |
1620 self.tr('Manage saved Favicons'), |
1621 UI.PixmapCache.getIcon("icons.png"), |
1621 UI.PixmapCache.getIcon("icons"), |
1622 self.tr('Manage saved Favicons'), |
1622 self.tr('Manage saved Favicons'), |
1623 0, 0, |
1623 0, 0, |
1624 self, 'webbrowser_manage_icons_db') |
1624 self, 'webbrowser_manage_icons_db') |
1625 self.manageIconsAct.setStatusTip(self.tr( |
1625 self.manageIconsAct.setStatusTip(self.tr( |
1626 'Show a dialog to manage the saved favicons')) |
1626 'Show a dialog to manage the saved favicons')) |
1648 self.__showEnginesConfigurationDialog) |
1648 self.__showEnginesConfigurationDialog) |
1649 self.__actions.append(self.searchEnginesAct) |
1649 self.__actions.append(self.searchEnginesAct) |
1650 |
1650 |
1651 self.passwordsAct = E5Action( |
1651 self.passwordsAct = E5Action( |
1652 self.tr('Manage Saved Passwords'), |
1652 self.tr('Manage Saved Passwords'), |
1653 UI.PixmapCache.getIcon("passwords.png"), |
1653 UI.PixmapCache.getIcon("passwords"), |
1654 self.tr('Manage Saved Passwords...'), |
1654 self.tr('Manage Saved Passwords...'), |
1655 0, 0, |
1655 0, 0, |
1656 self, 'webbrowser_manage_passwords') |
1656 self, 'webbrowser_manage_passwords') |
1657 self.passwordsAct.setStatusTip(self.tr( |
1657 self.passwordsAct.setStatusTip(self.tr( |
1658 'Manage the saved passwords')) |
1658 'Manage the saved passwords')) |
1663 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1663 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1664 self.__actions.append(self.passwordsAct) |
1664 self.__actions.append(self.passwordsAct) |
1665 |
1665 |
1666 self.adblockAct = E5Action( |
1666 self.adblockAct = E5Action( |
1667 self.tr('Ad Block'), |
1667 self.tr('Ad Block'), |
1668 UI.PixmapCache.getIcon("adBlockPlus.png"), |
1668 UI.PixmapCache.getIcon("adBlockPlus"), |
1669 self.tr('&Ad Block...'), |
1669 self.tr('&Ad Block...'), |
1670 0, 0, |
1670 0, 0, |
1671 self, 'webbrowser_adblock') |
1671 self, 'webbrowser_adblock') |
1672 self.adblockAct.setStatusTip(self.tr( |
1672 self.adblockAct.setStatusTip(self.tr( |
1673 'Configure AdBlock subscriptions and rules')) |
1673 'Configure AdBlock subscriptions and rules')) |
1679 self.adblockAct.triggered.connect(self.__showAdBlockDialog) |
1679 self.adblockAct.triggered.connect(self.__showAdBlockDialog) |
1680 self.__actions.append(self.adblockAct) |
1680 self.__actions.append(self.adblockAct) |
1681 |
1681 |
1682 self.certificateErrorsAct = E5Action( |
1682 self.certificateErrorsAct = E5Action( |
1683 self.tr('Manage SSL Certificate Errors'), |
1683 self.tr('Manage SSL Certificate Errors'), |
1684 UI.PixmapCache.getIcon("certificates.png"), |
1684 UI.PixmapCache.getIcon("certificates"), |
1685 self.tr('Manage SSL Certificate Errors...'), |
1685 self.tr('Manage SSL Certificate Errors...'), |
1686 0, 0, |
1686 0, 0, |
1687 self, 'webbrowser_manage_certificate_errors') |
1687 self, 'webbrowser_manage_certificate_errors') |
1688 self.certificateErrorsAct.setStatusTip(self.tr( |
1688 self.certificateErrorsAct.setStatusTip(self.tr( |
1689 'Manage the accepted SSL certificate Errors')) |
1689 'Manage the accepted SSL certificate Errors')) |
1696 self.__showCertificateErrorsDialog) |
1696 self.__showCertificateErrorsDialog) |
1697 self.__actions.append(self.certificateErrorsAct) |
1697 self.__actions.append(self.certificateErrorsAct) |
1698 |
1698 |
1699 self.safeBrowsingAct = E5Action( |
1699 self.safeBrowsingAct = E5Action( |
1700 self.tr('Manage Safe Browsing'), |
1700 self.tr('Manage Safe Browsing'), |
1701 UI.PixmapCache.getIcon("safeBrowsing.png"), |
1701 UI.PixmapCache.getIcon("safeBrowsing"), |
1702 self.tr('Manage Safe Browsing...'), 0, 0, self, |
1702 self.tr('Manage Safe Browsing...'), 0, 0, self, |
1703 'webbrowser_manage_safe_browsing') |
1703 'webbrowser_manage_safe_browsing') |
1704 self.safeBrowsingAct.setStatusTip(self.tr( |
1704 self.safeBrowsingAct.setStatusTip(self.tr( |
1705 'Configure Safe Browsing and manage local cache')) |
1705 'Configure Safe Browsing and manage local cache')) |
1706 self.safeBrowsingAct.setWhatsThis(self.tr( |
1706 self.safeBrowsingAct.setWhatsThis(self.tr( |
1726 self.__showDownloadsWindow) |
1726 self.__showDownloadsWindow) |
1727 self.__actions.append(self.showDownloadManagerAct) |
1727 self.__actions.append(self.showDownloadManagerAct) |
1728 |
1728 |
1729 self.feedsManagerAct = E5Action( |
1729 self.feedsManagerAct = E5Action( |
1730 self.tr('RSS Feeds Dialog'), |
1730 self.tr('RSS Feeds Dialog'), |
1731 UI.PixmapCache.getIcon("rss22.png"), |
1731 UI.PixmapCache.getIcon("rss22"), |
1732 self.tr('&RSS Feeds Dialog...'), |
1732 self.tr('&RSS Feeds Dialog...'), |
1733 QKeySequence(self.tr("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), |
1733 QKeySequence(self.tr("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), |
1734 0, self, 'webbrowser_rss_feeds') |
1734 0, self, 'webbrowser_rss_feeds') |
1735 self.feedsManagerAct.setStatusTip(self.tr( |
1735 self.feedsManagerAct.setStatusTip(self.tr( |
1736 'Open a dialog showing the configured RSS feeds.')) |
1736 'Open a dialog showing the configured RSS feeds.')) |
1743 self.feedsManagerAct.triggered.connect(self.__showFeedsManager) |
1743 self.feedsManagerAct.triggered.connect(self.__showFeedsManager) |
1744 self.__actions.append(self.feedsManagerAct) |
1744 self.__actions.append(self.feedsManagerAct) |
1745 |
1745 |
1746 self.siteInfoAct = E5Action( |
1746 self.siteInfoAct = E5Action( |
1747 self.tr('Siteinfo Dialog'), |
1747 self.tr('Siteinfo Dialog'), |
1748 UI.PixmapCache.getIcon("helpAbout.png"), |
1748 UI.PixmapCache.getIcon("helpAbout"), |
1749 self.tr('&Siteinfo Dialog...'), |
1749 self.tr('&Siteinfo Dialog...'), |
1750 QKeySequence(self.tr("Ctrl+Shift+I", "Help|Siteinfo Dialog")), |
1750 QKeySequence(self.tr("Ctrl+Shift+I", "Help|Siteinfo Dialog")), |
1751 0, self, 'webbrowser_siteinfo') |
1751 0, self, 'webbrowser_siteinfo') |
1752 self.siteInfoAct.setStatusTip(self.tr( |
1752 self.siteInfoAct.setStatusTip(self.tr( |
1753 'Open a dialog showing some information about the current site.')) |
1753 'Open a dialog showing some information about the current site.')) |
1773 self.__showUserAgentsDialog) |
1773 self.__showUserAgentsDialog) |
1774 self.__actions.append(self.userAgentManagerAct) |
1774 self.__actions.append(self.userAgentManagerAct) |
1775 |
1775 |
1776 self.synchronizationAct = E5Action( |
1776 self.synchronizationAct = E5Action( |
1777 self.tr('Synchronize data'), |
1777 self.tr('Synchronize data'), |
1778 UI.PixmapCache.getIcon("sync.png"), |
1778 UI.PixmapCache.getIcon("sync"), |
1779 self.tr('&Synchronize Data...'), |
1779 self.tr('&Synchronize Data...'), |
1780 0, 0, self, 'webbrowser_synchronize_data') |
1780 0, 0, self, 'webbrowser_synchronize_data') |
1781 self.synchronizationAct.setStatusTip(self.tr( |
1781 self.synchronizationAct.setStatusTip(self.tr( |
1782 'Shows a dialog to synchronize data via the network')) |
1782 'Shows a dialog to synchronize data via the network')) |
1783 self.synchronizationAct.setWhatsThis(self.tr( |
1783 self.synchronizationAct.setWhatsThis(self.tr( |
1789 self.__showSyncDialog) |
1789 self.__showSyncDialog) |
1790 self.__actions.append(self.synchronizationAct) |
1790 self.__actions.append(self.synchronizationAct) |
1791 |
1791 |
1792 self.zoomValuesAct = E5Action( |
1792 self.zoomValuesAct = E5Action( |
1793 self.tr('Manage Saved Zoom Values'), |
1793 self.tr('Manage Saved Zoom Values'), |
1794 UI.PixmapCache.getIcon("zoomReset.png"), |
1794 UI.PixmapCache.getIcon("zoomReset"), |
1795 self.tr('Manage Saved Zoom Values...'), |
1795 self.tr('Manage Saved Zoom Values...'), |
1796 0, 0, |
1796 0, 0, |
1797 self, 'webbrowser_manage_zoom_values') |
1797 self, 'webbrowser_manage_zoom_values') |
1798 self.zoomValuesAct.setStatusTip(self.tr( |
1798 self.zoomValuesAct.setStatusTip(self.tr( |
1799 'Manage the saved zoom values')) |
1799 'Manage the saved zoom values')) |
1846 self.__showSessionManagerDialog) |
1846 self.__showSessionManagerDialog) |
1847 self.__actions.append(self.showSessionsManagerAct) |
1847 self.__actions.append(self.showSessionsManagerAct) |
1848 |
1848 |
1849 self.virustotalScanCurrentAct = E5Action( |
1849 self.virustotalScanCurrentAct = E5Action( |
1850 self.tr("Scan current site"), |
1850 self.tr("Scan current site"), |
1851 UI.PixmapCache.getIcon("virustotal.png"), |
1851 UI.PixmapCache.getIcon("virustotal"), |
1852 self.tr("Scan current site"), |
1852 self.tr("Scan current site"), |
1853 0, 0, |
1853 0, 0, |
1854 self, 'webbrowser_virustotal_scan_site') |
1854 self, 'webbrowser_virustotal_scan_site') |
1855 self.virustotalScanCurrentAct.triggered.connect( |
1855 self.virustotalScanCurrentAct.triggered.connect( |
1856 self.__virusTotalScanCurrentSite) |
1856 self.__virusTotalScanCurrentSite) |
1857 self.__actions.append(self.virustotalScanCurrentAct) |
1857 self.__actions.append(self.virustotalScanCurrentAct) |
1858 |
1858 |
1859 self.virustotalIpReportAct = E5Action( |
1859 self.virustotalIpReportAct = E5Action( |
1860 self.tr("IP Address Report"), |
1860 self.tr("IP Address Report"), |
1861 UI.PixmapCache.getIcon("virustotal.png"), |
1861 UI.PixmapCache.getIcon("virustotal"), |
1862 self.tr("IP Address Report"), |
1862 self.tr("IP Address Report"), |
1863 0, 0, |
1863 0, 0, |
1864 self, 'webbrowser_virustotal_ip_report') |
1864 self, 'webbrowser_virustotal_ip_report') |
1865 self.virustotalIpReportAct.triggered.connect( |
1865 self.virustotalIpReportAct.triggered.connect( |
1866 self.__virusTotalIpAddressReport) |
1866 self.__virusTotalIpAddressReport) |
1867 self.__actions.append(self.virustotalIpReportAct) |
1867 self.__actions.append(self.virustotalIpReportAct) |
1868 |
1868 |
1869 self.virustotalDomainReportAct = E5Action( |
1869 self.virustotalDomainReportAct = E5Action( |
1870 self.tr("Domain Report"), |
1870 self.tr("Domain Report"), |
1871 UI.PixmapCache.getIcon("virustotal.png"), |
1871 UI.PixmapCache.getIcon("virustotal"), |
1872 self.tr("Domain Report"), |
1872 self.tr("Domain Report"), |
1873 0, 0, |
1873 0, 0, |
1874 self, 'webbrowser_virustotal_domain_report') |
1874 self, 'webbrowser_virustotal_domain_report') |
1875 self.virustotalDomainReportAct.triggered.connect( |
1875 self.virustotalDomainReportAct.triggered.connect( |
1876 self.__virusTotalDomainReport) |
1876 self.__virusTotalDomainReport) |
1884 self.virustotalIpReportAct.setEnabled(False) |
1884 self.virustotalIpReportAct.setEnabled(False) |
1885 self.virustotalDomainReportAct.setEnabled(False) |
1885 self.virustotalDomainReportAct.setEnabled(False) |
1886 |
1886 |
1887 self.shortcutsAct = E5Action( |
1887 self.shortcutsAct = E5Action( |
1888 self.tr('Keyboard Shortcuts'), |
1888 self.tr('Keyboard Shortcuts'), |
1889 UI.PixmapCache.getIcon("configureShortcuts.png"), |
1889 UI.PixmapCache.getIcon("configureShortcuts"), |
1890 self.tr('Keyboard &Shortcuts...'), |
1890 self.tr('Keyboard &Shortcuts...'), |
1891 0, 0, |
1891 0, 0, |
1892 self, 'webbrowser_keyboard_shortcuts') |
1892 self, 'webbrowser_keyboard_shortcuts') |
1893 self.shortcutsAct.setStatusTip(self.tr( |
1893 self.shortcutsAct.setStatusTip(self.tr( |
1894 'Set the keyboard shortcuts')) |
1894 'Set the keyboard shortcuts')) |
1900 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
1900 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
1901 self.__actions.append(self.shortcutsAct) |
1901 self.__actions.append(self.shortcutsAct) |
1902 |
1902 |
1903 self.exportShortcutsAct = E5Action( |
1903 self.exportShortcutsAct = E5Action( |
1904 self.tr('Export Keyboard Shortcuts'), |
1904 self.tr('Export Keyboard Shortcuts'), |
1905 UI.PixmapCache.getIcon("exportShortcuts.png"), |
1905 UI.PixmapCache.getIcon("exportShortcuts"), |
1906 self.tr('&Export Keyboard Shortcuts...'), |
1906 self.tr('&Export Keyboard Shortcuts...'), |
1907 0, 0, self, 'export_keyboard_shortcuts') |
1907 0, 0, self, 'export_keyboard_shortcuts') |
1908 self.exportShortcutsAct.setStatusTip(self.tr( |
1908 self.exportShortcutsAct.setStatusTip(self.tr( |
1909 'Export the keyboard shortcuts')) |
1909 'Export the keyboard shortcuts')) |
1910 self.exportShortcutsAct.setWhatsThis(self.tr( |
1910 self.exportShortcutsAct.setWhatsThis(self.tr( |
1914 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
1914 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
1915 self.__actions.append(self.exportShortcutsAct) |
1915 self.__actions.append(self.exportShortcutsAct) |
1916 |
1916 |
1917 self.importShortcutsAct = E5Action( |
1917 self.importShortcutsAct = E5Action( |
1918 self.tr('Import Keyboard Shortcuts'), |
1918 self.tr('Import Keyboard Shortcuts'), |
1919 UI.PixmapCache.getIcon("importShortcuts.png"), |
1919 UI.PixmapCache.getIcon("importShortcuts"), |
1920 self.tr('&Import Keyboard Shortcuts...'), |
1920 self.tr('&Import Keyboard Shortcuts...'), |
1921 0, 0, self, 'import_keyboard_shortcuts') |
1921 0, 0, self, 'import_keyboard_shortcuts') |
1922 self.importShortcutsAct.setStatusTip(self.tr( |
1922 self.importShortcutsAct.setStatusTip(self.tr( |
1923 'Import the keyboard shortcuts')) |
1923 'Import the keyboard shortcuts')) |
1924 self.importShortcutsAct.setWhatsThis(self.tr( |
1924 self.importShortcutsAct.setWhatsThis(self.tr( |
2124 menu.addAction(self.feedsManagerAct) |
2124 menu.addAction(self.feedsManagerAct) |
2125 menu.addAction(self.siteInfoAct) |
2125 menu.addAction(self.siteInfoAct) |
2126 menu.addSeparator() |
2126 menu.addSeparator() |
2127 menu.addAction(self.synchronizationAct) |
2127 menu.addAction(self.synchronizationAct) |
2128 menu.addSeparator() |
2128 menu.addSeparator() |
2129 vtMenu = menu.addMenu(UI.PixmapCache.getIcon("virustotal.png"), |
2129 vtMenu = menu.addMenu(UI.PixmapCache.getIcon("virustotal"), |
2130 self.tr("&VirusTotal")) |
2130 self.tr("&VirusTotal")) |
2131 vtMenu.addAction(self.virustotalScanCurrentAct) |
2131 vtMenu.addAction(self.virustotalScanCurrentAct) |
2132 vtMenu.addAction(self.virustotalIpReportAct) |
2132 vtMenu.addAction(self.virustotalIpReportAct) |
2133 vtMenu.addAction(self.virustotalDomainReportAct) |
2133 vtMenu.addAction(self.virustotalDomainReportAct) |
2134 |
2134 |
2195 self.__superMenu.addAction(self.sendPageLinkAct) |
2195 self.__superMenu.addAction(self.sendPageLinkAct) |
2196 self.__superMenu.addSeparator() |
2196 self.__superMenu.addSeparator() |
2197 self.__superMenu.addAction(self.selectAllAct) |
2197 self.__superMenu.addAction(self.selectAllAct) |
2198 self.__superMenu.addAction(self.findAct) |
2198 self.__superMenu.addAction(self.findAct) |
2199 self.__superMenu.addSeparator() |
2199 self.__superMenu.addSeparator() |
2200 act = self.__superMenu.addAction(UI.PixmapCache.getIcon("history.png"), |
2200 act = self.__superMenu.addAction(UI.PixmapCache.getIcon("history"), |
2201 self.tr("Show All History...")) |
2201 self.tr("Show All History...")) |
2202 act.triggered.connect(self.historyMenu.showHistoryDialog) |
2202 act.triggered.connect(self.historyMenu.showHistoryDialog) |
2203 self.__superMenu.addAction(self.bookmarksManageAct) |
2203 self.__superMenu.addAction(self.bookmarksManageAct) |
2204 self.__superMenu.addSeparator() |
2204 self.__superMenu.addSeparator() |
2205 self.__superMenu.addAction(self.prefAct) |
2205 self.__superMenu.addAction(self.prefAct) |
2279 menu.addAction(self.feedsManagerAct) |
2279 menu.addAction(self.feedsManagerAct) |
2280 menu.addAction(self.siteInfoAct) |
2280 menu.addAction(self.siteInfoAct) |
2281 menu.addSeparator() |
2281 menu.addSeparator() |
2282 menu.addAction(self.synchronizationAct) |
2282 menu.addAction(self.synchronizationAct) |
2283 menu.addSeparator() |
2283 menu.addSeparator() |
2284 vtMenu = menu.addMenu(UI.PixmapCache.getIcon("virustotal.png"), |
2284 vtMenu = menu.addMenu(UI.PixmapCache.getIcon("virustotal"), |
2285 self.tr("&VirusTotal")) |
2285 self.tr("&VirusTotal")) |
2286 vtMenu.addAction(self.virustotalScanCurrentAct) |
2286 vtMenu.addAction(self.virustotalScanCurrentAct) |
2287 vtMenu.addAction(self.virustotalIpReportAct) |
2287 vtMenu.addAction(self.virustotalIpReportAct) |
2288 vtMenu.addAction(self.virustotalDomainReportAct) |
2288 vtMenu.addAction(self.virustotalDomainReportAct) |
2289 |
2289 |
2918 .format(windowCount, tabCount), |
2918 .format(windowCount, tabCount), |
2919 modal=True, |
2919 modal=True, |
2920 parent=self) |
2920 parent=self) |
2921 quitButton = mb.addButton( |
2921 quitButton = mb.addButton( |
2922 self.tr("&Quit"), E5MessageBox.AcceptRole) |
2922 self.tr("&Quit"), E5MessageBox.AcceptRole) |
2923 quitButton.setIcon(UI.PixmapCache.getIcon("exit.png")) |
2923 quitButton.setIcon(UI.PixmapCache.getIcon("exit")) |
2924 mb.addButton(E5MessageBox.Cancel) |
2924 mb.addButton(E5MessageBox.Cancel) |
2925 mb.exec_() |
2925 mb.exec_() |
2926 return mb.clickedButton() == quitButton |
2926 return mb.clickedButton() == quitButton |
2927 |
2927 |
2928 return True |
2928 return True |