Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
gajim
Commits
6e48f01c
Commit
6e48f01c
authored
Jan 13, 2022
by
Daniel Brötzmann
Browse files
Helpers: Allow play_sound to have no account
parent
a0c8587b
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/common/helpers.py
View file @
6e48f01c
...
...
@@ -466,13 +466,14 @@ def get_contact_dict_for_account(account: str) -> dict[str, types.BareContact]:
def
play_sound
(
sound_event
:
str
,
account
:
str
,
account
:
Optional
[
str
]
=
None
,
force
:
bool
=
False
,
loop
:
bool
=
False
)
->
None
:
if
sound_event
is
None
:
return
if
force
or
allow_sound_notification
(
account
,
sound_event
):
if
(
force
or
account
is
None
or
allow_sound_notification
(
account
,
sound_event
)):
play_sound_file
(
app
.
settings
.
get_soundevent_settings
(
sound_event
)[
'path'
],
loop
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment