Commit 0570b69f authored by Dan Pascu's avatar Dan Pascu

Removed session and RTP timeouts from preferences

parent 4a61db19
......@@ -327,8 +327,6 @@ class PreferencesWindow(base_class, ui_class):
self.tls_port.valueChanged[int].connect(self._SH_TLSPortValueChanged)
self.media_ports_start.valueChanged[int].connect(self._SH_MediaPortsStartValueChanged)
self.media_ports.valueChanged[int].connect(self._SH_MediaPortsValueChanged)
self.session_timeout.valueChanged[int].connect(self._SH_SessionTimeoutValueChanged)
self.rtp_timeout.valueChanged[int].connect(self._SH_RTPTimeoutValueChanged)
# TLS
self.tls_ca_file_editor.locationCleared.connect(self._SH_TLSCAFileEditorLocationCleared)
......@@ -456,7 +454,7 @@ class PreferencesWindow(base_class, ui_class):
# advanced settings
font_metrics = self.transports_label.fontMetrics() # we assume all labels have the same font
labels = (self.transports_label, self.media_ports_label, self.session_timeout_label, self.rtp_timeout_label, self.tls_ca_file_label)
labels = (self.transports_label, self.media_ports_label, self.tls_ca_file_label)
text_width = max(font_metrics.width(label.text()) for label in labels)
self.transports_label.setMinimumWidth(text_width)
self.tls_ca_file_label.setMinimumWidth(text_width)
......@@ -752,11 +750,6 @@ class PreferencesWindow(base_class, ui_class):
with blocked_qt_signals(self.media_ports):
self.media_ports.setValue(settings.rtp.port_range.end - settings.rtp.port_range.start)
with blocked_qt_signals(self.session_timeout):
self.session_timeout.setValue(settings.sip.invite_timeout)
with blocked_qt_signals(self.rtp_timeout):
self.rtp_timeout.setValue(settings.rtp.timeout)
self.tls_ca_file_editor.setText(settings.tls.ca_list or u'')
def load_account_settings(self, account):
......@@ -1633,24 +1626,6 @@ class PreferencesWindow(base_class, ui_class):
settings.rtp.port_range = port_range
settings.save()
def _SH_SessionTimeoutValueChanged(self, value):
settings = SIPSimpleSettings()
if settings.sip.invite_timeout != value:
settings.sip.invite_timeout = value
settings.save()
def _SH_RTPTimeoutValueChanged(self, value):
if value == 0:
self.rtp_timeout_seconds_label.setText(u'')
elif value == 1:
self.rtp_timeout_seconds_label.setText(u'second')
else:
self.rtp_timeout_seconds_label.setText(u'seconds')
settings = SIPSimpleSettings()
if settings.rtp.timeout != value:
settings.rtp.timeout = value
settings.save()
# TLS signal handlers
def _SH_TLSCAFileEditorLocationCleared(self):
settings = SIPSimpleSettings()
......
......@@ -2933,82 +2933,6 @@
</widget>
</item>
<item row="4" column="0" colspan="6">
<spacer name="sip_spacer_1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QLabel" name="session_timeout_label">
<property name="text">
<string>Session Timeout:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="session_timeout">
<property name="minimum">
<number>10</number>
</property>
<property name="maximum">
<number>180</number>
</property>
<property name="value">
<number>90</number>
</property>
</widget>
</item>
<item row="5" column="2" colspan="2">
<widget class="QLabel" name="session_timeout_seconds_label">
<property name="text">
<string>seconds</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="rtp_timeout_label">
<property name="text">
<string>RTP Timeout:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="rtp_timeout">
<property name="specialValueText">
<string>None</string>
</property>
<property name="maximum">
<number>180</number>
</property>
<property name="value">
<number>30</number>
</property>
</widget>
</item>
<item row="6" column="2" colspan="2">
<widget class="QLabel" name="rtp_timeout_seconds_label">
<property name="text">
<string>seconds</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="6">
<spacer name="sip_spacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
......
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