Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
2847cd73
Commit
2847cd73
authored
Mar 31, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsSipAccounts): in progress
parent
df1df560
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
117 additions
and
27 deletions
+117
-27
en.ts
linphone-desktop/assets/languages/en.ts
+10
-6
fr.ts
linphone-desktop/assets/languages/fr.ts
+9
-5
resources.qrc
linphone-desktop/resources.qrc
+2
-0
AccountSettingsModel.cpp
...-desktop/src/components/settings/AccountSettingsModel.cpp
+19
-0
AccountSettingsModel.hpp
...-desktop/src/components/settings/AccountSettingsModel.hpp
+1
-0
SettingsSipAccounts.qml
...one-desktop/ui/views/App/Settings/SettingsSipAccounts.qml
+1
-1
SettingsSipAccountsEdit.js
...-desktop/ui/views/App/Settings/SettingsSipAccountsEdit.js
+33
-0
SettingsSipAccountsEdit.qml
...desktop/ui/views/App/Settings/SettingsSipAccountsEdit.qml
+32
-14
SettingsSipAccountsEditStyle.qml
...iews/App/Styles/Settings/SettingsSipAccountsEditStyle.qml
+9
-0
qmldir
linphone-desktop/ui/views/App/Styles/qmldir
+1
-1
No files found.
linphone-desktop/assets/languages/en.ts
View file @
2847cd73
...
...
@@ -487,7 +487,7 @@ Server url not configured.</translation>
<
/message
>
<
message
>
<
source
>
defaultMessage
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
translation
type
=
"
unfinished></translation>
</message>
<message>
<source>defaultSubject</source>
...
...
@@ -848,18 +848,22 @@ Server url not configured.</translation>
<source>contactParamsLabel</source>
<translation>Contact params</translation>
</message>
<
message
>
<
source
>
registerLabel
<
/source
>
<
translation
>
Register
<
/translation
>
<
/message
>
<message>
<source>publishPresenceLabel</source>
<translation>Publish presence information</translation>
</message>
<message>
<
source
>
enableAvpf
Label
<
/source
>
<source>
avpfInterval
Label</source>
<translation>AVPF regular RTCP interval (sec)</translation>
</message>
<message>
<source>registerEnabledLabel</source>
<translation>Register</translation>
</message>
<message>
<source>avpfEnabledLabel</source>
<translation>Enable AVPF</translation>
</message>
</context>
<context>
<name>SettingsUi</name>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
2847cd73
...
...
@@ -848,16 +848,20 @@ Url du serveur non configurée.</translation>
<
source
>
contactParamsLabel
<
/source
>
<
translation
>
Param
è
tres
de
contact
<
/translation
>
<
/message
>
<
message
>
<
source
>
registerLabel
<
/source
>
<
translation
>
S
&
apos
;
enregistrer
<
/translation
>
<
/message
>
<
message
>
<
source
>
publishPresenceLabel
<
/source
>
<
translation
>
Publier
la
pr
é
sence
<
/translation
>
<
/message
>
<
message
>
<
source
>
enableAvpfLabel
<
/source
>
<
source
>
avpfIntervalLabel
<
/source
>
<
translation
>
Intervalle
standard
RTCP
AVPF
(
sec
)
<
/translation
>
<
/message
>
<
message
>
<
source
>
registerEnabledLabel
<
/source
>
<
translation
>
S
&
apos
;
enregistrer
<
/translation
>
<
/message
>
<
message
>
<
source
>
avpfEnabledLabel
<
/source
>
<
translation
>
Activer
AVPF
<
/translation
>
<
/message
>
<
/context
>
...
...
linphone-desktop/resources.qrc
View file @
2847cd73
...
...
@@ -340,6 +340,7 @@
<file>
ui/views/App/Settings/SettingsAudio.qml
</file>
<file>
ui/views/App/Settings/SettingsCallsChat.qml
</file>
<file>
ui/views/App/Settings/SettingsNetwork.qml
</file>
<file>
ui/views/App/Settings/SettingsSipAccountsEdit.js
</file>
<file>
ui/views/App/Settings/SettingsSipAccountsEdit.qml
</file>
<file>
ui/views/App/Settings/SettingsSipAccounts.js
</file>
<file>
ui/views/App/Settings/SettingsSipAccounts.qml
</file>
...
...
@@ -363,6 +364,7 @@
<file>
ui/views/App/Styles/Main/MainWindowStyle.qml
</file>
<file>
ui/views/App/Styles/Main/ManageAccountsStyle.qml
</file>
<file>
ui/views/App/Styles/qmldir
</file>
<file>
ui/views/App/Styles/Settings/SettingsSipAccountsEditStyle.qml
</file>
<file>
ui/views/App/Styles/Settings/SettingsWindowStyle.qml
</file>
<file>
ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml
</file>
</qresource>
...
...
linphone-desktop/src/components/settings/AccountSettingsModel.cpp
View file @
2847cd73
...
...
@@ -29,6 +29,25 @@
// =============================================================================
QVariantMap
AccountSettingsModel
::
getProxyConfigDescription
(
const
std
::
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxy_config
)
{
Q_ASSERT
(
proxy_config
!=
nullptr
);
QVariantMap
map
;
map
[
"sipAddress"
]
=
::
Utils
::
linphoneStringToQString
(
proxy_config
->
getIdentityAddress
()
->
asStringUriOnly
());
map
[
"serverAddress"
]
=
::
Utils
::
linphoneStringToQString
(
proxy_config
->
getServerAddr
());
map
[
"registrationDuration"
]
=
proxy_config
->
getPublishExpires
();
map
[
"transport"
]
=
::
Utils
::
linphoneStringToQString
(
proxy_config
->
getTransport
());
map
[
"route"
]
=
::
Utils
::
linphoneStringToQString
(
proxy_config
->
getRoute
());
map
[
"contactParams"
]
=
::
Utils
::
linphoneStringToQString
(
proxy_config
->
getContactParameters
());
map
[
"avpfInterval"
]
=
proxy_config
->
getAvpfRrInterval
();
map
[
"registerEnabled"
]
=
proxy_config
->
registerEnabled
();
map
[
"publishPresence"
]
=
proxy_config
->
publishEnabled
();
map
[
"avpfEnabled"
]
=
proxy_config
->
getAvpfMode
()
==
linphone
::
AVPFMode
::
AVPFModeEnabled
;
return
map
;
}
void
AccountSettingsModel
::
setDefaultProxyConfig
(
const
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxy_config
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setDefaultProxyConfig
(
proxy_config
);
emit
accountSettingsUpdated
();
...
...
linphone-desktop/src/components/settings/AccountSettingsModel.hpp
View file @
2847cd73
...
...
@@ -43,6 +43,7 @@ class AccountSettingsModel : public QObject {
public:
AccountSettingsModel
(
QObject
*
parent
=
Q_NULLPTR
)
:
QObject
(
parent
)
{}
Q_INVOKABLE
QVariantMap
getProxyConfigDescription
(
const
std
::
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxy_config
);
Q_INVOKABLE
void
setDefaultProxyConfig
(
const
std
::
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxy_config
);
Q_INVOKABLE
void
removeProxyConfig
(
const
std
::
shared_ptr
<
linphone
::
ProxyConfig
>
&
proxy_config
);
...
...
linphone-desktop/ui/views/App/Settings/SettingsSipAccounts.qml
View file @
2847cd73
...
...
@@ -77,7 +77,7 @@ TabContainer {
]
Repeater
{
model
:
AccountSettingsModel
.
accounts
model
:
AccountSettingsModel
.
accounts
.
slice
(
1
)
delegate
:
FormTableLine
{
title
:
modelData
.
sipAddress
...
...
linphone-desktop/ui/views/App/Settings/SettingsSipAccountsEdit.js
0 → 100644
View file @
2847cd73
// =============================================================================
// `SettingsSipAccounts.qml` Logic.
// =============================================================================
.
import
Linphone
1.0
as
Linphone
.
import
'
qrc:/ui/scripts/Utils/utils.js
'
as
Utils
// =============================================================================
function
initForm
(
account
)
{
if
(
!
account
)
{
return
}
var
config
=
Linphone
.
AccountSettingsModel
.
getProxyConfigDescription
(
account
.
proxyConfig
)
sipAddress
.
text
=
config
.
sipAddress
serverAddress
.
text
=
config
.
serverAddress
registrationDuration
.
text
=
config
.
registrationDuration
var
currentTransport
=
config
.
transport
.
toUpperCase
()
transport
.
currentIndex
=
Utils
.
findIndex
(
transport
.
model
,
function
(
value
)
{
return
value
===
currentTransport
})
route
.
text
=
config
.
route
contactParams
.
text
=
config
.
contactParams
avpfInterval
.
text
=
config
.
avpfInterval
registerEnabled
.
checked
=
config
.
registerEnabled
publishPresence
.
checked
=
config
.
publishPresence
avpfEnabled
.
checked
=
config
.
avpfEnabled
}
linphone-desktop/ui/views/App/Settings/SettingsSipAccountsEdit.qml
View file @
2847cd73
...
...
@@ -6,13 +6,19 @@ import Utils 1.0
import
App
.
Styles
1.0
import
'
SettingsSipAccountsEdit.js
'
as
Logic
// =============================================================================
ConfirmDialog
{
property
var
account
height
:
500
width
:
600
height
:
SettingsSipAccountsEditStyle
.
height
width
:
SettingsSipAccountsEditStyle
.
width
// ---------------------------------------------------------------------------
Component.onCompleted
:
Logic
.
initForm
(
account
)
// ---------------------------------------------------------------------------
...
...
@@ -29,7 +35,7 @@ ConfirmDialog {
label
:
qsTr
(
'
sipAddressLabel
'
)
+
'
*
'
TextField
{
id
:
sipAddress
}
}
}
...
...
@@ -39,26 +45,28 @@ ConfirmDialog {
label
:
qsTr
(
'
serverAddressLabel
'
)
+
'
*
'
TextField
{
id
:
serverAddress
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
registrationDurationLabel
'
)
+
'
*
'
TextField
{
label
:
qsTr
(
'
registrationDurationLabel
'
)
NumericField
{
id
:
registrationDuration
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
transportLabel
'
)
+
'
*
'
label
:
qsTr
(
'
transportLabel
'
)
ComboBox
{
id
:
transport
model
:
[
'
TCP
'
,
'
UDP
'
,
'
TLS
'
]
}
}
...
...
@@ -69,7 +77,7 @@ ConfirmDialog {
label
:
qsTr
(
'
routeLabel
'
)
TextField
{
id
:
route
}
}
}
...
...
@@ -79,17 +87,27 @@ ConfirmDialog {
label
:
qsTr
(
'
contactParamsLabel
'
)
TextField
{
id
:
contactParams
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
avpfIntervalLabel
'
)
NumericField
{
id
:
avpfInterval
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
registerLabel
'
)
label
:
qsTr
(
'
register
Enabled
Label
'
)
Switch
{
id
:
registerEnabled
}
}
}
...
...
@@ -99,17 +117,17 @@ ConfirmDialog {
label
:
qsTr
(
'
publishPresenceLabel
'
)
Switch
{
id
:
publishPresence
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
enableAvpf
Label
'
)
label
:
qsTr
(
'
avpfEnabled
Label
'
)
Switch
{
id
:
avpfEnabled
}
}
}
...
...
linphone-desktop/ui/views/App/Styles/Settings/SettingsSipAccountsEditStyle.qml
0 → 100644
View file @
2847cd73
pragma
Singleton
import
QtQuick
2.7
// =============================================================================
QtObject
{
property
int
height
:
550
property
int
width
:
600
}
linphone-desktop/ui/views/App/Styles/qmldir
View file @
2847cd73
...
...
@@ -23,5 +23,5 @@ singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton ManageAccountsStyle 1.0 Main/ManageAccountsStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SettingsSipAccountsEditStyle 1.0 Settings/SettingsSipAccountsEditStyle.qml
singleton SplashScreenStyle 1.0 SplashScreen/SplashScreenStyle.qml
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment