mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Skip file open events in dev mode
This commit is contained in:
parent
ed4586a051
commit
0b1d8f6a3e
1 changed files with 4 additions and 2 deletions
|
@ -35,6 +35,8 @@ class ApplicationWrapper(QtCore.QObject):
|
||||||
def monkeypatch_event(event):
|
def monkeypatch_event(event):
|
||||||
# In macOS, handle the file open event
|
# In macOS, handle the file open event
|
||||||
if event.type() == QtCore.QEvent.FileOpen:
|
if event.type() == QtCore.QEvent.FileOpen:
|
||||||
|
# Skip file open events in dev mode
|
||||||
|
if not sys.dangerzone_dev:
|
||||||
self.document_selected.emit(event.file())
|
self.document_selected.emit(event.file())
|
||||||
return True
|
return True
|
||||||
elif event.type() == QtCore.QEvent.ApplicationActivate:
|
elif event.type() == QtCore.QEvent.ApplicationActivate:
|
||||||
|
|
Loading…
Reference in a new issue