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,8 +35,10 @@ class ApplicationWrapper(QtCore.QObject):
|
|||
def monkeypatch_event(event):
|
||||
# In macOS, handle the file open event
|
||||
if event.type() == QtCore.QEvent.FileOpen:
|
||||
self.document_selected.emit(event.file())
|
||||
return True
|
||||
# Skip file open events in dev mode
|
||||
if not sys.dangerzone_dev:
|
||||
self.document_selected.emit(event.file())
|
||||
return True
|
||||
elif event.type() == QtCore.QEvent.ApplicationActivate:
|
||||
self.application_activated.emit()
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue