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
7cf7ad83
Commit
7cf7ad83
authored
May 09, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Main/Assistant/FetchRemoteConfiguration): view done
parent
0106e497
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
11 deletions
+85
-11
en.ts
linphone-desktop/assets/languages/en.ts
+8
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+8
-0
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+13
-0
SettingsModel.hpp
linphone-desktop/src/components/settings/SettingsModel.hpp
+8
-0
FetchRemoteConfiguration.qml
.../ui/views/App/Main/Assistant/FetchRemoteConfiguration.qml
+48
-11
No files found.
linphone-desktop/assets/languages/en.ts
View file @
7cf7ad83
...
...
@@ -610,6 +610,14 @@ Server url not configured.</translation>
<
source
>
urlLabel
<
/source
>
<
translation
>
URL
<
/translation
>
<
/message
>
<
message
>
<
source
>
remoteProvisioningError
<
/source
>
<
translation
>
Unable
to
set
this
remote
provisioning
uri
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
remoteProvisioningUpdateDescription
<
/source
>
<
translation
>
It
&
apos
;
s
necessary
to
restart
the
application
.
Do
you
want
to
restart
now
?
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
FileMessage
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
7cf7ad83
...
...
@@ -610,6 +610,14 @@ Url du serveur non configurée.</translation>
<
source
>
urlLabel
<
/source
>
<
translation
>
URL
<
/translation
>
<
/message
>
<
message
>
<
source
>
remoteProvisioningError
<
/source
>
<
translation
>
Impossible
d
&
apos
;
utiliser
cette
URL
de
configuration
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
remoteProvisioningUpdateDescription
<
/source
>
<
translation
>
Voulez
-
vous
red
é
marrer
maintenant
pour
prendre
en
compte
ces
modifications
?
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
FileMessage
<
/name
>
...
...
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
7cf7ad83
...
...
@@ -645,3 +645,16 @@ void SettingsModel::setSavedVideosFolder (const QString &folder) {
mConfig
->
setString
(
UI_SECTION
,
"saved_videos_folder"
,
::
Utils
::
qStringToLinphoneString
(
_folder
));
emit
savedVideosFolderChanged
(
_folder
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getRemoteProvisioning
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getProvisioningUri
());
}
void
SettingsModel
::
setRemoteProvisioning
(
const
QString
&
remoteProvisioning
)
{
if
(
!
CoreManager
::
getInstance
()
->
getCore
()
->
setProvisioningUri
(
::
Utils
::
qStringToLinphoneString
(
remoteProvisioning
)))
emit
remoteProvisioningChanged
(
remoteProvisioning
);
else
emit
remoteProvisioningNotChanged
(
remoteProvisioning
);
}
linphone-desktop/src/components/settings/SettingsModel.hpp
View file @
7cf7ad83
...
...
@@ -111,6 +111,8 @@ class SettingsModel : public QObject {
// Misc. ---------------------------------------------------------------------
Q_PROPERTY
(
QString
remoteProvisioning
READ
getRemoteProvisioning
WRITE
setRemoteProvisioning
NOTIFY
remoteProvisioningChanged
);
Q_PROPERTY
(
QString
savedScreenshotsFolder
READ
getSavedScreenshotsFolder
WRITE
setSavedScreenshotsFolder
NOTIFY
savedScreenshotsFolderChanged
);
Q_PROPERTY
(
QString
savedVideosFolder
READ
getSavedVideosFolder
WRITE
setSavedVideosFolder
NOTIFY
savedVideosFolderChanged
);
...
...
@@ -262,6 +264,9 @@ public:
QString
getSavedVideosFolder
()
const
;
void
setSavedVideosFolder
(
const
QString
&
folder
);
QString
getRemoteProvisioning
()
const
;
void
setRemoteProvisioning
(
const
QString
&
remoteProvisioning
);
// ---------------------------------------------------------------------------
static
const
std
::
string
UI_SECTION
;
...
...
@@ -335,6 +340,9 @@ signals:
void
savedScreenshotsFolderChanged
(
const
QString
&
folder
);
void
savedVideosFolderChanged
(
const
QString
&
folder
);
void
remoteProvisioningChanged
(
const
QString
&
remoteProvisioning
);
void
remoteProvisioningNotChanged
(
const
QString
&
remoteProvisioning
);
private:
std
::
shared_ptr
<
linphone
::
Config
>
mConfig
;
};
...
...
linphone-desktop/ui/views/App/Main/Assistant/FetchRemoteConfiguration.qml
View file @
7cf7ad83
import
QtQuick
2.7
import
Common
1.0
import
Linphone
1.0
import
Utils
1.0
// =============================================================================
AssistantAbstractView
{
mainAction
:
(
function
()
{
App
.
restart
()
})
mainAction
:
requestBlock
.
execute
mainActionEnabled
:
url
.
text
.
length
>
0
mainActionLabel
:
qsTr
(
'
confirmAction
'
)
...
...
@@ -15,18 +15,55 @@ AssistantAbstractView {
// ---------------------------------------------------------------------------
Form
{
Connections
{
target
:
SettingsModel
onRemoteProvisioningChanged
:
{
requestBlock
.
stop
(
''
)
window
.
detachVirtualWindow
()
window
.
attachVirtualWindow
(
Utils
.
buildDialogUri
(
'
ConfirmDialog
'
),
{
descriptionText
:
qsTr
(
'
remoteProvisioningUpdateDescription
'
),
},
function
(
status
)
{
if
(
status
)
{
App
.
restart
()
}
else
{
window
.
setView
(
'
Home
'
)
}
})
}
onRemoteProvisioningNotChanged
:
requestBlock
.
stop
(
qsTr
(
'
remoteProvisioningError
'
))
}
// ---------------------------------------------------------------------------
Column
{
anchors.fill
:
parent
orientation
:
Qt
.
Vertical
FormLine
{
FormGroup
{
label
:
qsTr
(
'
urlLabel
'
)
Form
{
orientation
:
Qt
.
Vertical
width
:
parent
.
width
FormLine
{
FormGroup
{
label
:
qsTr
(
'
urlLabel
'
)
TextField
{
id
:
url
TextField
{
id
:
url
}
}
}
}
RequestBlock
{
id
:
requestBlock
action
:
(
function
()
{
SettingsModel
.
remoteProvisioning
=
url
.
text
})
width
:
parent
.
width
}
}
}
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