Commit 4433876a authored by Anthony Léonard's avatar Anthony Léonard

Bring back username and RingID fields in config panel

It was deleted by mistake so it wasn't possible anymore
to enter an SIP username. This also display the RingID in
case of a Ring account.

Change-Id: I765ee261553249cb6fdec7f06bce1a11b53aaca1
Tuleap: #1312
parent 61065ec8
......@@ -113,6 +113,8 @@ AccountDetails::setAccount(Account* currentAccount) {
return;
if (currentAccount_->protocol() == Account::Protocol::RING) {
ui->usernameLabel->setText(tr("RingID"));
ui->lrcfg_username->setReadOnly(true);
if (currentAccount_->registeredName().isEmpty() ){ // If our user isn't registered on the blockhain
ui->lrcfg_registeredName->clear();
ui->lrcfg_registeredName->setReadOnly(false);
......@@ -124,6 +126,9 @@ AccountDetails::setAccount(Account* currentAccount) {
ui->lrcfg_registeredName->setReadOnly(true);
ui->registerButton->hide();
}
} else { // If currentAccount_ is of type SIP
ui->usernameLabel->setText(tr("Username"));
ui->lrcfg_username->setReadOnly(false);
}
codecModel_ = currentAccount->codecModel();
......
......@@ -324,7 +324,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="usernameLabel">
<widget class="QLabel" name="registeredNameLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
......@@ -340,7 +340,7 @@
<string notr="true">color: rgb(77, 77, 77);</string>
</property>
<property name="text">
<string>Username</string>
<string>Public username</string>
</property>
<property name="buddy">
<cstring>lrcfg_registeredName</cstring>
......@@ -389,7 +389,7 @@
</item>
</layout>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="passwordLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -413,7 +413,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" 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="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="proxyLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -456,7 +456,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" 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="5" column="0">
<item row="6" column="0">
<widget class="QLabel" name="voicemailLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
......@@ -496,7 +496,7 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" 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="6" column="0">
<item row="7" column="0">
<widget class="QCheckBox" name="lrcfg_autoAnswer">
<property name="font">
<font>
......@@ -527,7 +527,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QCheckBox" name="lrcfg_upnpEnabled">
<property name="enabled">
<bool>true</bool>
......@@ -545,7 +545,7 @@
</property>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
......@@ -560,7 +560,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QRadioButton" name="rtpRadio">
......@@ -650,6 +650,40 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lrcfg_username">
<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="3" column="0">
<widget class="QLabel" name="usernameLabel">
<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>Username</string>
</property>
<property name="buddy">
<cstring>lrcfg_username</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
......
......@@ -504,7 +504,7 @@ QLineEdit#lrcfg_alias, QLineEdit#lrcfg_hostname, QLineEdit#lrcfg_password, QLine
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_nameServiceURL{
QLineEdit#lrcfg_nameServiceURL, QLineEdit#lrcfg_username{
background: transparent;
border-radius: 0px;
border-style: solid;
......@@ -528,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_nameServiceURL:focus{
QLineEdit#lrcfg_registeredName:focus, QLineEdit#lrcfg_nameServiceURL:focus, QLineEdit#lrcfg_username: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