eric6/WebBrowser/FeaturePermissions/FeaturePermissionBar.py

changeset 7179
912bc70b5b01
parent 6942
2602857055c5
child 7229
53054eb5b15a
equal deleted inserted replaced
7178:43e994af5ee0 7179:912bc70b5b01
65 self.tr("{0} wants to capture audio and video of your" 65 self.tr("{0} wants to capture audio and video of your"
66 " screen."), 66 " screen."),
67 }) 67 })
68 except AttributeError: 68 except AttributeError:
69 pass 69 pass
70 try:
71 # this was re-added in Qt 5.13.0
72 self.__permissionFeatureTexts[QWebEnginePage.Notifications] = \
73 self.tr("{0} wants to use desktop notifications.")
74 except AttributeError:
75 pass
70 76
71 self.__permissionFeatureIconNames = { 77 self.__permissionFeatureIconNames = {
72 QWebEnginePage.Geolocation: "geolocation.png", 78 QWebEnginePage.Geolocation: "geolocation.png",
73 QWebEnginePage.MediaAudioCapture: "audiocapture.png", 79 QWebEnginePage.MediaAudioCapture: "audiocapture.png",
74 QWebEnginePage.MediaVideoCapture: "camera.png", 80 QWebEnginePage.MediaVideoCapture: "camera.png",
80 self.__permissionFeatureIconNames.update({ 86 self.__permissionFeatureIconNames.update({
81 QWebEnginePage.DesktopVideoCapture: "desktopVideoCapture.png", 87 QWebEnginePage.DesktopVideoCapture: "desktopVideoCapture.png",
82 QWebEnginePage.DesktopAudioVideoCapture: 88 QWebEnginePage.DesktopAudioVideoCapture:
83 "desktopAudioVideoCapture.png", 89 "desktopAudioVideoCapture.png",
84 }) 90 })
91 except AttributeError:
92 pass
93 try:
94 # this was re-added in Qt 5.13.0
95 self.__permissionFeatureIconNames[QWebEnginePage.Notifications] = \
96 "notification.png"
85 except AttributeError: 97 except AttributeError:
86 pass 98 pass
87 99
88 self.setAutoFillBackground(True) 100 self.setAutoFillBackground(True)
89 self.__layout = QHBoxLayout() 101 self.__layout = QHBoxLayout()

eric ide

mercurial