eric6/WebBrowser/SiteInfo/SiteInfoWidget.py

changeset 7269
0c63ea7f94bd
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7268:a28338eaf694 7269:0c63ea7f94bd
7 Module implementing a widget to show some site information. 7 Module implementing a widget to show some site information.
8 """ 8 """
9 9
10 10
11 from PyQt5.QtCore import pyqtSlot, Qt, QPoint 11 from PyQt5.QtCore import pyqtSlot, Qt, QPoint
12 from PyQt5.QtWidgets import QMenu, QGridLayout, QHBoxLayout, QLabel, QFrame, \ 12 from PyQt5.QtWidgets import (
13 QSizePolicy, QPushButton, QSpacerItem 13 QMenu, QGridLayout, QHBoxLayout, QLabel, QFrame, QSizePolicy, QPushButton,
14 QSpacerItem
15 )
14 16
15 import UI.PixmapCache 17 import UI.PixmapCache
16 18
17 from WebBrowser.WebBrowserWindow import WebBrowserWindow 19 from WebBrowser.WebBrowserWindow import WebBrowserWindow
18 20
108 layout.addWidget(line, rows, 0, 1, -1) 110 layout.addWidget(line, rows, 0, 1, -1)
109 rows += 1 111 rows += 1
110 112
111 page = self.__browser.page() 113 page = self.__browser.page()
112 scheme = page.registerProtocolHandlerRequestScheme() 114 scheme = page.registerProtocolHandlerRequestScheme()
113 registeredUrl = WebBrowserWindow.protocolHandlerManager()\ 115 registeredUrl = (
114 .protocolHandler(scheme) 116 WebBrowserWindow.protocolHandlerManager().protocolHandler(scheme)
115 if bool(scheme) and \ 117 )
116 registeredUrl != page.registerProtocolHandlerRequestUrl(): 118 if (
119 bool(scheme) and
120 registeredUrl != page.registerProtocolHandlerRequestUrl()
121 ):
117 horizontalLayout = QHBoxLayout() 122 horizontalLayout = QHBoxLayout()
118 protocolHandlerLabel = QLabel( 123 protocolHandlerLabel = QLabel(
119 self.tr("Register as <b>{0}</b> links handler.") 124 self.tr("Register as <b>{0}</b> links handler.")
120 .format(scheme), self) 125 .format(scheme), self)
121 protocolHandlerLabel.setSizePolicy(QSizePolicy.Expanding, 126 protocolHandlerLabel.setSizePolicy(QSizePolicy.Expanding,

eric ide

mercurial