57 "{0} wants to use your camera." |
57 "{0} wants to use your camera." |
58 ), |
58 ), |
59 QWebEnginePage.Feature.MediaAudioVideoCapture: self.tr( |
59 QWebEnginePage.Feature.MediaAudioVideoCapture: self.tr( |
60 "{0} wants to use your microphone and camera." |
60 "{0} wants to use your microphone and camera." |
61 ), |
61 ), |
62 QWebEnginePage.Feature.MouseLock: self.tr( |
62 QWebEnginePage.Feature.MouseLock: self.tr("{0} wants to lock your mouse."), |
63 "{0} wants to lock your mouse." |
|
64 ), |
|
65 QWebEnginePage.Feature.DesktopVideoCapture: self.tr( |
63 QWebEnginePage.Feature.DesktopVideoCapture: self.tr( |
66 "{0} wants to capture video of your screen." |
64 "{0} wants to capture video of your screen." |
67 ), |
65 ), |
68 QWebEnginePage.Feature.DesktopAudioVideoCapture: self.tr( |
66 QWebEnginePage.Feature.DesktopAudioVideoCapture: self.tr( |
69 "{0} wants to capture audio and video of your screen." |
67 "{0} wants to capture audio and video of your screen." |
78 QWebEnginePage.Feature.MediaAudioCapture: "audiocapture", |
76 QWebEnginePage.Feature.MediaAudioCapture: "audiocapture", |
79 QWebEnginePage.Feature.MediaVideoCapture: "camera", |
77 QWebEnginePage.Feature.MediaVideoCapture: "camera", |
80 QWebEnginePage.Feature.MediaAudioVideoCapture: "audio-video", |
78 QWebEnginePage.Feature.MediaAudioVideoCapture: "audio-video", |
81 QWebEnginePage.Feature.MouseLock: "mouse", |
79 QWebEnginePage.Feature.MouseLock: "mouse", |
82 QWebEnginePage.Feature.DesktopVideoCapture: "desktopVideoCapture", |
80 QWebEnginePage.Feature.DesktopVideoCapture: "desktopVideoCapture", |
83 QWebEnginePage.Feature.DesktopAudioVideoCapture: |
81 QWebEnginePage.Feature.DesktopAudioVideoCapture: "desktopAudioVideoCapture", |
84 "desktopAudioVideoCapture", |
|
85 QWebEnginePage.Feature.Notifications: "notification", |
82 QWebEnginePage.Feature.Notifications: "notification", |
86 } |
83 } |
87 |
84 |
88 self.setAutoFillBackground(True) |
85 self.setAutoFillBackground(True) |
89 self.__layout = QHBoxLayout() |
86 self.__layout = QHBoxLayout() |
96 self.__layout.addStretch() |
93 self.__layout.addStretch() |
97 self.__rememberButton = QPushButton(self.tr("Remember"), self) |
94 self.__rememberButton = QPushButton(self.tr("Remember"), self) |
98 self.__rememberButton.setCheckable(True) |
95 self.__rememberButton.setCheckable(True) |
99 self.__allowButton = QPushButton(self.tr("Allow"), self) |
96 self.__allowButton = QPushButton(self.tr("Allow"), self) |
100 self.__denyButton = QPushButton(self.tr("Deny"), self) |
97 self.__denyButton = QPushButton(self.tr("Deny"), self) |
101 self.__discardButton = QPushButton( |
98 self.__discardButton = QPushButton(EricPixmapCache.getIcon("close"), "", self) |
102 EricPixmapCache.getIcon("close"), "", self |
|
103 ) |
|
104 self.__allowButton.clicked.connect(self.__permissionGranted) |
99 self.__allowButton.clicked.connect(self.__permissionGranted) |
105 self.__denyButton.clicked.connect(self.__permissionDenied) |
100 self.__denyButton.clicked.connect(self.__permissionDenied) |
106 self.__discardButton.clicked.connect(self.__permissionUnknown) |
101 self.__discardButton.clicked.connect(self.__permissionUnknown) |
107 self.__layout.addWidget(self.__rememberButton) |
102 self.__layout.addWidget(self.__rememberButton) |
108 self.__layout.addWidget(self.__allowButton) |
103 self.__layout.addWidget(self.__allowButton) |