Commit 79ec59b1 authored by Dan Pascu's avatar Dan Pascu

Removed tls timeout option from preferences

parent 6ee2e743
......@@ -305,7 +305,6 @@ class PreferencesWindow(base_class, ui_class):
# TLS
self.tls_ca_file_editor.locationCleared.connect(self._SH_TLSCAFileEditorLocationCleared)
self.tls_ca_file_browse_button.clicked.connect(self._SH_TLSCAFileBrowseButtonClicked)
self.tls_timeout.valueChanged[float].connect(self._SH_TLSTimeoutValueChanged)
# Setup initial state (show the acounts page right after start)
self.accounts_action.trigger()
......@@ -402,7 +401,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, self.tls_timeout_label)
labels = (self.transports_label, self.media_ports_label, self.session_timeout_label, self.rtp_timeout_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)
......@@ -624,8 +623,6 @@ class PreferencesWindow(base_class, ui_class):
self.rtp_timeout.setValue(settings.rtp.timeout)
self.tls_ca_file_editor.setText(settings.tls.ca_list or u'')
with blocked_qt_signals(self.tls_timeout):
self.tls_timeout.setValue(settings.tls.timeout / 1000.0)
def load_account_settings(self, account):
"""Load the account settings from configuration into the UI controls"""
......@@ -1441,14 +1438,6 @@ class PreferencesWindow(base_class, ui_class):
settings.tls.ca_list = ca_path
settings.save()
def _SH_TLSTimeoutValueChanged(self, value):
self.tls_timeout_seconds_label.setText(u'second' if value==1 else u'seconds')
settings = SIPSimpleSettings()
timeout = value * 1000
if settings.tls.timeout != timeout:
settings.tls.timeout = timeout
settings.save()
@run_in_gui_thread
def handle_notification(self, notification):
handler = getattr(self, '_NH_%s' % notification.name, Null)
......
......@@ -2662,6 +2662,13 @@
<string>TLS Settings</string>
</property>
<layout class="QGridLayout" name="tls_group_box_layout">
<item row="0" column="1">
<widget class="LocationBar" name="tls_ca_file_editor">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="tls_ca_file_label">
<property name="text">
......@@ -2672,31 +2679,14 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="3">
<widget class="LocationBar" name="tls_ca_file_editor">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="4">
<item row="0" column="2">
<widget class="QPushButton" name="tls_ca_file_browse_button">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="tls_timeout_label">
<property name="text">
<string>Connection Timeout:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" colspan="5">
<item row="1" column="0" colspan="3">
<spacer name="tls_vertical_spacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -2709,38 +2699,6 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="tls_timeout">
<property name="accelerated">
<bool>true</bool>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="maximum">
<double>30.000000000000000</double>
</property>
<property name="value">
<double>3.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="tls_timeout_seconds_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>seconds</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