WebBrowser/WebBrowserWindow.py

changeset 6695
0a51887c13cd
parent 6657
c6a93bbd66a5
diff -r c104c120e043 -r 0a51887c13cd WebBrowser/WebBrowserWindow.py
--- a/WebBrowser/WebBrowserWindow.py	Fri Feb 01 20:15:03 2019 +0100
+++ b/WebBrowser/WebBrowserWindow.py	Sun Feb 03 16:10:39 2019 +0100
@@ -110,6 +110,7 @@
     _tabManager = None
     _sessionManager = None
     _safeBrowsingManager = None
+    _protocolHandlerManager = None
     
     _performingStartup = True
     _performingShutdown = False
@@ -321,6 +322,7 @@
         self.passwordManager()
         self.historyManager()
         self.greaseMonkeyManager()
+        self.protocolHandlerManager()
         
         # initialize the actions
         self.__initActions()
@@ -1937,6 +1939,20 @@
         self.importShortcutsAct.triggered.connect(self.__importShortcuts)
         self.__actions.append(self.importShortcutsAct)
         
+        self.showProtocolHandlerManagerAct = E5Action(
+            self.tr('Protocol Handler Manager'),
+            self.tr('Protocol Handler Manager...'),
+            0, 0, self, 'webbrowser_show_protocol_handler_manager')
+        self.showProtocolHandlerManagerAct.setStatusTip(self.tr(
+            'Shows the protocol handler manager window'))
+        self.showProtocolHandlerManagerAct.setWhatsThis(self.tr(
+            """<b>Protocol Handler Manager</b>"""
+            """<p>Shows the protocol handler manager window.</p>"""
+        ))
+        self.showProtocolHandlerManagerAct.triggered.connect(
+            self.__showProtocolHandlerManagerDialog)
+        self.__actions.append(self.showProtocolHandlerManagerAct)
+        
         self.backAct.setEnabled(False)
         self.forwardAct.setEnabled(False)
         
@@ -2132,6 +2148,7 @@
         menu.addAction(self.showDownloadManagerAct)
         menu.addAction(self.showJavaScriptConsoleAct)
         menu.addAction(self.showTabManagerAct)
+        menu.addAction(self.showProtocolHandlerManagerAct)
         if WebBrowserWindow._useQtHelp:
             menu.addSeparator()
             menu.addAction(self.showTocAct)
@@ -2246,6 +2263,7 @@
         windowsMenu.addAction(self.showDownloadManagerAct)
         windowsMenu.addAction(self.showJavaScriptConsoleAct)
         windowsMenu.addAction(self.showTabManagerAct)
+        windowsMenu.addAction(self.showProtocolHandlerManagerAct)
         if WebBrowserWindow._useQtHelp:
             windowsMenu.addSeparator()
             windowsMenu.addAction(self.showTocAct)
@@ -4517,7 +4535,7 @@
     @classmethod
     def speedDial(cls):
         """
-        Class methdo to get a reference to the speed dial.
+        Class method to get a reference to the speed dial.
         
         @return reference to the speed dial (SpeedDial)
         """
@@ -4958,6 +4976,30 @@
         """
         self.safeBrowsingManager().showSafeBrowsingDialog()
     
+    #############################################################
+    ## Methods below implement protocol handler related functions
+    #############################################################
+    
+    @classmethod
+    def protocolHandlerManager(cls):
+        """
+        Class method to get a reference to the protocol handler manager.
+        
+        @return reference to the protocol handler manager
+        @rtype ProtocolHandlerManager
+        """
+        if cls._protocolHandlerManager is None:
+            from .Network.ProtocolHandlerManager import ProtocolHandlerManager
+            cls._protocolHandlerManager = ProtocolHandlerManager()
+        
+        return cls._protocolHandlerManager
+    
+    def __showProtocolHandlerManagerDialog(self):
+        """
+        Private slot to show the protocol handler manager dialog.
+        """
+        self.protocolHandlerManager().showProtocolHandlerManagerDialog()
+    
     ###############################################################
     ## Methods below implement single application related functions
     ###############################################################

eric ide

mercurial