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
17185312
Commit
17185312
authored
Mar 02, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsAudio): supports ring selection
parent
773a8c76
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
22 deletions
+62
-22
en.ts
linphone-desktop/assets/languages/en.ts
+4
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+4
-0
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+34
-17
SettingsModel.hpp
linphone-desktop/src/components/settings/SettingsModel.hpp
+7
-0
SettingsAudio.qml
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
+12
-0
SettingsUi.qml
linphone-desktop/ui/views/App/Settings/SettingsUi.qml
+0
-4
linphone
submodules/linphone
+1
-1
No files found.
linphone-desktop/assets/languages/en.ts
View file @
17185312
...
...
@@ -681,6 +681,10 @@ Server url not configured.</translation>
<
source
>
ringerDeviceLabel
<
/source
>
<
translation
>
Ringer
device
<
/translation
>
<
/message
>
<
message
>
<
source
>
ringLabel
<
/source
>
<
translation
>
Ring
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsCallsChat
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
17185312
...
...
@@ -691,6 +691,10 @@ Url du serveur non configurée.</translation>
<
source
>
ringerDeviceLabel
<
/source
>
<
translation
>
P
é
riph
é
rique
de
sonnerie
<
/translation
>
<
/message
>
<
message
>
<
source
>
ringLabel
<
/source
>
<
translation
>
Sonnerie
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsCallsChat
<
/name
>
...
...
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
17185312
...
...
@@ -45,17 +45,17 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
QVariantList
SettingsModel
::
getAudioCodecs
()
const
{
QVariantList
list
;
for
(
const
auto
&
codec
:
CoreManager
::
getInstance
()
->
getCore
()
->
getAudioCodecs
())
{
QVariantMap
map
;
map
[
"mime"
]
=
::
Utils
::
linphoneStringToQString
(
codec
->
getMimeType
());
map
[
"channels"
]
=
codec
->
getChannels
();
map
[
"bitrate"
]
=
codec
->
getNormalBitrate
();
map
[
"type"
]
=
codec
->
getType
();
map
[
"isVbr"
]
=
codec
->
isVbr
();
list
<<
map
;
}
//
for (const auto &codec : CoreManager::getInstance()->getCore()->getAudioCodecs()) {
//
QVariantMap map;
//
//
map["mime"] = ::Utils::linphoneStringToQString(codec->getMimeType());
//
map["channels"] = codec->getChannels();
//
map["bitrate"] = codec->getNormalBitrate();
//
map["type"] = codec->getType();
//
map["isVbr"] = codec->isVbr();
//
//
list << map;
//
}
return
list
;
}
...
...
@@ -121,6 +121,22 @@ void SettingsModel::setRingerDevice (const QString &device) {
emit
ringerDeviceChanged
(
device
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getRingPath
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getRing
());
}
void
SettingsModel
::
setRingPath
(
const
QString
&
path
)
{
QString
cleaned_path
=
QDir
::
cleanPath
(
path
);
CoreManager
::
getInstance
()
->
getCore
()
->
setRing
(
::
Utils
::
qStringToLinphoneString
(
cleaned_path
)
);
emit
ringPathChanged
(
cleaned_path
);
}
// =============================================================================
// Chat & calls.
// =============================================================================
...
...
@@ -442,10 +458,11 @@ void SettingsModel::setTurnPassword (const QString &password) {
shared_ptr
<
linphone
::
AuthInfo
>
auth_info
=
core
->
findAuthInfo
(
username
,
""
,
""
);
if
(
auth_info
)
{
shared_ptr
<
linphone
::
AuthInfo
>
_auth_info
=
auth_info
->
clone
();
shared_ptr
<
linphone
::
AuthInfo
>
auth_info_clone
=
auth_info
->
clone
();
auth_info_clone
->
setPasswd
(
::
Utils
::
qStringToLinphoneString
(
password
));
core
->
removeAuthInfo
(
auth_info
);
_auth_info
->
setPasswd
(
::
Utils
::
qStringToLinphoneString
(
password
));
core
->
addAuthInfo
(
_auth_info
);
core
->
addAuthInfo
(
auth_info_clone
);
}
else
{
auth_info
=
linphone
::
Factory
::
get
()
->
createAuthInfo
(
username
,
username
,
::
Utils
::
qStringToLinphoneString
(
password
),
""
,
""
,
""
);
core
->
addAuthInfo
(
auth_info
);
...
...
@@ -496,10 +513,10 @@ QString SettingsModel::getSavedScreenshotsFolder () const {
}
void
SettingsModel
::
setSavedScreenshotsFolder
(
const
QString
&
folder
)
{
QString
_folder
=
QDir
::
cleanPath
(
folder
)
+
QDir
::
separator
();
QString
cleaned
_folder
=
QDir
::
cleanPath
(
folder
)
+
QDir
::
separator
();
m_config
->
setString
(
UI_SECTION
,
"saved_screenshots_folder"
,
::
Utils
::
qStringToLinphoneString
(
_folder
));
emit
savedScreenshotsFolderChanged
(
_folder
);
m_config
->
setString
(
UI_SECTION
,
"saved_screenshots_folder"
,
::
Utils
::
qStringToLinphoneString
(
cleaned
_folder
));
emit
savedScreenshotsFolderChanged
(
cleaned
_folder
);
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/components/settings/SettingsModel.hpp
View file @
17185312
...
...
@@ -45,6 +45,8 @@ class SettingsModel : public QObject {
Q_PROPERTY
(
QString
playbackDevice
READ
getPlaybackDevice
WRITE
setPlaybackDevice
NOTIFY
playbackDeviceChanged
);
Q_PROPERTY
(
QString
ringerDevice
READ
getRingerDevice
WRITE
setRingerDevice
NOTIFY
ringerDeviceChanged
);
Q_PROPERTY
(
QString
ringPath
READ
getRingPath
WRITE
setRingPath
NOTIFY
ringPathChanged
);
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
...
...
@@ -137,6 +139,9 @@ public:
QString
getRingerDevice
()
const
;
void
setRingerDevice
(
const
QString
&
device
);
QString
getRingPath
()
const
;
void
setRingPath
(
const
QString
&
path
);
// Chat & calls. -------------------------------------------------------------
bool
getAutoAnswerStatus
()
const
;
...
...
@@ -235,6 +240,8 @@ signals:
void
playbackDeviceChanged
(
const
QString
&
device
);
void
ringerDeviceChanged
(
const
QString
&
device
);
void
ringPathChanged
(
const
QString
&
path
);
// Chat & calls. -------------------------------------------------------------
void
autoAnswerStatusChanged
(
bool
status
);
...
...
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
View file @
17185312
...
...
@@ -58,5 +58,17 @@ TabContainer {
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
ringLabel
'
)
FileChooserButton
{
selectedFile
:
SettingsModel
.
ringPath
onAccepted
:
SettingsModel
.
ringPath
=
selectedFile
}
}
}
}
}
linphone-desktop/ui/views/App/Settings/SettingsUi.qml
View file @
17185312
...
...
@@ -88,8 +88,6 @@ TabContainer {
label
:
qsTr
(
'
savedScreenshotsLabel
'
)
FileChooserButton
{
id
:
savedScreenshotsFolder
selectedFile
:
SettingsModel
.
savedScreenshotsFolder
selectFolder
:
true
...
...
@@ -101,8 +99,6 @@ TabContainer {
label
:
qsTr
(
'
savedVideosLabel
'
)
FileChooserButton
{
id
:
savedVideosFolder
selectedFile
:
SettingsModel
.
savedVideosFolder
selectFolder
:
true
...
...
linphone
@
66e40d83
Subproject commit
8599aec3e5cf04afa3780885ffd78a3063abed22
Subproject commit
66e40d839c0705fcb673922e5b142cbc633c3680
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