src/eric7/WebBrowser/SiteInfo/SiteInfoWidget.py

branch
eric7
changeset 9384
b1b8e2dc2280
parent 9221
bf71ee032bb4
child 9413
80c06d472826
--- a/src/eric7/WebBrowser/SiteInfo/SiteInfoWidget.py	Mon Oct 03 17:29:30 2022 +0200
+++ b/src/eric7/WebBrowser/SiteInfo/SiteInfoWidget.py	Tue Oct 04 16:07:05 2022 +0200
@@ -125,33 +125,6 @@
         layout.addWidget(line, rows, 0, 1, -1)
         rows += 1
 
-        page = self.__browser.page()
-        scheme = page.registerProtocolHandlerRequestScheme()
-        registeredUrl = WebBrowserWindow.protocolHandlerManager().protocolHandler(
-            scheme
-        )
-        if bool(scheme) and registeredUrl != page.registerProtocolHandlerRequestUrl():
-            horizontalLayout = QHBoxLayout()
-            protocolHandlerLabel = QLabel(
-                self.tr("Register as <b>{0}</b> links handler.").format(scheme), self
-            )
-            protocolHandlerLabel.setSizePolicy(
-                QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred
-            )
-
-            horizontalLayout.addWidget(protocolHandlerLabel)
-            protocolHandlerButton = QPushButton(self.tr("Register"), self)
-            horizontalLayout.addWidget(protocolHandlerButton)
-            protocolHandlerButton.clicked.connect(self.__registerProtocolHandler)
-            layout.addLayout(horizontalLayout, rows, 0, 1, -1)
-            rows += 1
-
-            protocolHandlerLine = QFrame(self)
-            protocolHandlerLine.setLineWidth(1)
-            protocolHandlerLine.setFrameStyle(QFrame.Shape.HLine | QFrame.Shadow.Sunken)
-            layout.addWidget(protocolHandlerLine, rows, 0, 1, -1)
-            rows += 1
-
         horizontalLayout = QHBoxLayout()
         spacerItem = QSpacerItem(
             40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
@@ -194,15 +167,3 @@
 
         siteinfoDialog = SiteInfoDialog(self.__browser, self.__browser.mainWindow())
         siteinfoDialog.show()
-
-    @pyqtSlot()
-    def __registerProtocolHandler(self):
-        """
-        Private slot to register a protocol handler.
-        """
-        self.close()
-        page = self.__browser.page()
-        WebBrowserWindow.protocolHandlerManager().addProtocolHandler(
-            page.registerProtocolHandlerRequestScheme(),
-            page.registerProtocolHandlerRequestUrl(),
-        )

eric ide

mercurial