src/eric7/WebBrowser/FeaturePermissions/FeaturePermissionBar.py

branch
eric7
changeset 10069
435cc5875135
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10068:7febcdccb2a1 10069:435cc5875135
62 "{0} wants to capture video of your screen." 62 "{0} wants to capture video of your screen."
63 ), 63 ),
64 QWebEnginePage.Feature.DesktopAudioVideoCapture: self.tr( 64 QWebEnginePage.Feature.DesktopAudioVideoCapture: self.tr(
65 "{0} wants to capture audio and video of your screen." 65 "{0} wants to capture audio and video of your screen."
66 ), 66 ),
67 QWebEnginePage.Feature.Notifications: self.tr(
68 "{0} wants to use desktop notifications."
69 ),
67 } 70 }
68 with contextlib.suppress(AttributeError):
69 # this was re-added in Qt 5.13.0
70 self.__permissionFeatureTexts[
71 QWebEnginePage.Feature.Notifications
72 ] = self.tr("{0} wants to use desktop notifications.")
73 71
74 self.__permissionFeatureIconNames = { 72 self.__permissionFeatureIconNames = {
75 QWebEnginePage.Feature.Geolocation: "geolocation", 73 QWebEnginePage.Feature.Geolocation: "geolocation",
76 QWebEnginePage.Feature.MediaAudioCapture: "audiocapture", 74 QWebEnginePage.Feature.MediaAudioCapture: "audiocapture",
77 QWebEnginePage.Feature.MediaVideoCapture: "camera", 75 QWebEnginePage.Feature.MediaVideoCapture: "camera",
78 QWebEnginePage.Feature.MediaAudioVideoCapture: "audio-video", 76 QWebEnginePage.Feature.MediaAudioVideoCapture: "audio-video",
79 QWebEnginePage.Feature.MouseLock: "mouse", 77 QWebEnginePage.Feature.MouseLock: "mouse",
80 QWebEnginePage.Feature.DesktopVideoCapture: "desktopVideoCapture", 78 QWebEnginePage.Feature.DesktopVideoCapture: "desktopVideoCapture",
81 QWebEnginePage.Feature.DesktopAudioVideoCapture: "desktopAudioVideoCapture", 79 QWebEnginePage.Feature.DesktopAudioVideoCapture: "desktopAudioVideoCapture",
80 QWebEnginePage.Feature.Notifications: "notification",
82 } 81 }
83 with contextlib.suppress(AttributeError):
84 # this was re-added in Qt 5.13.0
85 self.__permissionFeatureIconNames[
86 QWebEnginePage.Feature.Notifications
87 ] = "notification"
88 82
89 self.setAutoFillBackground(True) 83 self.setAutoFillBackground(True)
90 self.__layout = QHBoxLayout() 84 self.__layout = QHBoxLayout()
91 self.setLayout(self.__layout) 85 self.setLayout(self.__layout)
92 self.__layout.setContentsMargins(9, 0, 0, 0) 86 self.__layout.setContentsMargins(9, 0, 0, 0)

eric ide

mercurial