play gmail_received sound only if it is enabled. fixes #2697

This commit is contained in:
Yann Leboulanger 2006-12-03 13:49:16 +00:00
parent dc88124dcf
commit df58c1f309
1 changed files with 2 additions and 1 deletions

View File

@ -1156,8 +1156,9 @@ class Interface:
text += _('\nFrom: %(from_address)s') % \
{'from_address': gmessage['From']}
if gajim.config.get_per('soundevents', 'gmail_received', 'enabled'):
helpers.play_sound('gmail_received')
path = gtkgui_helpers.get_path_to_generic_or_avatar(img)
helpers.play_sound('gmail_received')
notify.popup(_('New E-mail'), jid, account, 'gmail',
path_to_image = path, title = title, text = text)