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
b61cb100
Commit
b61cb100
authored
Apr 21, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Main/Assistant): supports display name
parent
46e9c13b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
16 deletions
+89
-16
en.ts
linphone-desktop/assets/languages/en.ts
+12
-4
fr.ts
linphone-desktop/assets/languages/fr.ts
+12
-4
AssistantModel.cpp
linphone-desktop/src/components/assistant/AssistantModel.cpp
+34
-2
AssistantModel.hpp
linphone-desktop/src/components/assistant/AssistantModel.hpp
+7
-0
AccountSettingsModel.cpp
...-desktop/src/components/settings/AccountSettingsModel.cpp
+2
-2
AccountSettingsModel.hpp
...-desktop/src/components/settings/AccountSettingsModel.hpp
+1
-1
CreateLinphoneSipAccountWithEmail.qml
.../App/Main/Assistant/CreateLinphoneSipAccountWithEmail.qml
+8
-0
CreateLinphoneSipAccountWithPhoneNumber.qml
...ain/Assistant/CreateLinphoneSipAccountWithPhoneNumber.qml
+10
-0
SettingsSipAccounts.qml
...one-desktop/ui/views/App/Settings/SettingsSipAccounts.qml
+3
-3
No files found.
linphone-desktop/assets/languages/en.ts
View file @
b61cb100
...
...
@@ -515,6 +515,10 @@ Server url not configured.</translation>
<
source
>
quitWarning
<
/source
>
<
translation
>
Your
account
has
been
created
but
is
not
yet
validated
.
If
you
quit
this
view
,
you
should
add
manually
your
account
and
validate
it
within
24
hours
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
translation
>
Display
name
(
optional
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CreateLinphoneSipAccountWithPhoneNumber
<
/name
>
...
...
@@ -534,6 +538,10 @@ Server url not configured.</translation>
<
source
>
usernameLabel
<
/source
>
<
translation
>
Username
<
/translation
>
<
/message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
translation
>
Display
name
(
optional
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DroppableTextArea
<
/name
>
...
...
@@ -982,10 +990,6 @@ to chat or see the conversation history.</translation>
<
source
>
defaultIdentityTitle
<
/source
>
<
translation
>
Default
identity
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultDisplaynameLabel
<
/source
>
<
translation
>
Display
name
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultUsernameLabel
<
/source
>
<
translation
>
Username
<
/translation
>
...
...
@@ -1026,6 +1030,10 @@ to chat or see the conversation history.</translation>
<
source
>
eraseAllPasswordsDescription
<
/source
>
<
translation
>
Are
you
sure
you
want
to
erase
all
passwords
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultDisplayNameLabel
<
/source
>
<
translation
>
Display
name
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsSipAccountsEdit
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
b61cb100
...
...
@@ -515,6 +515,10 @@ Url du serveur non configurée.</translation>
<
source
>
quitWarning
<
/source
>
<
translation
>
Votre
compte
a
é
t
é
cr
é
e
mais
il
n
&
apos
;
a
pas
é
t
é
valid
é
.
Si
vous
quittez
cette
vue
,
vous
devrez
ajouter
manuellement
votre
compte
et
le
valider
dans
les
24
heures
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
affichage
(
optionnel
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CreateLinphoneSipAccountWithPhoneNumber
<
/name
>
...
...
@@ -534,6 +538,10 @@ Url du serveur non configurée.</translation>
<
source
>
usernameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
utilisateur
<
/translation
>
<
/message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
affichage
(
optionnel
)
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
DroppableTextArea
<
/name
>
...
...
@@ -981,10 +989,6 @@ chatter ou voir l'historique de conversation.</translation>
<
source
>
defaultIdentityTitle
<
/source
>
<
translation
>
Identit
é
par
d
é
faut
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultDisplaynameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
affichage
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultUsernameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
utilisateur
<
/translation
>
...
...
@@ -1025,6 +1029,10 @@ chatter ou voir l'historique de conversation.</translation>
<
source
>
eraseAllPasswordsDescription
<
/source
>
<
translation
>
Ê
tes
-
vous
s
û
r
de
vouloir
supprimer
tous
vos
mots
de
passe
?
<
/translation
>
<
/message
>
<
message
>
<
source
>
defaultDisplayNameLabel
<
/source
>
<
translation
>
Nom
d
&
apos
;
affichage
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsSipAccountsEdit
<
/name
>
...
...
linphone-desktop/src/components/assistant/AssistantModel.cpp
View file @
b61cb100
...
...
@@ -207,6 +207,8 @@ void AssistantModel::setEmail (const QString &email) {
emit
emailChanged
(
email
,
error
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getPassword
()
const
{
return
::
Utils
::
linphoneStringToQString
(
mAccountCreator
->
getPassword
());
}
...
...
@@ -237,6 +239,8 @@ void AssistantModel::setPassword (const QString &password) {
emit
passwordChanged
(
password
,
error
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getPhoneNumber
()
const
{
return
::
Utils
::
linphoneStringToQString
(
mAccountCreator
->
getPhoneNumber
());
}
...
...
@@ -250,15 +254,43 @@ void AssistantModel::setPhoneNumber (const QString &phoneNumber) {
emit
phoneNumberChanged
(
phoneNumber
,
error
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getUsername
()
const
{
return
::
Utils
::
linphoneStringToQString
(
mAccountCreator
->
getUsername
());
}
void
AssistantModel
::
setUsername
(
const
QString
&
username
)
{
emit
usernameChanged
(
username
,
mapAccountCreatorUsernameStatusToString
(
mAccountCreator
->
setUsername
(
::
Utils
::
qStringToLinphoneString
(
username
))
)
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getDisplayName
()
const
{
return
::
Utils
::
linphoneStringToQString
(
mAccountCreator
->
getDisplayName
());
}
void
AssistantModel
::
setDisplayName
(
const
QString
&
displayName
)
{
emit
displayNameChanged
(
displayName
,
mapAccountCreatorUsernameStatusToString
(
mAccountCreator
->
setDisplayName
(
::
Utils
::
qStringToLinphoneString
(
displayName
))
)
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
mapAccountCreatorUsernameStatusToString
(
linphone
::
AccountCreatorUsernameStatus
status
)
const
{
shared_ptr
<
linphone
::
Config
>
config
=
CoreManager
::
getInstance
()
->
getCore
()
->
getConfig
();
QString
error
;
switch
(
mAccountCreator
->
setUsername
(
::
Utils
::
qStringToLinphoneString
(
username
))
)
{
switch
(
status
)
{
case
linphone
:
:
AccountCreatorUsernameStatusOk
:
break
;
case
linphone
:
:
AccountCreatorUsernameStatusTooShort
:
...
...
@@ -276,5 +308,5 @@ void AssistantModel::setUsername (const QString &username) {
break
;
}
emit
usernameChanged
(
username
,
error
)
;
return
error
;
}
linphone-desktop/src/components/assistant/AssistantModel.hpp
View file @
b61cb100
...
...
@@ -37,6 +37,7 @@ class AssistantModel : public QObject {
Q_PROPERTY
(
QString
password
READ
getPassword
WRITE
setPassword
NOTIFY
passwordChanged
);
Q_PROPERTY
(
QString
phoneNumber
READ
getPhoneNumber
WRITE
setPhoneNumber
NOTIFY
phoneNumberChanged
);
Q_PROPERTY
(
QString
username
READ
getUsername
WRITE
setUsername
NOTIFY
usernameChanged
);
Q_PROPERTY
(
QString
displayName
READ
getDisplayName
WRITE
setDisplayName
NOTIFY
displayNameChanged
);
public:
AssistantModel
(
QObject
*
parent
=
Q_NULLPTR
);
...
...
@@ -52,6 +53,7 @@ signals:
void
passwordChanged
(
const
QString
&
password
,
const
QString
&
error
);
void
phoneNumberChanged
(
const
QString
&
phoneNumber
,
const
QString
&
error
);
void
usernameChanged
(
const
QString
&
username
,
const
QString
&
error
);
void
displayNameChanged
(
const
QString
&
displayName
,
const
QString
&
error
);
void
activateStatusChanged
(
const
QString
&
error
);
void
createStatusChanged
(
const
QString
&
error
);
...
...
@@ -70,6 +72,11 @@ private:
QString
getUsername
()
const
;
void
setUsername
(
const
QString
&
username
);
QString
getDisplayName
()
const
;
void
setDisplayName
(
const
QString
&
displayName
);
QString
mapAccountCreatorUsernameStatusToString
(
linphone
::
AccountCreatorUsernameStatus
status
)
const
;
std
::
shared_ptr
<
linphone
::
AccountCreator
>
mAccountCreator
;
std
::
shared_ptr
<
Handlers
>
mHandlers
;
};
...
...
linphone-desktop/src/components/settings/AccountSettingsModel.cpp
View file @
b61cb100
...
...
@@ -246,11 +246,11 @@ QString AccountSettingsModel::getPrimaryDisplayname () const {
);
}
void
AccountSettingsModel
::
setPrimaryDisplayname
(
const
QString
&
display
n
ame
)
{
void
AccountSettingsModel
::
setPrimaryDisplayname
(
const
QString
&
display
N
ame
)
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
shared_ptr
<
linphone
::
Address
>
primary
=
core
->
getPrimaryContactParsed
();
primary
->
setDisplayName
(
::
Utils
::
qStringToLinphoneString
(
display
n
ame
));
primary
->
setDisplayName
(
::
Utils
::
qStringToLinphoneString
(
display
N
ame
));
core
->
setPrimaryContact
(
primary
->
asString
());
emit
accountSettingsUpdated
();
...
...
linphone-desktop/src/components/settings/AccountSettingsModel.hpp
View file @
b61cb100
...
...
@@ -91,7 +91,7 @@ private:
void
setPrimaryUsername
(
const
QString
&
username
);
QString
getPrimaryDisplayname
()
const
;
void
setPrimaryDisplayname
(
const
QString
&
display
n
ame
);
void
setPrimaryDisplayname
(
const
QString
&
display
N
ame
);
QString
getPrimarySipAddress
()
const
;
...
...
linphone-desktop/ui/views/App/Main/Assistant/CreateLinphoneSipAccountWithEmail.qml
View file @
b61cb100
...
...
@@ -45,6 +45,14 @@ AssistantAbstractView {
onTextChanged
:
assistantModel
.
username
=
text
}
}
FormGroup
{
label
:
qsTr
(
'
displayNameLabel
'
)
TextField
{
onTextChanged
:
assistantModel
.
displayName
=
text
}
}
}
FormLine
{
...
...
linphone-desktop/ui/views/App/Main/Assistant/CreateLinphoneSipAccountWithPhoneNumber.qml
View file @
b61cb100
...
...
@@ -49,6 +49,16 @@ AssistantAbstractView {
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
displayNameLabel
'
)
TextField
{
onTextChanged
:
assistantModel
.
displayName
=
text
}
}
}
}
// ---------------------------------------------------------------------------
...
...
linphone-desktop/ui/views/App/Settings/SettingsSipAccounts.qml
View file @
b61cb100
...
...
@@ -25,12 +25,12 @@ TabContainer {
FormLine
{
FormGroup
{
label
:
qsTr
(
'
defaultDisplay
n
ameLabel
'
)
label
:
qsTr
(
'
defaultDisplay
N
ameLabel
'
)
TextField
{
text
:
AccountSettingsModel
.
primary
Displayn
ame
text
:
AccountSettingsModel
.
primary
displayN
ame
onEditingFinished
:
AccountSettingsModel
.
primary
Displayn
ame
=
text
onEditingFinished
:
AccountSettingsModel
.
primary
displayN
ame
=
text
}
}
}
...
...
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