108 _imageSearchEngine = None |
108 _imageSearchEngine = None |
109 _autoScroller = None |
109 _autoScroller = None |
110 _tabManager = None |
110 _tabManager = None |
111 _sessionManager = None |
111 _sessionManager = None |
112 _safeBrowsingManager = None |
112 _safeBrowsingManager = None |
|
113 _protocolHandlerManager = None |
113 |
114 |
114 _performingStartup = True |
115 _performingStartup = True |
115 _performingShutdown = False |
116 _performingShutdown = False |
116 _lastActiveWindow = None |
117 _lastActiveWindow = None |
117 |
118 |
319 |
320 |
320 # initialize some of our class objects |
321 # initialize some of our class objects |
321 self.passwordManager() |
322 self.passwordManager() |
322 self.historyManager() |
323 self.historyManager() |
323 self.greaseMonkeyManager() |
324 self.greaseMonkeyManager() |
|
325 self.protocolHandlerManager() |
324 |
326 |
325 # initialize the actions |
327 # initialize the actions |
326 self.__initActions() |
328 self.__initActions() |
327 |
329 |
328 # initialize the menus |
330 # initialize the menus |
1935 """<p>Import the keyboard shortcuts of the application.</p>""" |
1937 """<p>Import the keyboard shortcuts of the application.</p>""" |
1936 )) |
1938 )) |
1937 self.importShortcutsAct.triggered.connect(self.__importShortcuts) |
1939 self.importShortcutsAct.triggered.connect(self.__importShortcuts) |
1938 self.__actions.append(self.importShortcutsAct) |
1940 self.__actions.append(self.importShortcutsAct) |
1939 |
1941 |
|
1942 self.showProtocolHandlerManagerAct = E5Action( |
|
1943 self.tr('Protocol Handler Manager'), |
|
1944 self.tr('Protocol Handler Manager...'), |
|
1945 0, 0, self, 'webbrowser_show_protocol_handler_manager') |
|
1946 self.showProtocolHandlerManagerAct.setStatusTip(self.tr( |
|
1947 'Shows the protocol handler manager window')) |
|
1948 self.showProtocolHandlerManagerAct.setWhatsThis(self.tr( |
|
1949 """<b>Protocol Handler Manager</b>""" |
|
1950 """<p>Shows the protocol handler manager window.</p>""" |
|
1951 )) |
|
1952 self.showProtocolHandlerManagerAct.triggered.connect( |
|
1953 self.__showProtocolHandlerManagerDialog) |
|
1954 self.__actions.append(self.showProtocolHandlerManagerAct) |
|
1955 |
1940 self.backAct.setEnabled(False) |
1956 self.backAct.setEnabled(False) |
1941 self.forwardAct.setEnabled(False) |
1957 self.forwardAct.setEnabled(False) |
1942 |
1958 |
1943 # now read the keyboard shortcuts for the actions |
1959 # now read the keyboard shortcuts for the actions |
1944 Shortcuts.readShortcuts(helpViewer=self) |
1960 Shortcuts.readShortcuts(helpViewer=self) |
2130 |
2146 |
2131 menu = mb.addMenu(self.tr("&Windows")) |
2147 menu = mb.addMenu(self.tr("&Windows")) |
2132 menu.addAction(self.showDownloadManagerAct) |
2148 menu.addAction(self.showDownloadManagerAct) |
2133 menu.addAction(self.showJavaScriptConsoleAct) |
2149 menu.addAction(self.showJavaScriptConsoleAct) |
2134 menu.addAction(self.showTabManagerAct) |
2150 menu.addAction(self.showTabManagerAct) |
|
2151 menu.addAction(self.showProtocolHandlerManagerAct) |
2135 if WebBrowserWindow._useQtHelp: |
2152 if WebBrowserWindow._useQtHelp: |
2136 menu.addSeparator() |
2153 menu.addSeparator() |
2137 menu.addAction(self.showTocAct) |
2154 menu.addAction(self.showTocAct) |
2138 menu.addAction(self.showIndexAct) |
2155 menu.addAction(self.showIndexAct) |
2139 menu.addAction(self.showSearchAct) |
2156 menu.addAction(self.showSearchAct) |
2244 menu.addMenu(self.__toolbarsMenu) |
2261 menu.addMenu(self.__toolbarsMenu) |
2245 windowsMenu = menu.addMenu(self.tr("&Windows")) |
2262 windowsMenu = menu.addMenu(self.tr("&Windows")) |
2246 windowsMenu.addAction(self.showDownloadManagerAct) |
2263 windowsMenu.addAction(self.showDownloadManagerAct) |
2247 windowsMenu.addAction(self.showJavaScriptConsoleAct) |
2264 windowsMenu.addAction(self.showJavaScriptConsoleAct) |
2248 windowsMenu.addAction(self.showTabManagerAct) |
2265 windowsMenu.addAction(self.showTabManagerAct) |
|
2266 windowsMenu.addAction(self.showProtocolHandlerManagerAct) |
2249 if WebBrowserWindow._useQtHelp: |
2267 if WebBrowserWindow._useQtHelp: |
2250 windowsMenu.addSeparator() |
2268 windowsMenu.addSeparator() |
2251 windowsMenu.addAction(self.showTocAct) |
2269 windowsMenu.addAction(self.showTocAct) |
2252 windowsMenu.addAction(self.showIndexAct) |
2270 windowsMenu.addAction(self.showIndexAct) |
2253 windowsMenu.addAction(self.showSearchAct) |
2271 windowsMenu.addAction(self.showSearchAct) |
4515 self.syncManager().showSyncDialog() |
4533 self.syncManager().showSyncDialog() |
4516 |
4534 |
4517 @classmethod |
4535 @classmethod |
4518 def speedDial(cls): |
4536 def speedDial(cls): |
4519 """ |
4537 """ |
4520 Class methdo to get a reference to the speed dial. |
4538 Class method to get a reference to the speed dial. |
4521 |
4539 |
4522 @return reference to the speed dial (SpeedDial) |
4540 @return reference to the speed dial (SpeedDial) |
4523 """ |
4541 """ |
4524 if cls._speedDial is None: |
4542 if cls._speedDial is None: |
4525 from .SpeedDial.SpeedDial import SpeedDial |
4543 from .SpeedDial.SpeedDial import SpeedDial |
4956 """ |
4974 """ |
4957 Private slot to show the safe browsing management dialog. |
4975 Private slot to show the safe browsing management dialog. |
4958 """ |
4976 """ |
4959 self.safeBrowsingManager().showSafeBrowsingDialog() |
4977 self.safeBrowsingManager().showSafeBrowsingDialog() |
4960 |
4978 |
|
4979 ############################################################# |
|
4980 ## Methods below implement protocol handler related functions |
|
4981 ############################################################# |
|
4982 |
|
4983 @classmethod |
|
4984 def protocolHandlerManager(cls): |
|
4985 """ |
|
4986 Class method to get a reference to the protocol handler manager. |
|
4987 |
|
4988 @return reference to the protocol handler manager |
|
4989 @rtype ProtocolHandlerManager |
|
4990 """ |
|
4991 if cls._protocolHandlerManager is None: |
|
4992 from .Network.ProtocolHandlerManager import ProtocolHandlerManager |
|
4993 cls._protocolHandlerManager = ProtocolHandlerManager() |
|
4994 |
|
4995 return cls._protocolHandlerManager |
|
4996 |
|
4997 def __showProtocolHandlerManagerDialog(self): |
|
4998 """ |
|
4999 Private slot to show the protocol handler manager dialog. |
|
5000 """ |
|
5001 self.protocolHandlerManager().showProtocolHandlerManagerDialog() |
|
5002 |
4961 ############################################################### |
5003 ############################################################### |
4962 ## Methods below implement single application related functions |
5004 ## Methods below implement single application related functions |
4963 ############################################################### |
5005 ############################################################### |
4964 |
5006 |
4965 @pyqtSlot(str) |
5007 @pyqtSlot(str) |