mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
feat(Settings): add an developer option to show network settings
This commit is contained in:
parent
3ad8dc2994
commit
7a4764b677
13 changed files with 113 additions and 0 deletions
|
|
@ -1362,6 +1362,14 @@ Server URL ist nicht konfiguriert.</translation>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>NIE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1367,6 +1367,14 @@ your friend's SIP address or username.</translation>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>NEVER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation>Show network settings</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation>General</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1365,6 +1365,14 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>JAMAIS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation>Afficher les paramètres réseaux</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation>Général</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1362,6 +1362,14 @@
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1364,6 +1364,14 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>NIEKADA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1367,6 +1367,14 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>NUNCA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1365,6 +1365,14 @@
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>НИКОГДА</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1364,6 +1364,14 @@ Klicka här: <a href="%1">%1</a>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>ALDRIG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -1364,6 +1364,14 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
|
|||
<source>rlsUriDisabled</source>
|
||||
<translation>ASLA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showNetworkSettingsLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>generalTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsSipAccounts</name>
|
||||
|
|
|
|||
|
|
@ -533,6 +533,17 @@ void SettingsModel::setContactsEnabled (bool status) {
|
|||
// Network.
|
||||
// =============================================================================
|
||||
|
||||
bool SettingsModel::getShowNetworkSettings () const {
|
||||
return !!mConfig->getInt(UiSection, "show_network_settings", 1);
|
||||
}
|
||||
|
||||
void SettingsModel::setShowNetworkSettings (bool status) {
|
||||
mConfig->setInt(UiSection, "show_network_settings", status);
|
||||
emit showNetworkSettingsChanged(status);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool SettingsModel::getUseSipInfoForDtmfs () const {
|
||||
return CoreManager::getInstance()->getCore()->getUseInfoForDtmf();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ class SettingsModel : public QObject {
|
|||
|
||||
// Network. ------------------------------------------------------------------
|
||||
|
||||
Q_PROPERTY(bool showNetworkSettings READ getShowNetworkSettings WRITE setShowNetworkSettings NOTIFY showNetworkSettingsChanged);
|
||||
|
||||
Q_PROPERTY(bool useSipInfoForDtmfs READ getUseSipInfoForDtmfs WRITE setUseSipInfoForDtmfs NOTIFY dtmfsProtocolChanged);
|
||||
Q_PROPERTY(bool useRfc2833ForDtmfs READ getUseRfc2833ForDtmfs WRITE setUseRfc2833ForDtmfs NOTIFY dtmfsProtocolChanged);
|
||||
|
||||
|
|
@ -296,6 +298,9 @@ public:
|
|||
|
||||
// Network. ------------------------------------------------------------------
|
||||
|
||||
bool getShowNetworkSettings () const;
|
||||
void setShowNetworkSettings (bool status);
|
||||
|
||||
bool getUseSipInfoForDtmfs () const;
|
||||
void setUseSipInfoForDtmfs (bool status);
|
||||
|
||||
|
|
@ -467,6 +472,8 @@ signals:
|
|||
|
||||
// Network. ------------------------------------------------------------------
|
||||
|
||||
void showNetworkSettingsChanged (bool status);
|
||||
|
||||
void dtmfsProtocolChanged ();
|
||||
|
||||
void ipv6EnabledChanged (bool status);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,28 @@ TabContainer {
|
|||
spacing: SettingsWindowStyle.forms.spacing
|
||||
width: parent.width
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// General.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Form {
|
||||
title: qsTr('generalTitle')
|
||||
visible: SettingsModel.developerSettingsEnabled
|
||||
width: parent.width
|
||||
|
||||
FormLine {
|
||||
FormGroup {
|
||||
label: qsTr('showNetworkSettingsLabel')
|
||||
|
||||
Switch {
|
||||
checked: SettingsModel.showNetworkSettings
|
||||
|
||||
onClicked: SettingsModel.showNetworkSettings = !checked
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Transport.
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
TabButton {
|
||||
enabled: SettingsModel.showNetworkSettings || SettingsModel.developerSettingsEnabled
|
||||
iconName: 'settings_network'
|
||||
text: qsTr('networkTab')
|
||||
width: implicitWidth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue