Browse Source

Fixed context_menu on non-debug mode

sisyphus
JezerM 3 years ago
parent
commit
dc6b2f2d21
No known key found for this signature in database
GPG Key ID: 66BBC5D01388C6B5
  1. 1
      web-greeter/__main__.py
  2. 4
      web-greeter/browser/browser.py

1
web-greeter/__main__.py

@ -100,4 +100,5 @@ if __name__ == '__main__':
globals.greeter = Browser()
greeter = globals.greeter
greeter.show()
greeter.run()

4
web-greeter/browser/browser.py

@ -239,6 +239,8 @@ class Browser(Application):
if web_greeter_config["config"]["greeter"]["debug_mode"]:
self._initialize_devtools()
else:
self.view.setContextMenuPolicy(Qt.PreventContextMenu)
if web_greeter_config["config"]["greeter"]["secure_mode"]:
if (hasattr(QWebEngineProfile, "setUrlRequestInterceptor")):
@ -255,8 +257,6 @@ class Browser(Application):
logger.debug("Browser Window created")
self.show()
def load(self):
self.greeter = Greeter()
self.greeter_config = Config()

Loading…
Cancel
Save