Commit 5107a691 authored by Anthony Léonard's avatar Anthony Léonard

Name service URL can now be edited

The user is now able to change its name server by
changing its URL in settings tab.

Change-Id: I8efed7d6c2c3ff22e21021629bb1a136351f4a95
parent 371551c0
......@@ -87,6 +87,11 @@ AccountDetails::AccountDetails(QWidget *parent) :
if (currentAccount_ && currentAccount_->protocol() == Account::Protocol::RING)
currentAccount_->setDisplayName(newAlias);
});
connect(ui->lrcfg_nameServiceURL, &QLineEdit::textEdited, [=](const QString& newNSURL) {
if (currentAccount_ && currentAccount_->protocol() == Account::Protocol::RING)
currentAccount_->setNameServiceURL(newNSURL);
});
}
AccountDetails::~AccountDetails()
......@@ -203,9 +208,16 @@ AccountDetails::setAccount(Account* currentAccount) {
if (accountProtocol == Account::Protocol::RING) {
ui->medStreaEncry->setVisible(false);
ui->lrcfg_tlsEnabled->setVisible(false);
ui->nameServiceURLLabel->show();
ui->lrcfg_nameServiceURL->show();
ui->lrcfg_nameServiceURL->setText(currentAccount_->nameServiceURL());
} else if (accountProtocol == Account::Protocol::SIP) {
ui->medStreaEncry->setVisible(true);
ui->lrcfg_tlsEnabled->setVisible(true);
ui->nameServiceURLLabel->hide();
ui->lrcfg_nameServiceURL->hide();
}
if (ui->lrcfg_tlsEnabled->checkState() == Qt::Checked) {
......
......@@ -389,7 +389,7 @@
</item>
</layout>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="passwordLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -413,7 +413,7 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QLineEdit" name="lrcfg_password">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
......@@ -432,7 +432,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="proxyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -456,7 +456,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QLineEdit" name="lrcfg_proxy">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
......@@ -472,7 +472,7 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="voicemailLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -496,7 +496,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QLineEdit" name="lrcfg_mailbox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
......@@ -512,7 +512,7 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QCheckBox" name="lrcfg_autoAnswer">
<property name="font">
<font>
......@@ -527,7 +527,7 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QCheckBox" name="lrcfg_upnpEnabled">
<property name="enabled">
<bool>true</bool>
......@@ -545,7 +545,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
......@@ -560,7 +560,7 @@
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QRadioButton" name="rtpRadio">
......@@ -616,6 +616,40 @@
</item>
</layout>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lrcfg_nameServiceURL">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="nameServiceURLLabel">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(77, 77, 77);</string>
</property>
<property name="text">
<string>Name service URL</string>
</property>
<property name="buddy">
<cstring>lrcfg_nameServiceURL</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
......
......@@ -503,7 +503,8 @@ QSpinBox::up-button{
QLineEdit#lrcfg_alias, QLineEdit#lrcfg_hostname, QLineEdit#lrcfg_password, QLineEdit#lrcfg_proxy,
QLineEdit#lrcfg_mailbox, QLineEdit#lrcfg_tlsPassword, QLineEdit#lrcfg_tlsServerName,
QLineEdit#lrcfg_turnServerRealm, QLineEdit#lrcfg_turnServerUsername, QLineEdit#lrcfg_turnServerPassword,
QLineEdit#lrcfg_turnServer, QLineEdit#lrcfg_publishedAddress, QLineEdit#lrcfg_registeredName{
QLineEdit#lrcfg_turnServer, QLineEdit#lrcfg_publishedAddress, QLineEdit#lrcfg_registeredName,
QLineEdit#lrcfg_nameServiceURL{
background: transparent;
border-radius: 0px;
border-style: solid;
......@@ -527,7 +528,7 @@ QLineEdit#lrcfg_alias:focus, QLineEdit#lrcfg_hostname:focus, QLineEdit#lrcfg_pas
QLineEdit#lrcfg_proxy:focus, QLineEdit#lrcfg_mailbox:focus, QLineEdit#lrcfg_tlsPassword:focus,
QLineEdit#lrcfg_tlsServerName:focus, QLineEdit#lrcfg_turnServerRealm:focus, QLineEdit#lrcfg_turnServerUsername:focus,
QLineEdit#lrcfg_turnServerPassword:focus, QLineEdit#lrcfg_turnServer:focus, QLineEdit#lrcfg_publishedAddress:focus,
QLineEdit#lrcfg_registeredName:focus{
QLineEdit#lrcfg_registeredName:focus, QLineEdit#lrcfg_nameServiceURL:focus{
border-color: #3AC0D2;
}
......
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