Commit 4a61db19 authored by Dan Pascu's avatar Dan Pascu

Always play an audio alert when a file transfer finishes

parent b7dd42b1
......@@ -72,7 +72,6 @@ class SoundSettings(SettingsGroup):
inbound_ringtone = Setting(type=SoundFile, default=SoundFile(Resources.get('sounds/inbound_ringtone.wav')), nillable=True)
outbound_ringtone = Setting(type=SoundFile, default=SoundFile(Resources.get('sounds/outbound_ringtone.wav')), nillable=True)
play_message_alerts = Setting(type=bool, default=True)
play_file_alerts = Setting(type=bool, default=True)
class TLSSettingsExtension(TLSSettings):
......
......@@ -310,7 +310,6 @@ class PreferencesWindow(base_class, ui_class):
# File transfer
self.download_directory_browse_button.clicked.connect(self._SH_DownloadDirectoryBrowseButtonClicked)
self.file_transfer_alert_button.clicked.connect(self._SH_FileTransferAlertButtonClicked)
# File logging
self.trace_sip_button.clicked.connect(self._SH_TraceSIPButtonClicked)
......@@ -723,7 +722,6 @@ class PreferencesWindow(base_class, ui_class):
# File transfer settings
self.download_directory_editor.setText(settings.file_transfer.directory or u'')
self.file_transfer_alert_button.setChecked(settings.sounds.play_file_alerts)
# File logging settings
self.trace_sip_button.setChecked(settings.logs.trace_sip)
......@@ -1545,11 +1543,6 @@ class PreferencesWindow(base_class, ui_class):
settings.file_transfer.directory = directory
settings.save()
def _SH_FileTransferAlertButtonClicked(self, checked):
settings = SIPSimpleSettings()
settings.sounds.play_file_alerts = checked
settings.save()
# File logging signal handlers
def _SH_TraceSIPButtonClicked(self, checked):
settings = SIPSimpleSettings()
......
......@@ -5576,7 +5576,7 @@ class SessionManager(object):
self.file_transfers.remove(notification.sender)
self.update_ringtone()
settings = SIPSimpleSettings()
if settings.sounds.play_file_alerts and not notification.data.error and not self._filetransfer_tone_timer.isActive():
if not notification.data.error and not self._filetransfer_tone_timer.isActive():
self._filetransfer_tone_timer.start()
player = WavePlayer(SIPApplication.voice_audio_bridge.mixer, Resources.get('sounds/file_transfer.wav'), volume=30)
SIPApplication.voice_audio_bridge.add(player)
......
......@@ -2531,7 +2531,7 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<item row="1" column="0" colspan="3">
<spacer name="file_transfer_spacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -2558,13 +2558,6 @@
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QCheckBox" name="file_transfer_alert_button">
<property name="text">
<string>Play a sound when a file transfer finishes</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment