53 |
53 |
54 QTHELP_AVAILABLE = True |
54 QTHELP_AVAILABLE = True |
55 except ImportError: |
55 except ImportError: |
56 QTHELP_AVAILABLE = False |
56 QTHELP_AVAILABLE = False |
57 |
57 |
58 from EricGui.EricAction import EricAction |
58 from eric7.EricGui.EricAction import EricAction |
59 from EricGui.EricOverrideCursor import EricOverrideCursor |
59 from eric7.EricGui.EricOverrideCursor import EricOverrideCursor |
60 |
60 |
61 from EricWidgets import EricMessageBox, EricFileDialog, EricErrorMessage |
61 from eric7.EricWidgets import EricMessageBox, EricFileDialog, EricErrorMessage |
62 from EricWidgets.EricMainWindow import EricMainWindow |
62 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
63 from EricWidgets.EricApplication import ericApp |
63 from eric7.EricWidgets.EricApplication import ericApp |
64 from EricWidgets.EricZoomWidget import EricZoomWidget |
64 from eric7.EricWidgets.EricZoomWidget import EricZoomWidget |
65 |
65 |
66 from EricNetwork.EricNetworkIcon import EricNetworkIcon |
66 from eric7.EricNetwork.EricNetworkIcon import EricNetworkIcon |
67 |
67 |
68 import Preferences |
68 from eric7 import Globals, Preferences, Utilities |
69 from Preferences import Shortcuts |
69 |
70 |
70 from eric7.Preferences import Shortcuts |
71 import Utilities |
71 |
72 import Globals |
72 from eric7.EricGui import EricPixmapCache |
73 |
73 from eric7.UI import Config |
74 import UI.PixmapCache |
74 from eric7.UI.Info import Version |
75 import UI.Config |
75 from eric7.UI.NotificationWidget import NotificationTypes |
76 from UI.Info import Version |
76 |
77 from UI.NotificationWidget import NotificationTypes |
77 from .Tools import Scripts, WebBrowserTools |
78 |
78 from eric7.WebBrowser.Tools import WebIconProvider |
79 from .Tools import Scripts, WebBrowserTools, WebIconProvider |
79 |
80 |
80 from eric7.WebBrowser.ZoomManager import ZoomManager |
81 from .ZoomManager import ZoomManager |
|
82 |
81 |
83 from .WebBrowserSingleApplication import WebBrowserSingleApplicationServer |
82 from .WebBrowserSingleApplication import WebBrowserSingleApplicationServer |
84 |
83 |
85 from eric7config import getConfig |
84 from eric7config import getConfig |
86 |
85 |
185 self.setWindowTitle(self.tr("eric Web Browser (Private Mode)")) |
184 self.setWindowTitle(self.tr("eric Web Browser (Private Mode)")) |
186 else: |
185 else: |
187 self.setWindowTitle(self.tr("eric Web Browser")) |
186 self.setWindowTitle(self.tr("eric Web Browser")) |
188 |
187 |
189 self.__settingsDir = settingsDir |
188 self.__settingsDir = settingsDir |
190 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb")) |
189 self.setWindowIcon(EricPixmapCache.getIcon("ericWeb")) |
191 |
190 |
192 self.__mHistory = [] |
191 self.__mHistory = [] |
193 self.__lastConfigurationPageName = "" |
192 self.__lastConfigurationPageName = "" |
194 |
193 |
195 WebBrowserWindow._isPrivate = private |
194 WebBrowserWindow._isPrivate = private |
220 from .Bookmarks.BookmarksToolBar import BookmarksToolBar |
219 from .Bookmarks.BookmarksToolBar import BookmarksToolBar |
221 |
220 |
222 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) |
221 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) |
223 |
222 |
224 # initialize some SSL stuff |
223 # initialize some SSL stuff |
225 from EricNetwork.EricSslUtilities import initSSL |
224 from eric7.EricNetwork.EricSslUtilities import initSSL |
226 |
225 |
227 initSSL() |
226 initSSL() |
228 |
227 |
229 if WebBrowserWindow._useQtHelp: |
228 if WebBrowserWindow._useQtHelp: |
230 self.__helpEngine = QHelpEngine( |
229 self.__helpEngine = QHelpEngine( |
238 else: |
237 else: |
239 self.__helpEngine = None |
238 self.__helpEngine = None |
240 self.__helpInstaller = None |
239 self.__helpInstaller = None |
241 |
240 |
242 self.__zoomWidget = EricZoomWidget( |
241 self.__zoomWidget = EricZoomWidget( |
243 UI.PixmapCache.getPixmap("zoomOut"), |
242 EricPixmapCache.getPixmap("zoomOut"), |
244 UI.PixmapCache.getPixmap("zoomIn"), |
243 EricPixmapCache.getPixmap("zoomIn"), |
245 UI.PixmapCache.getPixmap("zoomReset"), |
244 EricPixmapCache.getPixmap("zoomReset"), |
246 self, |
245 self, |
247 ) |
246 ) |
248 self.statusBar().addPermanentWidget(self.__zoomWidget) |
247 self.statusBar().addPermanentWidget(self.__zoomWidget) |
249 self.__zoomWidget.setMapping( |
248 self.__zoomWidget.setMapping( |
250 WebBrowserView.ZoomLevels, WebBrowserView.ZoomLevelDefault |
249 WebBrowserView.ZoomLevels, WebBrowserView.ZoomLevelDefault |
259 self.__tabWidget.browserClosed.connect(self.webBrowserClosed) |
258 self.__tabWidget.browserClosed.connect(self.webBrowserClosed) |
260 self.__tabWidget.browserOpened.connect(self.webBrowserOpened) |
259 self.__tabWidget.browserOpened.connect(self.webBrowserOpened) |
261 |
260 |
262 self.__searchWidget = SearchWidget(self, self) |
261 self.__searchWidget = SearchWidget(self, self) |
263 |
262 |
264 self.__setIconDatabasePath() |
263 self.setIconDatabasePath() |
265 |
264 |
266 bookmarksModel = self.bookmarksManager().bookmarksModel() |
265 bookmarksModel = self.bookmarksManager().bookmarksModel() |
267 self.__bookmarksToolBar = BookmarksToolBar(self, bookmarksModel, self) |
266 self.__bookmarksToolBar = BookmarksToolBar(self, bookmarksModel, self) |
268 self.__bookmarksToolBar.setIconSize(UI.Config.ToolBarIconSize) |
267 self.__bookmarksToolBar.setIconSize(Config.ToolBarIconSize) |
269 self.__bookmarksToolBar.openUrl.connect(self.openUrl) |
268 self.__bookmarksToolBar.openUrl.connect(self.openUrl) |
270 self.__bookmarksToolBar.newTab.connect(self.openUrlNewTab) |
269 self.__bookmarksToolBar.newTab.connect(self.openUrlNewTab) |
271 self.__bookmarksToolBar.newWindow.connect(self.openUrlNewWindow) |
270 self.__bookmarksToolBar.newWindow.connect(self.openUrlNewWindow) |
272 |
271 |
273 self.__navigationBar = NavigationBar(self) |
272 self.__navigationBar = NavigationBar(self) |
520 @return reference to the tab widget |
519 @return reference to the tab widget |
521 @rtype WebBrowserTabWidget |
520 @rtype WebBrowserTabWidget |
522 """ |
521 """ |
523 return self.__tabWidget |
522 return self.__tabWidget |
524 |
523 |
525 def __setIconDatabasePath(self, enable=True): |
524 @classmethod |
526 """ |
525 def setIconDatabasePath(cls, enable=True): |
527 Private method to set the favicons path. |
526 """ |
|
527 Class method to set the favicons path. |
528 |
528 |
529 @param enable flag indicating to enabled icon storage (boolean) |
529 @param enable flag indicating to enabled icon storage (boolean) |
530 """ |
530 """ |
531 if enable: |
531 if enable: |
532 iconDatabasePath = os.path.join( |
532 iconDatabasePath = os.path.join( |
717 # list of all actions |
717 # list of all actions |
718 self.__actions = [] |
718 self.__actions = [] |
719 |
719 |
720 self.newTabAct = EricAction( |
720 self.newTabAct = EricAction( |
721 self.tr("New Tab"), |
721 self.tr("New Tab"), |
722 UI.PixmapCache.getIcon("tabNew"), |
722 EricPixmapCache.getIcon("tabNew"), |
723 self.tr("&New Tab"), |
723 self.tr("&New Tab"), |
724 QKeySequence(self.tr("Ctrl+T", "File|New Tab")), |
724 QKeySequence(self.tr("Ctrl+T", "File|New Tab")), |
725 0, |
725 0, |
726 self, |
726 self, |
727 "webbrowser_file_new_tab", |
727 "webbrowser_file_new_tab", |
733 self.newTabAct.triggered.connect(self.newTab) |
733 self.newTabAct.triggered.connect(self.newTab) |
734 self.__actions.append(self.newTabAct) |
734 self.__actions.append(self.newTabAct) |
735 |
735 |
736 self.newAct = EricAction( |
736 self.newAct = EricAction( |
737 self.tr("New Window"), |
737 self.tr("New Window"), |
738 UI.PixmapCache.getIcon("newWindow"), |
738 EricPixmapCache.getIcon("newWindow"), |
739 self.tr("New &Window"), |
739 self.tr("New &Window"), |
740 QKeySequence(self.tr("Ctrl+N", "File|New Window")), |
740 QKeySequence(self.tr("Ctrl+N", "File|New Window")), |
741 0, |
741 0, |
742 self, |
742 self, |
743 "webbrowser_file_new_window", |
743 "webbrowser_file_new_window", |
753 self.newAct.triggered.connect(self.newWindow) |
753 self.newAct.triggered.connect(self.newWindow) |
754 self.__actions.append(self.newAct) |
754 self.__actions.append(self.newAct) |
755 |
755 |
756 self.newPrivateAct = EricAction( |
756 self.newPrivateAct = EricAction( |
757 self.tr("New Private Window"), |
757 self.tr("New Private Window"), |
758 UI.PixmapCache.getIcon("privateMode"), |
758 EricPixmapCache.getIcon("privateMode"), |
759 self.tr("New &Private Window"), |
759 self.tr("New &Private Window"), |
760 QKeySequence(self.tr("Ctrl+Shift+P", "File|New Private Window")), |
760 QKeySequence(self.tr("Ctrl+Shift+P", "File|New Private Window")), |
761 0, |
761 0, |
762 self, |
762 self, |
763 "webbrowser_file_new_private_window", |
763 "webbrowser_file_new_private_window", |
775 self.newPrivateAct.triggered.connect(self.newPrivateWindow) |
775 self.newPrivateAct.triggered.connect(self.newPrivateWindow) |
776 self.__actions.append(self.newPrivateAct) |
776 self.__actions.append(self.newPrivateAct) |
777 |
777 |
778 self.openAct = EricAction( |
778 self.openAct = EricAction( |
779 self.tr("Open File"), |
779 self.tr("Open File"), |
780 UI.PixmapCache.getIcon("open"), |
780 EricPixmapCache.getIcon("open"), |
781 self.tr("&Open File"), |
781 self.tr("&Open File"), |
782 QKeySequence(self.tr("Ctrl+O", "File|Open")), |
782 QKeySequence(self.tr("Ctrl+O", "File|Open")), |
783 0, |
783 0, |
784 self, |
784 self, |
785 "webbrowser_file_open", |
785 "webbrowser_file_open", |
795 self.openAct.triggered.connect(self.__openFile) |
795 self.openAct.triggered.connect(self.__openFile) |
796 self.__actions.append(self.openAct) |
796 self.__actions.append(self.openAct) |
797 |
797 |
798 self.openTabAct = EricAction( |
798 self.openTabAct = EricAction( |
799 self.tr("Open File in New Tab"), |
799 self.tr("Open File in New Tab"), |
800 UI.PixmapCache.getIcon("openNewTab"), |
800 EricPixmapCache.getIcon("openNewTab"), |
801 self.tr("Open File in New &Tab"), |
801 self.tr("Open File in New &Tab"), |
802 QKeySequence(self.tr("Shift+Ctrl+O", "File|Open in new tab")), |
802 QKeySequence(self.tr("Shift+Ctrl+O", "File|Open in new tab")), |
803 0, |
803 0, |
804 self, |
804 self, |
805 "webbrowser_file_open_tab", |
805 "webbrowser_file_open_tab", |
816 self.__actions.append(self.openTabAct) |
816 self.__actions.append(self.openTabAct) |
817 |
817 |
818 if hasattr(QWebEnginePage, "SavePage"): |
818 if hasattr(QWebEnginePage, "SavePage"): |
819 self.saveAsAct = EricAction( |
819 self.saveAsAct = EricAction( |
820 self.tr("Save As"), |
820 self.tr("Save As"), |
821 UI.PixmapCache.getIcon("fileSaveAs"), |
821 EricPixmapCache.getIcon("fileSaveAs"), |
822 self.tr("&Save As..."), |
822 self.tr("&Save As..."), |
823 QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), |
823 QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), |
824 0, |
824 0, |
825 self, |
825 self, |
826 "webbrowser_file_save_as", |
826 "webbrowser_file_save_as", |
836 else: |
836 else: |
837 self.saveAsAct = None |
837 self.saveAsAct = None |
838 |
838 |
839 self.saveVisiblePageScreenAct = EricAction( |
839 self.saveVisiblePageScreenAct = EricAction( |
840 self.tr("Save Page Screen"), |
840 self.tr("Save Page Screen"), |
841 UI.PixmapCache.getIcon("fileSavePixmap"), |
841 EricPixmapCache.getIcon("fileSavePixmap"), |
842 self.tr("Save Page Screen..."), |
842 self.tr("Save Page Screen..."), |
843 0, |
843 0, |
844 0, |
844 0, |
845 self, |
845 self, |
846 "webbrowser_file_save_visible_page_screen", |
846 "webbrowser_file_save_visible_page_screen", |
899 self.exportBookmarksAct.triggered.connect(bookmarksManager.exportBookmarks) |
899 self.exportBookmarksAct.triggered.connect(bookmarksManager.exportBookmarks) |
900 self.__actions.append(self.exportBookmarksAct) |
900 self.__actions.append(self.exportBookmarksAct) |
901 |
901 |
902 self.printAct = EricAction( |
902 self.printAct = EricAction( |
903 self.tr("Print"), |
903 self.tr("Print"), |
904 UI.PixmapCache.getIcon("print"), |
904 EricPixmapCache.getIcon("print"), |
905 self.tr("&Print"), |
905 self.tr("&Print"), |
906 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
906 QKeySequence(self.tr("Ctrl+P", "File|Print")), |
907 0, |
907 0, |
908 self, |
908 self, |
909 "webbrowser_file_print", |
909 "webbrowser_file_print", |
915 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
915 self.printAct.triggered.connect(self.__tabWidget.printBrowser) |
916 self.__actions.append(self.printAct) |
916 self.__actions.append(self.printAct) |
917 |
917 |
918 self.printPdfAct = EricAction( |
918 self.printPdfAct = EricAction( |
919 self.tr("Print as PDF"), |
919 self.tr("Print as PDF"), |
920 UI.PixmapCache.getIcon("printPdf"), |
920 EricPixmapCache.getIcon("printPdf"), |
921 self.tr("Print as PDF"), |
921 self.tr("Print as PDF"), |
922 0, |
922 0, |
923 0, |
923 0, |
924 self, |
924 self, |
925 "webbrowser_file_print_pdf", |
925 "webbrowser_file_print_pdf", |
934 self.printPdfAct.triggered.connect(self.__tabWidget.printBrowserPdf) |
934 self.printPdfAct.triggered.connect(self.__tabWidget.printBrowserPdf) |
935 self.__actions.append(self.printPdfAct) |
935 self.__actions.append(self.printPdfAct) |
936 |
936 |
937 self.printPreviewAct = EricAction( |
937 self.printPreviewAct = EricAction( |
938 self.tr("Print Preview"), |
938 self.tr("Print Preview"), |
939 UI.PixmapCache.getIcon("printPreview"), |
939 EricPixmapCache.getIcon("printPreview"), |
940 self.tr("Print Preview"), |
940 self.tr("Print Preview"), |
941 0, |
941 0, |
942 0, |
942 0, |
943 self, |
943 self, |
944 "webbrowser_file_print_preview", |
944 "webbrowser_file_print_preview", |
955 self.printPreviewAct.triggered.connect(self.__tabWidget.printPreviewBrowser) |
955 self.printPreviewAct.triggered.connect(self.__tabWidget.printPreviewBrowser) |
956 self.__actions.append(self.printPreviewAct) |
956 self.__actions.append(self.printPreviewAct) |
957 |
957 |
958 self.sendPageLinkAct = EricAction( |
958 self.sendPageLinkAct = EricAction( |
959 self.tr("Send Page Link"), |
959 self.tr("Send Page Link"), |
960 UI.PixmapCache.getIcon("mailSend"), |
960 EricPixmapCache.getIcon("mailSend"), |
961 self.tr("Send Page Link"), |
961 self.tr("Send Page Link"), |
962 0, |
962 0, |
963 0, |
963 0, |
964 self, |
964 self, |
965 "webbrowser_send_page_link", |
965 "webbrowser_send_page_link", |
976 self.sendPageLinkAct.triggered.connect(self.__sendPageLink) |
976 self.sendPageLinkAct.triggered.connect(self.__sendPageLink) |
977 self.__actions.append(self.sendPageLinkAct) |
977 self.__actions.append(self.sendPageLinkAct) |
978 |
978 |
979 self.closeAct = EricAction( |
979 self.closeAct = EricAction( |
980 self.tr("Close"), |
980 self.tr("Close"), |
981 UI.PixmapCache.getIcon("close"), |
981 EricPixmapCache.getIcon("close"), |
982 self.tr("&Close"), |
982 self.tr("&Close"), |
983 QKeySequence(self.tr("Ctrl+W", "File|Close")), |
983 QKeySequence(self.tr("Ctrl+W", "File|Close")), |
984 0, |
984 0, |
985 self, |
985 self, |
986 "webbrowser_file_close", |
986 "webbrowser_file_close", |
1012 self.closeAllAct.triggered.connect(self.__tabWidget.closeAllBrowsers) |
1012 self.closeAllAct.triggered.connect(self.__tabWidget.closeAllBrowsers) |
1013 self.__actions.append(self.closeAllAct) |
1013 self.__actions.append(self.closeAllAct) |
1014 |
1014 |
1015 self.exitAct = EricAction( |
1015 self.exitAct = EricAction( |
1016 self.tr("Quit"), |
1016 self.tr("Quit"), |
1017 UI.PixmapCache.getIcon("exit"), |
1017 EricPixmapCache.getIcon("exit"), |
1018 self.tr("&Quit"), |
1018 self.tr("&Quit"), |
1019 QKeySequence(self.tr("Ctrl+Q", "File|Quit")), |
1019 QKeySequence(self.tr("Ctrl+Q", "File|Quit")), |
1020 0, |
1020 0, |
1021 self, |
1021 self, |
1022 "webbrowser_file_quit", |
1022 "webbrowser_file_quit", |
1028 self.exitAct.triggered.connect(self.shutdown) |
1028 self.exitAct.triggered.connect(self.shutdown) |
1029 self.__actions.append(self.exitAct) |
1029 self.__actions.append(self.exitAct) |
1030 |
1030 |
1031 self.backAct = EricAction( |
1031 self.backAct = EricAction( |
1032 self.tr("Backward"), |
1032 self.tr("Backward"), |
1033 UI.PixmapCache.getIcon("back"), |
1033 EricPixmapCache.getIcon("back"), |
1034 self.tr("&Backward"), |
1034 self.tr("&Backward"), |
1035 QKeySequence(self.tr("Alt+Left", "Go|Backward")), |
1035 QKeySequence(self.tr("Alt+Left", "Go|Backward")), |
1036 0, |
1036 0, |
1037 self, |
1037 self, |
1038 "webbrowser_go_backward", |
1038 "webbrowser_go_backward", |
1048 self.backAct.triggered.connect(self.__backward) |
1048 self.backAct.triggered.connect(self.__backward) |
1049 self.__actions.append(self.backAct) |
1049 self.__actions.append(self.backAct) |
1050 |
1050 |
1051 self.forwardAct = EricAction( |
1051 self.forwardAct = EricAction( |
1052 self.tr("Forward"), |
1052 self.tr("Forward"), |
1053 UI.PixmapCache.getIcon("forward"), |
1053 EricPixmapCache.getIcon("forward"), |
1054 self.tr("&Forward"), |
1054 self.tr("&Forward"), |
1055 QKeySequence(self.tr("Alt+Right", "Go|Forward")), |
1055 QKeySequence(self.tr("Alt+Right", "Go|Forward")), |
1056 0, |
1056 0, |
1057 self, |
1057 self, |
1058 "webbrowser_go_foreward", |
1058 "webbrowser_go_foreward", |
1068 self.forwardAct.triggered.connect(self.__forward) |
1068 self.forwardAct.triggered.connect(self.__forward) |
1069 self.__actions.append(self.forwardAct) |
1069 self.__actions.append(self.forwardAct) |
1070 |
1070 |
1071 self.homeAct = EricAction( |
1071 self.homeAct = EricAction( |
1072 self.tr("Home"), |
1072 self.tr("Home"), |
1073 UI.PixmapCache.getIcon("home"), |
1073 EricPixmapCache.getIcon("home"), |
1074 self.tr("&Home"), |
1074 self.tr("&Home"), |
1075 QKeySequence(self.tr("Ctrl+Home", "Go|Home")), |
1075 QKeySequence(self.tr("Ctrl+Home", "Go|Home")), |
1076 0, |
1076 0, |
1077 self, |
1077 self, |
1078 "webbrowser_go_home", |
1078 "webbrowser_go_home", |
1084 self.homeAct.triggered.connect(self.__home) |
1084 self.homeAct.triggered.connect(self.__home) |
1085 self.__actions.append(self.homeAct) |
1085 self.__actions.append(self.homeAct) |
1086 |
1086 |
1087 self.reloadAct = EricAction( |
1087 self.reloadAct = EricAction( |
1088 self.tr("Reload"), |
1088 self.tr("Reload"), |
1089 UI.PixmapCache.getIcon("reload"), |
1089 EricPixmapCache.getIcon("reload"), |
1090 self.tr("&Reload"), |
1090 self.tr("&Reload"), |
1091 QKeySequence(self.tr("Ctrl+R", "Go|Reload")), |
1091 QKeySequence(self.tr("Ctrl+R", "Go|Reload")), |
1092 QKeySequence(self.tr("F5", "Go|Reload")), |
1092 QKeySequence(self.tr("F5", "Go|Reload")), |
1093 self, |
1093 self, |
1094 "webbrowser_go_reload", |
1094 "webbrowser_go_reload", |
1100 self.reloadAct.triggered.connect(self.__reload) |
1100 self.reloadAct.triggered.connect(self.__reload) |
1101 self.__actions.append(self.reloadAct) |
1101 self.__actions.append(self.reloadAct) |
1102 |
1102 |
1103 self.stopAct = EricAction( |
1103 self.stopAct = EricAction( |
1104 self.tr("Stop"), |
1104 self.tr("Stop"), |
1105 UI.PixmapCache.getIcon("stopLoading"), |
1105 EricPixmapCache.getIcon("stopLoading"), |
1106 self.tr("&Stop"), |
1106 self.tr("&Stop"), |
1107 QKeySequence(self.tr("Ctrl+.", "Go|Stop")), |
1107 QKeySequence(self.tr("Ctrl+.", "Go|Stop")), |
1108 QKeySequence(self.tr("Esc", "Go|Stop")), |
1108 QKeySequence(self.tr("Esc", "Go|Stop")), |
1109 self, |
1109 self, |
1110 "webbrowser_go_stop", |
1110 "webbrowser_go_stop", |
1116 self.stopAct.triggered.connect(self.__stopLoading) |
1116 self.stopAct.triggered.connect(self.__stopLoading) |
1117 self.__actions.append(self.stopAct) |
1117 self.__actions.append(self.stopAct) |
1118 |
1118 |
1119 self.copyAct = EricAction( |
1119 self.copyAct = EricAction( |
1120 self.tr("Copy"), |
1120 self.tr("Copy"), |
1121 UI.PixmapCache.getIcon("editCopy"), |
1121 EricPixmapCache.getIcon("editCopy"), |
1122 self.tr("&Copy"), |
1122 self.tr("&Copy"), |
1123 QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), |
1123 QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), |
1124 0, |
1124 0, |
1125 self, |
1125 self, |
1126 "webbrowser_edit_copy", |
1126 "webbrowser_edit_copy", |
1134 self.copyAct.triggered.connect(self.__copy) |
1134 self.copyAct.triggered.connect(self.__copy) |
1135 self.__actions.append(self.copyAct) |
1135 self.__actions.append(self.copyAct) |
1136 |
1136 |
1137 self.cutAct = EricAction( |
1137 self.cutAct = EricAction( |
1138 self.tr("Cut"), |
1138 self.tr("Cut"), |
1139 UI.PixmapCache.getIcon("editCut"), |
1139 EricPixmapCache.getIcon("editCut"), |
1140 self.tr("Cu&t"), |
1140 self.tr("Cu&t"), |
1141 QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), |
1141 QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), |
1142 0, |
1142 0, |
1143 self, |
1143 self, |
1144 "webbrowser_edit_cut", |
1144 "webbrowser_edit_cut", |
1152 self.cutAct.triggered.connect(self.__cut) |
1152 self.cutAct.triggered.connect(self.__cut) |
1153 self.__actions.append(self.cutAct) |
1153 self.__actions.append(self.cutAct) |
1154 |
1154 |
1155 self.pasteAct = EricAction( |
1155 self.pasteAct = EricAction( |
1156 self.tr("Paste"), |
1156 self.tr("Paste"), |
1157 UI.PixmapCache.getIcon("editPaste"), |
1157 EricPixmapCache.getIcon("editPaste"), |
1158 self.tr("&Paste"), |
1158 self.tr("&Paste"), |
1159 QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), |
1159 QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), |
1160 0, |
1160 0, |
1161 self, |
1161 self, |
1162 "webbrowser_edit_paste", |
1162 "webbrowser_edit_paste", |
1168 self.pasteAct.triggered.connect(self.__paste) |
1168 self.pasteAct.triggered.connect(self.__paste) |
1169 self.__actions.append(self.pasteAct) |
1169 self.__actions.append(self.pasteAct) |
1170 |
1170 |
1171 self.undoAct = EricAction( |
1171 self.undoAct = EricAction( |
1172 self.tr("Undo"), |
1172 self.tr("Undo"), |
1173 UI.PixmapCache.getIcon("editUndo"), |
1173 EricPixmapCache.getIcon("editUndo"), |
1174 self.tr("&Undo"), |
1174 self.tr("&Undo"), |
1175 QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), |
1175 QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), |
1176 0, |
1176 0, |
1177 self, |
1177 self, |
1178 "webbrowser_edit_undo", |
1178 "webbrowser_edit_undo", |
1184 self.undoAct.triggered.connect(self.__undo) |
1184 self.undoAct.triggered.connect(self.__undo) |
1185 self.__actions.append(self.undoAct) |
1185 self.__actions.append(self.undoAct) |
1186 |
1186 |
1187 self.redoAct = EricAction( |
1187 self.redoAct = EricAction( |
1188 self.tr("Redo"), |
1188 self.tr("Redo"), |
1189 UI.PixmapCache.getIcon("editRedo"), |
1189 EricPixmapCache.getIcon("editRedo"), |
1190 self.tr("&Redo"), |
1190 self.tr("&Redo"), |
1191 QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), |
1191 QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), |
1192 0, |
1192 0, |
1193 self, |
1193 self, |
1194 "webbrowser_edit_redo", |
1194 "webbrowser_edit_redo", |
1200 self.redoAct.triggered.connect(self.__redo) |
1200 self.redoAct.triggered.connect(self.__redo) |
1201 self.__actions.append(self.redoAct) |
1201 self.__actions.append(self.redoAct) |
1202 |
1202 |
1203 self.selectAllAct = EricAction( |
1203 self.selectAllAct = EricAction( |
1204 self.tr("Select All"), |
1204 self.tr("Select All"), |
1205 UI.PixmapCache.getIcon("editSelectAll"), |
1205 EricPixmapCache.getIcon("editSelectAll"), |
1206 self.tr("&Select All"), |
1206 self.tr("&Select All"), |
1207 QKeySequence(self.tr("Ctrl+A", "Edit|Select All")), |
1207 QKeySequence(self.tr("Ctrl+A", "Edit|Select All")), |
1208 0, |
1208 0, |
1209 self, |
1209 self, |
1210 "webbrowser_edit_select_all", |
1210 "webbrowser_edit_select_all", |
1237 self.unselectAct.triggered.connect(self.__unselect) |
1237 self.unselectAct.triggered.connect(self.__unselect) |
1238 self.__actions.append(self.unselectAct) |
1238 self.__actions.append(self.unselectAct) |
1239 |
1239 |
1240 self.findAct = EricAction( |
1240 self.findAct = EricAction( |
1241 self.tr("Find..."), |
1241 self.tr("Find..."), |
1242 UI.PixmapCache.getIcon("find"), |
1242 EricPixmapCache.getIcon("find"), |
1243 self.tr("&Find..."), |
1243 self.tr("&Find..."), |
1244 QKeySequence(self.tr("Ctrl+F", "Edit|Find")), |
1244 QKeySequence(self.tr("Ctrl+F", "Edit|Find")), |
1245 0, |
1245 0, |
1246 self, |
1246 self, |
1247 "webbrowser_edit_find", |
1247 "webbrowser_edit_find", |
1253 self.findAct.triggered.connect(self.__find) |
1253 self.findAct.triggered.connect(self.__find) |
1254 self.__actions.append(self.findAct) |
1254 self.__actions.append(self.findAct) |
1255 |
1255 |
1256 self.findNextAct = EricAction( |
1256 self.findNextAct = EricAction( |
1257 self.tr("Find next"), |
1257 self.tr("Find next"), |
1258 UI.PixmapCache.getIcon("findNext"), |
1258 EricPixmapCache.getIcon("findNext"), |
1259 self.tr("Find &next"), |
1259 self.tr("Find &next"), |
1260 QKeySequence(self.tr("F3", "Edit|Find next")), |
1260 QKeySequence(self.tr("F3", "Edit|Find next")), |
1261 0, |
1261 0, |
1262 self, |
1262 self, |
1263 "webbrowser_edit_find_next", |
1263 "webbrowser_edit_find_next", |
1272 self.findNextAct.triggered.connect(self.__searchWidget.findNext) |
1272 self.findNextAct.triggered.connect(self.__searchWidget.findNext) |
1273 self.__actions.append(self.findNextAct) |
1273 self.__actions.append(self.findNextAct) |
1274 |
1274 |
1275 self.findPrevAct = EricAction( |
1275 self.findPrevAct = EricAction( |
1276 self.tr("Find previous"), |
1276 self.tr("Find previous"), |
1277 UI.PixmapCache.getIcon("findPrev"), |
1277 EricPixmapCache.getIcon("findPrev"), |
1278 self.tr("Find &previous"), |
1278 self.tr("Find &previous"), |
1279 QKeySequence(self.tr("Shift+F3", "Edit|Find previous")), |
1279 QKeySequence(self.tr("Shift+F3", "Edit|Find previous")), |
1280 0, |
1280 0, |
1281 self, |
1281 self, |
1282 "webbrowser_edit_find_previous", |
1282 "webbrowser_edit_find_previous", |
1314 self.bookmarksManageAct.triggered.connect(self.__showBookmarksDialog) |
1314 self.bookmarksManageAct.triggered.connect(self.__showBookmarksDialog) |
1315 self.__actions.append(self.bookmarksManageAct) |
1315 self.__actions.append(self.bookmarksManageAct) |
1316 |
1316 |
1317 self.bookmarksAddAct = EricAction( |
1317 self.bookmarksAddAct = EricAction( |
1318 self.tr("Add Bookmark"), |
1318 self.tr("Add Bookmark"), |
1319 UI.PixmapCache.getIcon("addBookmark"), |
1319 EricPixmapCache.getIcon("addBookmark"), |
1320 self.tr("Add &Bookmark..."), |
1320 self.tr("Add &Bookmark..."), |
1321 QKeySequence(self.tr("Ctrl+D", "Help|Add bookmark")), |
1321 QKeySequence(self.tr("Ctrl+D", "Help|Add bookmark")), |
1322 0, |
1322 0, |
1323 self, |
1323 self, |
1324 "webbrowser_bookmark_add", |
1324 "webbrowser_bookmark_add", |
1373 self.bookmarksAllTabsAct.triggered.connect(self.bookmarkAll) |
1373 self.bookmarksAllTabsAct.triggered.connect(self.bookmarkAll) |
1374 self.__actions.append(self.bookmarksAllTabsAct) |
1374 self.__actions.append(self.bookmarksAllTabsAct) |
1375 |
1375 |
1376 self.whatsThisAct = EricAction( |
1376 self.whatsThisAct = EricAction( |
1377 self.tr("What's This?"), |
1377 self.tr("What's This?"), |
1378 UI.PixmapCache.getIcon("whatsThis"), |
1378 EricPixmapCache.getIcon("whatsThis"), |
1379 self.tr("&What's This?"), |
1379 self.tr("&What's This?"), |
1380 QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), |
1380 QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), |
1381 0, |
1381 0, |
1382 self, |
1382 self, |
1383 "webbrowser_help_whats_this", |
1383 "webbrowser_help_whats_this", |
1429 self.aboutQtAct.triggered.connect(self.__aboutQt) |
1429 self.aboutQtAct.triggered.connect(self.__aboutQt) |
1430 self.__actions.append(self.aboutQtAct) |
1430 self.__actions.append(self.aboutQtAct) |
1431 |
1431 |
1432 self.zoomInAct = EricAction( |
1432 self.zoomInAct = EricAction( |
1433 self.tr("Zoom in"), |
1433 self.tr("Zoom in"), |
1434 UI.PixmapCache.getIcon("zoomIn"), |
1434 EricPixmapCache.getIcon("zoomIn"), |
1435 self.tr("Zoom &in"), |
1435 self.tr("Zoom &in"), |
1436 QKeySequence(self.tr("Ctrl++", "View|Zoom in")), |
1436 QKeySequence(self.tr("Ctrl++", "View|Zoom in")), |
1437 QKeySequence(self.tr("Zoom In", "View|Zoom in")), |
1437 QKeySequence(self.tr("Zoom In", "View|Zoom in")), |
1438 self, |
1438 self, |
1439 "webbrowser_view_zoom_in", |
1439 "webbrowser_view_zoom_in", |
1449 self.zoomInAct.triggered.connect(self.__zoomIn) |
1449 self.zoomInAct.triggered.connect(self.__zoomIn) |
1450 self.__actions.append(self.zoomInAct) |
1450 self.__actions.append(self.zoomInAct) |
1451 |
1451 |
1452 self.zoomOutAct = EricAction( |
1452 self.zoomOutAct = EricAction( |
1453 self.tr("Zoom out"), |
1453 self.tr("Zoom out"), |
1454 UI.PixmapCache.getIcon("zoomOut"), |
1454 EricPixmapCache.getIcon("zoomOut"), |
1455 self.tr("Zoom &out"), |
1455 self.tr("Zoom &out"), |
1456 QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), |
1456 QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), |
1457 QKeySequence(self.tr("Zoom Out", "View|Zoom out")), |
1457 QKeySequence(self.tr("Zoom Out", "View|Zoom out")), |
1458 self, |
1458 self, |
1459 "webbrowser_view_zoom_out", |
1459 "webbrowser_view_zoom_out", |
1469 self.zoomOutAct.triggered.connect(self.__zoomOut) |
1469 self.zoomOutAct.triggered.connect(self.__zoomOut) |
1470 self.__actions.append(self.zoomOutAct) |
1470 self.__actions.append(self.zoomOutAct) |
1471 |
1471 |
1472 self.zoomResetAct = EricAction( |
1472 self.zoomResetAct = EricAction( |
1473 self.tr("Zoom reset"), |
1473 self.tr("Zoom reset"), |
1474 UI.PixmapCache.getIcon("zoomReset"), |
1474 EricPixmapCache.getIcon("zoomReset"), |
1475 self.tr("Zoom &reset"), |
1475 self.tr("Zoom &reset"), |
1476 QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), |
1476 QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), |
1477 0, |
1477 0, |
1478 self, |
1478 self, |
1479 "webbrowser_view_zoom_reset", |
1479 "webbrowser_view_zoom_reset", |
1508 self.__actions.append(self.pageSourceAct) |
1508 self.__actions.append(self.pageSourceAct) |
1509 self.addAction(self.pageSourceAct) |
1509 self.addAction(self.pageSourceAct) |
1510 |
1510 |
1511 self.fullScreenAct = EricAction( |
1511 self.fullScreenAct = EricAction( |
1512 self.tr("Full Screen"), |
1512 self.tr("Full Screen"), |
1513 UI.PixmapCache.getIcon("windowFullscreen"), |
1513 EricPixmapCache.getIcon("windowFullscreen"), |
1514 self.tr("&Full Screen"), |
1514 self.tr("&Full Screen"), |
1515 0, |
1515 0, |
1516 0, |
1516 0, |
1517 self, |
1517 self, |
1518 "webbrowser_view_full_screen", |
1518 "webbrowser_view_full_screen", |
1561 self.__actions.append(self.switchTabAct) |
1561 self.__actions.append(self.switchTabAct) |
1562 self.addAction(self.switchTabAct) |
1562 self.addAction(self.switchTabAct) |
1563 |
1563 |
1564 self.prefAct = EricAction( |
1564 self.prefAct = EricAction( |
1565 self.tr("Preferences"), |
1565 self.tr("Preferences"), |
1566 UI.PixmapCache.getIcon("configure"), |
1566 EricPixmapCache.getIcon("configure"), |
1567 self.tr("&Preferences..."), |
1567 self.tr("&Preferences..."), |
1568 0, |
1568 0, |
1569 0, |
1569 0, |
1570 self, |
1570 self, |
1571 "webbrowser_preferences", |
1571 "webbrowser_preferences", |
1581 self.prefAct.triggered.connect(self.__showPreferences) |
1581 self.prefAct.triggered.connect(self.__showPreferences) |
1582 self.__actions.append(self.prefAct) |
1582 self.__actions.append(self.prefAct) |
1583 |
1583 |
1584 self.acceptedLanguagesAct = EricAction( |
1584 self.acceptedLanguagesAct = EricAction( |
1585 self.tr("Languages"), |
1585 self.tr("Languages"), |
1586 UI.PixmapCache.getIcon("flag"), |
1586 EricPixmapCache.getIcon("flag"), |
1587 self.tr("&Languages..."), |
1587 self.tr("&Languages..."), |
1588 0, |
1588 0, |
1589 0, |
1589 0, |
1590 self, |
1590 self, |
1591 "webbrowser_accepted_languages", |
1591 "webbrowser_accepted_languages", |
1602 self.acceptedLanguagesAct.triggered.connect(self.__showAcceptedLanguages) |
1602 self.acceptedLanguagesAct.triggered.connect(self.__showAcceptedLanguages) |
1603 self.__actions.append(self.acceptedLanguagesAct) |
1603 self.__actions.append(self.acceptedLanguagesAct) |
1604 |
1604 |
1605 self.cookiesAct = EricAction( |
1605 self.cookiesAct = EricAction( |
1606 self.tr("Cookies"), |
1606 self.tr("Cookies"), |
1607 UI.PixmapCache.getIcon("cookie"), |
1607 EricPixmapCache.getIcon("cookie"), |
1608 self.tr("C&ookies..."), |
1608 self.tr("C&ookies..."), |
1609 0, |
1609 0, |
1610 0, |
1610 0, |
1611 self, |
1611 self, |
1612 "webbrowser_cookies", |
1612 "webbrowser_cookies", |
1618 self.cookiesAct.triggered.connect(self.__showCookiesConfiguration) |
1618 self.cookiesAct.triggered.connect(self.__showCookiesConfiguration) |
1619 self.__actions.append(self.cookiesAct) |
1619 self.__actions.append(self.cookiesAct) |
1620 |
1620 |
1621 self.personalDataAct = EricAction( |
1621 self.personalDataAct = EricAction( |
1622 self.tr("Personal Information"), |
1622 self.tr("Personal Information"), |
1623 UI.PixmapCache.getIcon("pim"), |
1623 EricPixmapCache.getIcon("pim"), |
1624 self.tr("Personal Information..."), |
1624 self.tr("Personal Information..."), |
1625 0, |
1625 0, |
1626 0, |
1626 0, |
1627 self, |
1627 self, |
1628 "webbrowser_personal_information", |
1628 "webbrowser_personal_information", |
1640 self.personalDataAct.triggered.connect(self.__showPersonalInformationDialog) |
1640 self.personalDataAct.triggered.connect(self.__showPersonalInformationDialog) |
1641 self.__actions.append(self.personalDataAct) |
1641 self.__actions.append(self.personalDataAct) |
1642 |
1642 |
1643 self.greaseMonkeyAct = EricAction( |
1643 self.greaseMonkeyAct = EricAction( |
1644 self.tr("GreaseMonkey Scripts"), |
1644 self.tr("GreaseMonkey Scripts"), |
1645 UI.PixmapCache.getIcon("greaseMonkey"), |
1645 EricPixmapCache.getIcon("greaseMonkey"), |
1646 self.tr("GreaseMonkey Scripts..."), |
1646 self.tr("GreaseMonkey Scripts..."), |
1647 0, |
1647 0, |
1648 0, |
1648 0, |
1649 self, |
1649 self, |
1650 "webbrowser_greasemonkey", |
1650 "webbrowser_greasemonkey", |
1660 self.greaseMonkeyAct.triggered.connect(self.__showGreaseMonkeyConfigDialog) |
1660 self.greaseMonkeyAct.triggered.connect(self.__showGreaseMonkeyConfigDialog) |
1661 self.__actions.append(self.greaseMonkeyAct) |
1661 self.__actions.append(self.greaseMonkeyAct) |
1662 |
1662 |
1663 self.editMessageFilterAct = EricAction( |
1663 self.editMessageFilterAct = EricAction( |
1664 self.tr("Edit Message Filters"), |
1664 self.tr("Edit Message Filters"), |
1665 UI.PixmapCache.getIcon("warning"), |
1665 EricPixmapCache.getIcon("warning"), |
1666 self.tr("Edit Message Filters..."), |
1666 self.tr("Edit Message Filters..."), |
1667 0, |
1667 0, |
1668 0, |
1668 0, |
1669 self, |
1669 self, |
1670 "webbrowser_manage_message_filters", |
1670 "webbrowser_manage_message_filters", |
1683 self.editMessageFilterAct.triggered.connect(EricErrorMessage.editMessageFilters) |
1683 self.editMessageFilterAct.triggered.connect(EricErrorMessage.editMessageFilters) |
1684 self.__actions.append(self.editMessageFilterAct) |
1684 self.__actions.append(self.editMessageFilterAct) |
1685 |
1685 |
1686 self.featurePermissionAct = EricAction( |
1686 self.featurePermissionAct = EricAction( |
1687 self.tr("Edit HTML5 Feature Permissions"), |
1687 self.tr("Edit HTML5 Feature Permissions"), |
1688 UI.PixmapCache.getIcon("featurePermission"), |
1688 EricPixmapCache.getIcon("featurePermission"), |
1689 self.tr("Edit HTML5 Feature Permissions..."), |
1689 self.tr("Edit HTML5 Feature Permissions..."), |
1690 0, |
1690 0, |
1691 0, |
1691 0, |
1692 self, |
1692 self, |
1693 "webbrowser_edit_feature_permissions", |
1693 "webbrowser_edit_feature_permissions", |
1706 self.__actions.append(self.featurePermissionAct) |
1706 self.__actions.append(self.featurePermissionAct) |
1707 |
1707 |
1708 if WebBrowserWindow._useQtHelp: |
1708 if WebBrowserWindow._useQtHelp: |
1709 self.syncTocAct = EricAction( |
1709 self.syncTocAct = EricAction( |
1710 self.tr("Sync with Table of Contents"), |
1710 self.tr("Sync with Table of Contents"), |
1711 UI.PixmapCache.getIcon("syncToc"), |
1711 EricPixmapCache.getIcon("syncToc"), |
1712 self.tr("Sync with Table of Contents"), |
1712 self.tr("Sync with Table of Contents"), |
1713 0, |
1713 0, |
1714 0, |
1714 0, |
1715 self, |
1715 self, |
1716 "webbrowser_sync_toc", |
1716 "webbrowser_sync_toc", |
1814 ) |
1814 ) |
1815 self.__actions.append(self.reindexDocumentationAct) |
1815 self.__actions.append(self.reindexDocumentationAct) |
1816 |
1816 |
1817 self.clearPrivateDataAct = EricAction( |
1817 self.clearPrivateDataAct = EricAction( |
1818 self.tr("Clear private data"), |
1818 self.tr("Clear private data"), |
1819 UI.PixmapCache.getIcon("clearPrivateData"), |
1819 EricPixmapCache.getIcon("clearPrivateData"), |
1820 self.tr("Clear private data"), |
1820 self.tr("Clear private data"), |
1821 0, |
1821 0, |
1822 0, |
1822 0, |
1823 self, |
1823 self, |
1824 "webbrowser_clear_private_data", |
1824 "webbrowser_clear_private_data", |
1853 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase) |
1853 self.clearIconsAct.triggered.connect(self.__clearIconsDatabase) |
1854 self.__actions.append(self.clearIconsAct) |
1854 self.__actions.append(self.clearIconsAct) |
1855 |
1855 |
1856 self.manageIconsAct = EricAction( |
1856 self.manageIconsAct = EricAction( |
1857 self.tr("Manage saved Favicons"), |
1857 self.tr("Manage saved Favicons"), |
1858 UI.PixmapCache.getIcon("icons"), |
1858 EricPixmapCache.getIcon("icons"), |
1859 self.tr("Manage saved Favicons"), |
1859 self.tr("Manage saved Favicons"), |
1860 0, |
1860 0, |
1861 0, |
1861 0, |
1862 self, |
1862 self, |
1863 "webbrowser_manage_icons_db", |
1863 "webbrowser_manage_icons_db", |
1896 self.searchEnginesAct.triggered.connect(self.__showEnginesConfigurationDialog) |
1896 self.searchEnginesAct.triggered.connect(self.__showEnginesConfigurationDialog) |
1897 self.__actions.append(self.searchEnginesAct) |
1897 self.__actions.append(self.searchEnginesAct) |
1898 |
1898 |
1899 self.passwordsAct = EricAction( |
1899 self.passwordsAct = EricAction( |
1900 self.tr("Manage Saved Passwords"), |
1900 self.tr("Manage Saved Passwords"), |
1901 UI.PixmapCache.getIcon("passwords"), |
1901 EricPixmapCache.getIcon("passwords"), |
1902 self.tr("Manage Saved Passwords..."), |
1902 self.tr("Manage Saved Passwords..."), |
1903 0, |
1903 0, |
1904 0, |
1904 0, |
1905 self, |
1905 self, |
1906 "webbrowser_manage_passwords", |
1906 "webbrowser_manage_passwords", |
1915 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1915 self.passwordsAct.triggered.connect(self.__showPasswordsDialog) |
1916 self.__actions.append(self.passwordsAct) |
1916 self.__actions.append(self.passwordsAct) |
1917 |
1917 |
1918 self.adblockAct = EricAction( |
1918 self.adblockAct = EricAction( |
1919 self.tr("Ad Block"), |
1919 self.tr("Ad Block"), |
1920 UI.PixmapCache.getIcon("adBlockPlus"), |
1920 EricPixmapCache.getIcon("adBlockPlus"), |
1921 self.tr("&Ad Block..."), |
1921 self.tr("&Ad Block..."), |
1922 0, |
1922 0, |
1923 0, |
1923 0, |
1924 self, |
1924 self, |
1925 "webbrowser_adblock", |
1925 "webbrowser_adblock", |
1937 self.adblockAct.triggered.connect(self.__showAdBlockDialog) |
1937 self.adblockAct.triggered.connect(self.__showAdBlockDialog) |
1938 self.__actions.append(self.adblockAct) |
1938 self.__actions.append(self.adblockAct) |
1939 |
1939 |
1940 self.certificateErrorsAct = EricAction( |
1940 self.certificateErrorsAct = EricAction( |
1941 self.tr("Manage SSL Certificate Errors"), |
1941 self.tr("Manage SSL Certificate Errors"), |
1942 UI.PixmapCache.getIcon("certificates"), |
1942 EricPixmapCache.getIcon("certificates"), |
1943 self.tr("Manage SSL Certificate Errors..."), |
1943 self.tr("Manage SSL Certificate Errors..."), |
1944 0, |
1944 0, |
1945 0, |
1945 0, |
1946 self, |
1946 self, |
1947 "webbrowser_manage_certificate_errors", |
1947 "webbrowser_manage_certificate_errors", |
1959 self.certificateErrorsAct.triggered.connect(self.__showCertificateErrorsDialog) |
1959 self.certificateErrorsAct.triggered.connect(self.__showCertificateErrorsDialog) |
1960 self.__actions.append(self.certificateErrorsAct) |
1960 self.__actions.append(self.certificateErrorsAct) |
1961 |
1961 |
1962 self.safeBrowsingAct = EricAction( |
1962 self.safeBrowsingAct = EricAction( |
1963 self.tr("Manage Safe Browsing"), |
1963 self.tr("Manage Safe Browsing"), |
1964 UI.PixmapCache.getIcon("safeBrowsing"), |
1964 EricPixmapCache.getIcon("safeBrowsing"), |
1965 self.tr("Manage Safe Browsing..."), |
1965 self.tr("Manage Safe Browsing..."), |
1966 0, |
1966 0, |
1967 0, |
1967 0, |
1968 self, |
1968 self, |
1969 "webbrowser_manage_safe_browsing", |
1969 "webbrowser_manage_safe_browsing", |
1996 self.showDownloadManagerAct.triggered.connect(self.__showDownloadsWindow) |
1996 self.showDownloadManagerAct.triggered.connect(self.__showDownloadsWindow) |
1997 self.__actions.append(self.showDownloadManagerAct) |
1997 self.__actions.append(self.showDownloadManagerAct) |
1998 |
1998 |
1999 self.feedsManagerAct = EricAction( |
1999 self.feedsManagerAct = EricAction( |
2000 self.tr("RSS Feeds Dialog"), |
2000 self.tr("RSS Feeds Dialog"), |
2001 UI.PixmapCache.getIcon("rss22"), |
2001 EricPixmapCache.getIcon("rss22"), |
2002 self.tr("&RSS Feeds Dialog..."), |
2002 self.tr("&RSS Feeds Dialog..."), |
2003 QKeySequence(self.tr("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), |
2003 QKeySequence(self.tr("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), |
2004 0, |
2004 0, |
2005 self, |
2005 self, |
2006 "webbrowser_rss_feeds", |
2006 "webbrowser_rss_feeds", |
2019 self.feedsManagerAct.triggered.connect(self.__showFeedsManager) |
2019 self.feedsManagerAct.triggered.connect(self.__showFeedsManager) |
2020 self.__actions.append(self.feedsManagerAct) |
2020 self.__actions.append(self.feedsManagerAct) |
2021 |
2021 |
2022 self.siteInfoAct = EricAction( |
2022 self.siteInfoAct = EricAction( |
2023 self.tr("Siteinfo Dialog"), |
2023 self.tr("Siteinfo Dialog"), |
2024 UI.PixmapCache.getIcon("helpAbout"), |
2024 EricPixmapCache.getIcon("helpAbout"), |
2025 self.tr("&Siteinfo Dialog..."), |
2025 self.tr("&Siteinfo Dialog..."), |
2026 QKeySequence(self.tr("Ctrl+Shift+I", "Help|Siteinfo Dialog")), |
2026 QKeySequence(self.tr("Ctrl+Shift+I", "Help|Siteinfo Dialog")), |
2027 0, |
2027 0, |
2028 self, |
2028 self, |
2029 "webbrowser_siteinfo", |
2029 "webbrowser_siteinfo", |
2061 self.userAgentManagerAct.triggered.connect(self.__showUserAgentsDialog) |
2061 self.userAgentManagerAct.triggered.connect(self.__showUserAgentsDialog) |
2062 self.__actions.append(self.userAgentManagerAct) |
2062 self.__actions.append(self.userAgentManagerAct) |
2063 |
2063 |
2064 self.synchronizationAct = EricAction( |
2064 self.synchronizationAct = EricAction( |
2065 self.tr("Synchronize data"), |
2065 self.tr("Synchronize data"), |
2066 UI.PixmapCache.getIcon("sync"), |
2066 EricPixmapCache.getIcon("sync"), |
2067 self.tr("&Synchronize Data..."), |
2067 self.tr("&Synchronize Data..."), |
2068 0, |
2068 0, |
2069 0, |
2069 0, |
2070 self, |
2070 self, |
2071 "webbrowser_synchronize_data", |
2071 "webbrowser_synchronize_data", |
2083 self.synchronizationAct.triggered.connect(self.__showSyncDialog) |
2083 self.synchronizationAct.triggered.connect(self.__showSyncDialog) |
2084 self.__actions.append(self.synchronizationAct) |
2084 self.__actions.append(self.synchronizationAct) |
2085 |
2085 |
2086 self.zoomValuesAct = EricAction( |
2086 self.zoomValuesAct = EricAction( |
2087 self.tr("Manage Saved Zoom Values"), |
2087 self.tr("Manage Saved Zoom Values"), |
2088 UI.PixmapCache.getIcon("zoomReset"), |
2088 EricPixmapCache.getIcon("zoomReset"), |
2089 self.tr("Manage Saved Zoom Values..."), |
2089 self.tr("Manage Saved Zoom Values..."), |
2090 0, |
2090 0, |
2091 0, |
2091 0, |
2092 self, |
2092 self, |
2093 "webbrowser_manage_zoom_values", |
2093 "webbrowser_manage_zoom_values", |
2159 self.showSessionsManagerAct.triggered.connect(self.__showSessionManagerDialog) |
2159 self.showSessionsManagerAct.triggered.connect(self.__showSessionManagerDialog) |
2160 self.__actions.append(self.showSessionsManagerAct) |
2160 self.__actions.append(self.showSessionsManagerAct) |
2161 |
2161 |
2162 self.virustotalScanCurrentAct = EricAction( |
2162 self.virustotalScanCurrentAct = EricAction( |
2163 self.tr("Scan current site"), |
2163 self.tr("Scan current site"), |
2164 UI.PixmapCache.getIcon("virustotal"), |
2164 EricPixmapCache.getIcon("virustotal"), |
2165 self.tr("Scan current site"), |
2165 self.tr("Scan current site"), |
2166 0, |
2166 0, |
2167 0, |
2167 0, |
2168 self, |
2168 self, |
2169 "webbrowser_virustotal_scan_site", |
2169 "webbrowser_virustotal_scan_site", |
2173 ) |
2173 ) |
2174 self.__actions.append(self.virustotalScanCurrentAct) |
2174 self.__actions.append(self.virustotalScanCurrentAct) |
2175 |
2175 |
2176 self.virustotalIpReportAct = EricAction( |
2176 self.virustotalIpReportAct = EricAction( |
2177 self.tr("IP Address Report"), |
2177 self.tr("IP Address Report"), |
2178 UI.PixmapCache.getIcon("virustotal"), |
2178 EricPixmapCache.getIcon("virustotal"), |
2179 self.tr("IP Address Report"), |
2179 self.tr("IP Address Report"), |
2180 0, |
2180 0, |
2181 0, |
2181 0, |
2182 self, |
2182 self, |
2183 "webbrowser_virustotal_ip_report", |
2183 "webbrowser_virustotal_ip_report", |
2185 self.virustotalIpReportAct.triggered.connect(self.__virusTotalIpAddressReport) |
2185 self.virustotalIpReportAct.triggered.connect(self.__virusTotalIpAddressReport) |
2186 self.__actions.append(self.virustotalIpReportAct) |
2186 self.__actions.append(self.virustotalIpReportAct) |
2187 |
2187 |
2188 self.virustotalDomainReportAct = EricAction( |
2188 self.virustotalDomainReportAct = EricAction( |
2189 self.tr("Domain Report"), |
2189 self.tr("Domain Report"), |
2190 UI.PixmapCache.getIcon("virustotal"), |
2190 EricPixmapCache.getIcon("virustotal"), |
2191 self.tr("Domain Report"), |
2191 self.tr("Domain Report"), |
2192 0, |
2192 0, |
2193 0, |
2193 0, |
2194 self, |
2194 self, |
2195 "webbrowser_virustotal_domain_report", |
2195 "webbrowser_virustotal_domain_report", |
2205 self.virustotalIpReportAct.setEnabled(False) |
2205 self.virustotalIpReportAct.setEnabled(False) |
2206 self.virustotalDomainReportAct.setEnabled(False) |
2206 self.virustotalDomainReportAct.setEnabled(False) |
2207 |
2207 |
2208 self.shortcutsAct = EricAction( |
2208 self.shortcutsAct = EricAction( |
2209 self.tr("Keyboard Shortcuts"), |
2209 self.tr("Keyboard Shortcuts"), |
2210 UI.PixmapCache.getIcon("configureShortcuts"), |
2210 EricPixmapCache.getIcon("configureShortcuts"), |
2211 self.tr("Keyboard &Shortcuts..."), |
2211 self.tr("Keyboard &Shortcuts..."), |
2212 0, |
2212 0, |
2213 0, |
2213 0, |
2214 self, |
2214 self, |
2215 "webbrowser_keyboard_shortcuts", |
2215 "webbrowser_keyboard_shortcuts", |
2225 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
2225 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
2226 self.__actions.append(self.shortcutsAct) |
2226 self.__actions.append(self.shortcutsAct) |
2227 |
2227 |
2228 self.exportShortcutsAct = EricAction( |
2228 self.exportShortcutsAct = EricAction( |
2229 self.tr("Export Keyboard Shortcuts"), |
2229 self.tr("Export Keyboard Shortcuts"), |
2230 UI.PixmapCache.getIcon("exportShortcuts"), |
2230 EricPixmapCache.getIcon("exportShortcuts"), |
2231 self.tr("&Export Keyboard Shortcuts..."), |
2231 self.tr("&Export Keyboard Shortcuts..."), |
2232 0, |
2232 0, |
2233 0, |
2233 0, |
2234 self, |
2234 self, |
2235 "export_keyboard_shortcuts", |
2235 "export_keyboard_shortcuts", |
2244 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
2244 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
2245 self.__actions.append(self.exportShortcutsAct) |
2245 self.__actions.append(self.exportShortcutsAct) |
2246 |
2246 |
2247 self.importShortcutsAct = EricAction( |
2247 self.importShortcutsAct = EricAction( |
2248 self.tr("Import Keyboard Shortcuts"), |
2248 self.tr("Import Keyboard Shortcuts"), |
2249 UI.PixmapCache.getIcon("importShortcuts"), |
2249 EricPixmapCache.getIcon("importShortcuts"), |
2250 self.tr("&Import Keyboard Shortcuts..."), |
2250 self.tr("&Import Keyboard Shortcuts..."), |
2251 0, |
2251 0, |
2252 0, |
2252 0, |
2253 self, |
2253 self, |
2254 "import_keyboard_shortcuts", |
2254 "import_keyboard_shortcuts", |
2467 menu.addAction(self.siteInfoAct) |
2467 menu.addAction(self.siteInfoAct) |
2468 menu.addSeparator() |
2468 menu.addSeparator() |
2469 menu.addAction(self.synchronizationAct) |
2469 menu.addAction(self.synchronizationAct) |
2470 menu.addSeparator() |
2470 menu.addSeparator() |
2471 vtMenu = menu.addMenu( |
2471 vtMenu = menu.addMenu( |
2472 UI.PixmapCache.getIcon("virustotal"), self.tr("&VirusTotal") |
2472 EricPixmapCache.getIcon("virustotal"), self.tr("&VirusTotal") |
2473 ) |
2473 ) |
2474 vtMenu.addAction(self.virustotalScanCurrentAct) |
2474 vtMenu.addAction(self.virustotalScanCurrentAct) |
2475 vtMenu.addAction(self.virustotalIpReportAct) |
2475 vtMenu.addAction(self.virustotalIpReportAct) |
2476 vtMenu.addAction(self.virustotalDomainReportAct) |
2476 vtMenu.addAction(self.virustotalDomainReportAct) |
2477 |
2477 |
2539 self.__superMenu.addSeparator() |
2539 self.__superMenu.addSeparator() |
2540 self.__superMenu.addAction(self.selectAllAct) |
2540 self.__superMenu.addAction(self.selectAllAct) |
2541 self.__superMenu.addAction(self.findAct) |
2541 self.__superMenu.addAction(self.findAct) |
2542 self.__superMenu.addSeparator() |
2542 self.__superMenu.addSeparator() |
2543 act = self.__superMenu.addAction( |
2543 act = self.__superMenu.addAction( |
2544 UI.PixmapCache.getIcon("history"), self.tr("Show All History...") |
2544 EricPixmapCache.getIcon("history"), self.tr("Show All History...") |
2545 ) |
2545 ) |
2546 act.triggered.connect(self.historyMenu.showHistoryDialog) |
2546 act.triggered.connect(self.historyMenu.showHistoryDialog) |
2547 self.__superMenu.addAction(self.bookmarksManageAct) |
2547 self.__superMenu.addAction(self.bookmarksManageAct) |
2548 self.__superMenu.addSeparator() |
2548 self.__superMenu.addSeparator() |
2549 self.__superMenu.addAction(self.prefAct) |
2549 self.__superMenu.addAction(self.prefAct) |
2622 menu.addAction(self.siteInfoAct) |
2622 menu.addAction(self.siteInfoAct) |
2623 menu.addSeparator() |
2623 menu.addSeparator() |
2624 menu.addAction(self.synchronizationAct) |
2624 menu.addAction(self.synchronizationAct) |
2625 menu.addSeparator() |
2625 menu.addSeparator() |
2626 vtMenu = menu.addMenu( |
2626 vtMenu = menu.addMenu( |
2627 UI.PixmapCache.getIcon("virustotal"), self.tr("&VirusTotal") |
2627 EricPixmapCache.getIcon("virustotal"), self.tr("&VirusTotal") |
2628 ) |
2628 ) |
2629 vtMenu.addAction(self.virustotalScanCurrentAct) |
2629 vtMenu.addAction(self.virustotalScanCurrentAct) |
2630 vtMenu.addAction(self.virustotalIpReportAct) |
2630 vtMenu.addAction(self.virustotalIpReportAct) |
2631 vtMenu.addAction(self.virustotalDomainReportAct) |
2631 vtMenu.addAction(self.virustotalDomainReportAct) |
2632 |
2632 |
2642 """ |
2642 """ |
2643 Private method to create the toolbars. |
2643 Private method to create the toolbars. |
2644 """ |
2644 """ |
2645 filetb = self.addToolBar(self.tr("File")) |
2645 filetb = self.addToolBar(self.tr("File")) |
2646 filetb.setObjectName("FileToolBar") |
2646 filetb.setObjectName("FileToolBar") |
2647 filetb.setIconSize(UI.Config.ToolBarIconSize) |
2647 filetb.setIconSize(Config.ToolBarIconSize) |
2648 filetb.addAction(self.newTabAct) |
2648 filetb.addAction(self.newTabAct) |
2649 filetb.addAction(self.newAct) |
2649 filetb.addAction(self.newAct) |
2650 filetb.addAction(self.newPrivateAct) |
2650 filetb.addAction(self.newPrivateAct) |
2651 filetb.addAction(self.openAct) |
2651 filetb.addAction(self.openAct) |
2652 filetb.addAction(self.openTabAct) |
2652 filetb.addAction(self.openTabAct) |
2667 filetb.addAction(self.exitAct) |
2667 filetb.addAction(self.exitAct) |
2668 self.__toolbars["file"] = (filetb.windowTitle(), filetb) |
2668 self.__toolbars["file"] = (filetb.windowTitle(), filetb) |
2669 |
2669 |
2670 edittb = self.addToolBar(self.tr("Edit")) |
2670 edittb = self.addToolBar(self.tr("Edit")) |
2671 edittb.setObjectName("EditToolBar") |
2671 edittb.setObjectName("EditToolBar") |
2672 edittb.setIconSize(UI.Config.ToolBarIconSize) |
2672 edittb.setIconSize(Config.ToolBarIconSize) |
2673 edittb.addAction(self.undoAct) |
2673 edittb.addAction(self.undoAct) |
2674 edittb.addAction(self.redoAct) |
2674 edittb.addAction(self.redoAct) |
2675 edittb.addSeparator() |
2675 edittb.addSeparator() |
2676 edittb.addAction(self.copyAct) |
2676 edittb.addAction(self.copyAct) |
2677 edittb.addAction(self.cutAct) |
2677 edittb.addAction(self.cutAct) |
2680 edittb.addAction(self.selectAllAct) |
2680 edittb.addAction(self.selectAllAct) |
2681 self.__toolbars["edit"] = (edittb.windowTitle(), edittb) |
2681 self.__toolbars["edit"] = (edittb.windowTitle(), edittb) |
2682 |
2682 |
2683 viewtb = self.addToolBar(self.tr("View")) |
2683 viewtb = self.addToolBar(self.tr("View")) |
2684 viewtb.setObjectName("ViewToolBar") |
2684 viewtb.setObjectName("ViewToolBar") |
2685 viewtb.setIconSize(UI.Config.ToolBarIconSize) |
2685 viewtb.setIconSize(Config.ToolBarIconSize) |
2686 viewtb.addAction(self.zoomInAct) |
2686 viewtb.addAction(self.zoomInAct) |
2687 viewtb.addAction(self.zoomResetAct) |
2687 viewtb.addAction(self.zoomResetAct) |
2688 viewtb.addAction(self.zoomOutAct) |
2688 viewtb.addAction(self.zoomOutAct) |
2689 viewtb.addSeparator() |
2689 viewtb.addSeparator() |
2690 viewtb.addAction(self.fullScreenAct) |
2690 viewtb.addAction(self.fullScreenAct) |
2691 self.__toolbars["view"] = (viewtb.windowTitle(), viewtb) |
2691 self.__toolbars["view"] = (viewtb.windowTitle(), viewtb) |
2692 |
2692 |
2693 findtb = self.addToolBar(self.tr("Find")) |
2693 findtb = self.addToolBar(self.tr("Find")) |
2694 findtb.setObjectName("FindToolBar") |
2694 findtb.setObjectName("FindToolBar") |
2695 findtb.setIconSize(UI.Config.ToolBarIconSize) |
2695 findtb.setIconSize(Config.ToolBarIconSize) |
2696 findtb.addAction(self.findAct) |
2696 findtb.addAction(self.findAct) |
2697 findtb.addAction(self.findNextAct) |
2697 findtb.addAction(self.findNextAct) |
2698 findtb.addAction(self.findPrevAct) |
2698 findtb.addAction(self.findPrevAct) |
2699 self.__toolbars["find"] = (findtb.windowTitle(), findtb) |
2699 self.__toolbars["find"] = (findtb.windowTitle(), findtb) |
2700 |
2700 |
2715 self.__setupFilterCombo() |
2715 self.__setupFilterCombo() |
2716 self.__toolbars["filter"] = (filtertb.windowTitle(), filtertb) |
2716 self.__toolbars["filter"] = (filtertb.windowTitle(), filtertb) |
2717 |
2717 |
2718 settingstb = self.addToolBar(self.tr("Settings")) |
2718 settingstb = self.addToolBar(self.tr("Settings")) |
2719 settingstb.setObjectName("SettingsToolBar") |
2719 settingstb.setObjectName("SettingsToolBar") |
2720 settingstb.setIconSize(UI.Config.ToolBarIconSize) |
2720 settingstb.setIconSize(Config.ToolBarIconSize) |
2721 settingstb.addAction(self.prefAct) |
2721 settingstb.addAction(self.prefAct) |
2722 settingstb.addAction(self.shortcutsAct) |
2722 settingstb.addAction(self.shortcutsAct) |
2723 settingstb.addAction(self.acceptedLanguagesAct) |
2723 settingstb.addAction(self.acceptedLanguagesAct) |
2724 settingstb.addAction(self.cookiesAct) |
2724 settingstb.addAction(self.cookiesAct) |
2725 settingstb.addAction(self.personalDataAct) |
2725 settingstb.addAction(self.personalDataAct) |
2727 settingstb.addAction(self.featurePermissionAct) |
2727 settingstb.addAction(self.featurePermissionAct) |
2728 self.__toolbars["settings"] = (settingstb.windowTitle(), settingstb) |
2728 self.__toolbars["settings"] = (settingstb.windowTitle(), settingstb) |
2729 |
2729 |
2730 toolstb = self.addToolBar(self.tr("Tools")) |
2730 toolstb = self.addToolBar(self.tr("Tools")) |
2731 toolstb.setObjectName("ToolsToolBar") |
2731 toolstb.setObjectName("ToolsToolBar") |
2732 toolstb.setIconSize(UI.Config.ToolBarIconSize) |
2732 toolstb.setIconSize(Config.ToolBarIconSize) |
2733 toolstb.addAction(self.feedsManagerAct) |
2733 toolstb.addAction(self.feedsManagerAct) |
2734 toolstb.addAction(self.siteInfoAct) |
2734 toolstb.addAction(self.siteInfoAct) |
2735 toolstb.addSeparator() |
2735 toolstb.addSeparator() |
2736 toolstb.addAction(self.synchronizationAct) |
2736 toolstb.addAction(self.synchronizationAct) |
2737 self.__toolbars["tools"] = (toolstb.windowTitle(), toolstb) |
2737 self.__toolbars["tools"] = (toolstb.windowTitle(), toolstb) |
2738 |
2738 |
2739 helptb = self.addToolBar(self.tr("Help")) |
2739 helptb = self.addToolBar(self.tr("Help")) |
2740 helptb.setObjectName("HelpToolBar") |
2740 helptb.setObjectName("HelpToolBar") |
2741 helptb.setIconSize(UI.Config.ToolBarIconSize) |
2741 helptb.setIconSize(Config.ToolBarIconSize) |
2742 helptb.addAction(self.whatsThisAct) |
2742 helptb.addAction(self.whatsThisAct) |
2743 self.__toolbars["help"] = (helptb.windowTitle(), helptb) |
2743 self.__toolbars["help"] = (helptb.windowTitle(), helptb) |
2744 |
2744 |
2745 self.addToolBarBreak() |
2745 self.addToolBarBreak() |
2746 vttb = self.addToolBar(self.tr("VirusTotal")) |
2746 vttb = self.addToolBar(self.tr("VirusTotal")) |
2747 vttb.setObjectName("VirusTotalToolBar") |
2747 vttb.setObjectName("VirusTotalToolBar") |
2748 vttb.setIconSize(UI.Config.ToolBarIconSize) |
2748 vttb.setIconSize(Config.ToolBarIconSize) |
2749 vttb.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon) |
2749 vttb.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon) |
2750 vttb.addAction(self.virustotalScanCurrentAct) |
2750 vttb.addAction(self.virustotalScanCurrentAct) |
2751 vttb.addAction(self.virustotalIpReportAct) |
2751 vttb.addAction(self.virustotalIpReportAct) |
2752 vttb.addAction(self.virustotalDomainReportAct) |
2752 vttb.addAction(self.virustotalDomainReportAct) |
2753 self.__toolbars["virustotal"] = (vttb.windowTitle(), vttb) |
2753 self.__toolbars["virustotal"] = (vttb.windowTitle(), vttb) |
3313 ).format(windowCount, tabCount), |
3313 ).format(windowCount, tabCount), |
3314 modal=True, |
3314 modal=True, |
3315 parent=self, |
3315 parent=self, |
3316 ) |
3316 ) |
3317 quitButton = mb.addButton(self.tr("&Quit"), EricMessageBox.AcceptRole) |
3317 quitButton = mb.addButton(self.tr("&Quit"), EricMessageBox.AcceptRole) |
3318 quitButton.setIcon(UI.PixmapCache.getIcon("exit")) |
3318 quitButton.setIcon(EricPixmapCache.getIcon("exit")) |
3319 mb.addButton(EricMessageBox.Cancel) |
3319 mb.addButton(EricMessageBox.Cancel) |
3320 mb.exec() |
3320 mb.exec() |
3321 return mb.clickedButton() == quitButton |
3321 return mb.clickedButton() == quitButton |
3322 |
3322 |
3323 return True |
3323 return True |
4259 Private method to show the source of the current page in an editor. |
4259 Private method to show the source of the current page in an editor. |
4260 |
4260 |
4261 @param src source of the web page |
4261 @param src source of the web page |
4262 @type str |
4262 @type str |
4263 """ |
4263 """ |
4264 from QScintilla.MiniEditor import MiniEditor |
4264 from eric7.QScintilla.MiniEditor import MiniEditor |
4265 |
4265 |
4266 editor = MiniEditor(parent=self) |
4266 editor = MiniEditor(parent=self) |
4267 editor.setText(src, "Html") |
4267 editor.setText(src, "Html") |
4268 editor.setLanguage("dummy.html") |
4268 editor.setLanguage("dummy.html") |
4269 editor.show() |
4269 editor.show() |
5226 @param timeout time in seconds the notification should be shown |
5226 @param timeout time in seconds the notification should be shown |
5227 (None = use configured timeout, 0 = indefinitely) |
5227 (None = use configured timeout, 0 = indefinitely) |
5228 @type int |
5228 @type int |
5229 """ |
5229 """ |
5230 if cls._notification is None: |
5230 if cls._notification is None: |
5231 from UI.NotificationWidget import NotificationWidget |
5231 from eric7.UI.NotificationWidget import NotificationWidget |
5232 |
5232 |
5233 cls._notification = NotificationWidget() |
5233 cls._notification = NotificationWidget() |
5234 |
5234 |
5235 if timeout is None: |
5235 if timeout is None: |
5236 timeout = Preferences.getUI("NotificationTimeout") |
5236 timeout = Preferences.getUI("NotificationTimeout") |
5507 def __configShortcuts(self): |
5507 def __configShortcuts(self): |
5508 """ |
5508 """ |
5509 Private slot to configure the keyboard shortcuts. |
5509 Private slot to configure the keyboard shortcuts. |
5510 """ |
5510 """ |
5511 if self.__shortcutsDialog is None: |
5511 if self.__shortcutsDialog is None: |
5512 from Preferences.ShortcutsDialog import ShortcutsDialog |
5512 from eric7.Preferences.ShortcutsDialog import ShortcutsDialog |
5513 |
5513 |
5514 self.__shortcutsDialog = ShortcutsDialog(self) |
5514 self.__shortcutsDialog = ShortcutsDialog(self) |
5515 self.__shortcutsDialog.populate(helpViewer=self) |
5515 self.__shortcutsDialog.populate(helpViewer=self) |
5516 self.__shortcutsDialog.show() |
5516 self.__shortcutsDialog.show() |
5517 |
5517 |