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
c3f2d693
Commit
c3f2d693
authored
Jun 14, 2017
by
Jehan Monnier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_linphone_qt' of git.linphone.org:linphone-desktop-private into dev_linphone_qt
parents
a7bfae9c
ba15723a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
64 deletions
+103
-64
Info.plist.in
cmake_builder/linphone_package/Info.plist.in
+4
-0
en.ts
linphone-desktop/assets/languages/en.ts
+8
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+8
-0
linphone.desktop
linphone-desktop/linphone.desktop
+2
-2
App.cpp
linphone-desktop/src/app/App.cpp
+61
-44
App.hpp
linphone-desktop/src/app/App.hpp
+4
-2
SearchBox.qml
linphone-desktop/ui/modules/Common/Form/SearchBox.qml
+1
-1
SmartSearchBar.qml
...top/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml
+14
-14
linphone
submodules/linphone
+1
-1
No files found.
cmake_builder/linphone_package/Info.plist.in
View file @
c3f2d693
...
...
@@ -4,6 +4,10 @@
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
English
</string>
<key>
CFBundleName
</key>
<string>
Linphone
</string>
<key>
CFBundleDisplayName
</key>
<string>
Linphone
</string>
<key>
CFBundleExecutable
</key>
<string>
linphone
</string>
<key>
CFBundleGetInfoString
</key>
...
...
linphone-desktop/assets/languages/en.ts
View file @
c3f2d693
...
...
@@ -76,6 +76,14 @@
<
source
>
commandLineOptionCmdArg
<
/source
>
<
translation
>
command
line
<
/translation
>
<
/message
>
<
message
>
<
source
>
commandLineOptionHelp
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
commandLineOptionVersion
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
AssistantAbstractView
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
c3f2d693
...
...
@@ -76,6 +76,14 @@
<
source
>
commandLineOptionCmdArg
<
/source
>
<
translation
>
ligne
de
commande
<
/translation
>
<
/message
>
<
message
>
<
source
>
commandLineOptionHelp
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
commandLineOptionVersion
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
AssistantAbstractView
<
/name
>
...
...
linphone-desktop/linphone.desktop
View file @
c3f2d693
[Desktop Entry]
Name=Linphone
GenericName=
Web-p
hone
Comment=Linphone is a
web-phone
GenericName=
SIP P
hone
Comment=Linphone is a
libre SIP client
Type=Application
Exec=linphone %u
Icon=linphone
...
...
linphone-desktop/src/app/App.cpp
View file @
c3f2d693
...
...
@@ -20,6 +20,7 @@
* Author: Ronan Abhamon
*/
#include <QCommandLineParser>
#include <QDir>
#include <QFileSelector>
#include <QMenu>
...
...
@@ -74,44 +75,33 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true) {
parseArgs
();
// Initialize logger. (Do not do this before this point because the
// application has to be created for the logs to be put in the correct
// directory.)
Logger
::
init
();
if
(
mParser
->
isSet
(
"verbose"
))
Logger
::
getInstance
()
->
setVerbose
(
true
);
// List available locales.
for
(
const
auto
&
locale
:
QDir
(
LANGUAGES_PATH
).
entryList
())
mAvailableLocales
<<
QLocale
(
locale
);
// Init locale.
mTranslator
=
new
DefaultTranslator
(
this
);
initLocale
();
// Try to use preferred locale.
QString
locale
=
::
Utils
::
coreStringToAppString
(
linphone
::
Config
::
newWithFactory
(
Paths
::
getConfigFilePath
(
mParser
.
value
(
"config"
),
false
),
""
)
->
getString
(
SettingsModel
::
UI_SECTION
,
"locale"
,
""
)
);
if
(
!
locale
.
isEmpty
()
&&
installLocale
(
*
this
,
*
mTranslator
,
QLocale
(
locale
)))
{
mLocale
=
locale
;
qInfo
()
<<
QStringLiteral
(
"Use preferred locale: %1"
).
arg
(
locale
);
return
;
}
// Try to use system locale.
QLocale
sysLocale
=
QLocale
::
system
();
if
(
installLocale
(
*
this
,
*
mTranslator
,
sysLocale
))
{
mLocale
=
sysLocale
.
name
();
qInfo
()
<<
QStringLiteral
(
"Use system locale: %1"
).
arg
(
mLocale
);
return
;
}
parseArgs
();
// Use english.
mLocale
=
DEFAULT_LOCALE
;
if
(
!
installLocale
(
*
this
,
*
mTranslator
,
QLocale
(
mLocale
)))
qFatal
(
"Unable to install default translator."
);
qInfo
()
<<
QStringLiteral
(
"Use default locale: %1"
).
arg
(
mLocale
);
if
(
mParser
->
isSet
(
"help"
))
mParser
->
showHelp
();
if
(
mParser
->
isSet
(
"version"
))
mParser
->
showVersion
();
}
App
::~
App
()
{
qInfo
()
<<
QStringLiteral
(
"Destroying app..."
);
delete
mEngine
;
delete
mParser
;
}
// -----------------------------------------------------------------------------
...
...
@@ -167,7 +157,7 @@ void App::initContentApp () {
}
// Init core.
CoreManager
::
init
(
this
,
mParser
.
value
(
"config"
));
CoreManager
::
init
(
this
,
mParser
->
value
(
"config"
));
// Init engine content.
mEngine
=
new
QQmlApplicationEngine
();
...
...
@@ -193,7 +183,7 @@ void App::initContentApp () {
createNotifier
();
// Load splashscreen.
bool
selfTest
=
mParser
.
isSet
(
"self-test"
);
bool
selfTest
=
mParser
->
isSet
(
"self-test"
);
if
(
!
selfTest
)
activeSplashScreen
(
this
);
// Set a self test limit.
...
...
@@ -218,7 +208,7 @@ void App::initContentApp () {
// -----------------------------------------------------------------------------
QString
App
::
getCommandArgument
()
{
return
mParser
.
value
(
"cmd"
);
return
mParser
->
value
(
"cmd"
);
}
// -----------------------------------------------------------------------------
...
...
@@ -282,10 +272,15 @@ bool App::hasFocus () const {
// -----------------------------------------------------------------------------
void
App
::
parseArgs
()
{
mParser
.
setApplicationDescription
(
tr
(
"applicationDescription"
));
mParser
.
addHelpOption
();
mParser
.
addVersionOption
();
mParser
.
addOptions
({
if
(
mParser
)
delete
mParser
;
mParser
=
new
QCommandLineParser
();
mParser
->
setApplicationDescription
(
tr
(
"applicationDescription"
));
mParser
->
addOptions
({
{
{
"h"
,
"help"
},
tr
(
"commandLineOptionHelp"
)
},
{
{
"v"
,
"version"
},
tr
(
"commandLineOptionVersion"
)
},
{
"config"
,
tr
(
"commandLineOptionConfig"
),
tr
(
"commandLineOptionConfigArg"
)
},
#ifndef Q_OS_MACOS
{
"iconified"
,
tr
(
"commandLineOptionIconified"
)
},
...
...
@@ -295,15 +290,7 @@ void App::parseArgs () {
{
{
"c"
,
"cmd"
},
tr
(
"commandLineOptionCmd"
),
tr
(
"commandLineOptionCmdArg"
)
}
});
mParser
.
process
(
*
this
);
// Initialize logger. (Do not do this before this point because the
// application has to be created for the logs to be put in the correct
// directory.)
Logger
::
init
();
if
(
mParser
.
isSet
(
"verbose"
))
{
Logger
::
getInstance
()
->
setVerbose
(
true
);
}
mParser
->
process
(
*
this
);
}
// -----------------------------------------------------------------------------
...
...
@@ -448,6 +435,36 @@ void App::createNotifier () {
// -----------------------------------------------------------------------------
void
App
::
initLocale
()
{
// Try to use preferred locale.
QString
locale
=
::
Utils
::
coreStringToAppString
(
linphone
::
Config
::
newWithFactory
(
Paths
::
getConfigFilePath
(
mParser
->
value
(
"config"
),
false
),
""
)
->
getString
(
SettingsModel
::
UI_SECTION
,
"locale"
,
""
)
);
if
(
!
locale
.
isEmpty
()
&&
installLocale
(
*
this
,
*
mTranslator
,
QLocale
(
locale
)))
{
mLocale
=
locale
;
qInfo
()
<<
QStringLiteral
(
"Use preferred locale: %1"
).
arg
(
locale
);
return
;
}
// Try to use system locale.
QLocale
sysLocale
=
QLocale
::
system
();
if
(
installLocale
(
*
this
,
*
mTranslator
,
sysLocale
))
{
mLocale
=
sysLocale
.
name
();
qInfo
()
<<
QStringLiteral
(
"Use system locale: %1"
).
arg
(
mLocale
);
return
;
}
// Use english.
mLocale
=
DEFAULT_LOCALE
;
if
(
!
installLocale
(
*
this
,
*
mTranslator
,
QLocale
(
mLocale
)))
qFatal
(
"Unable to install default translator."
);
qInfo
()
<<
QStringLiteral
(
"Use default locale: %1"
).
arg
(
mLocale
);
}
QString
App
::
getConfigLocale
()
const
{
return
::
Utils
::
coreStringToAppString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getConfig
()
->
getString
(
...
...
@@ -482,7 +499,7 @@ void App::openAppAfterInit () {
else
setTrayIcon
();
if
(
!
mParser
.
isSet
(
"iconified"
))
if
(
!
mParser
->
isSet
(
"iconified"
))
smartShowWindow
(
mainWindow
);
#else
smartShowWindow
(
mainWindow
);
...
...
@@ -508,7 +525,7 @@ void App::openAppAfterInit () {
// -----------------------------------------------------------------------------
void
App
::
quit
()
{
if
(
mParser
.
isSet
(
"self-test"
))
if
(
mParser
->
isSet
(
"self-test"
))
cout
<<
tr
(
"selfTestResult"
).
toStdString
()
<<
endl
;
QApplication
::
quit
();
...
...
linphone-desktop/src/app/App.hpp
View file @
c3f2d693
...
...
@@ -23,7 +23,6 @@
#ifndef APP_H_
#define APP_H_
#include <QCommandLineParser>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
...
...
@@ -36,6 +35,7 @@
class
Cli
;
class
DefaultTranslator
;
class
QCommandLineParser
;
class
App
:
public
SingleApplication
{
Q_OBJECT
;
...
...
@@ -96,6 +96,8 @@ private:
void
setTrayIcon
();
void
createNotifier
();
void
initLocale
();
QString
getConfigLocale
()
const
;
void
setConfigLocale
(
const
QString
&
locale
);
...
...
@@ -111,7 +113,7 @@ private:
return
qVersion
();
}
QCommandLineParser
mParse
r
;
QCommandLineParser
*
mParser
=
nullpt
r
;
QVariantList
mAvailableLocales
;
QString
mLocale
;
...
...
linphone-desktop/ui/modules/Common/Form/SearchBox.qml
View file @
c3f2d693
...
...
@@ -69,8 +69,8 @@ Item {
Keys.onEscapePressed
:
searchBox
.
closeMenu
()
Keys.onReturnPressed
:
{
searchBox
.
closeMenu
()
searchBox
.
enterPressed
()
searchBox
.
closeMenu
()
}
onActiveFocusChanged
:
{
...
...
linphone-desktop/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml
View file @
c3f2d693
...
...
@@ -6,11 +6,11 @@ import Linphone.Styles 1.0
// =============================================================================
SearchBox
{
id
:
searchB
ar
id
:
searchB
ox
// ---------------------------------------------------------------------------
readonly
property
alias
isOpen
:
searchB
ar
.
_isOpen
readonly
property
alias
isOpen
:
searchB
ox
.
_isOpen
// ---------------------------------------------------------------------------
...
...
@@ -29,7 +29,7 @@ SearchBox {
onEnterPressed
:
{
var
sipAddress
=
view
.
interpretableSipAddress
return
sipAddress
.
length
>
0
&&
searchB
ar
.
launchCall
(
sipAddress
)
return
sipAddress
.
length
>
0
&&
searchB
ox
.
launchCall
(
sipAddress
)
}
// ---------------------------------------------------------------------------
...
...
@@ -40,37 +40,37 @@ SearchBox {
actions
:
[{
icon
:
'
video_call
'
,
handler
:
function
(
entry
)
{
searchB
ar
.
closeMenu
()
searchB
ar
.
launchVideoCall
(
entry
.
sipAddress
)
searchB
ox
.
closeMenu
()
searchB
ox
.
launchVideoCall
(
entry
.
sipAddress
)
}
},
{
icon
:
'
call
'
,
handler
:
function
(
entry
)
{
searchB
ar
.
closeMenu
()
searchB
ar
.
launchCall
(
entry
.
sipAddress
)
searchB
ox
.
closeMenu
()
searchB
ox
.
launchCall
(
entry
.
sipAddress
)
}
},
{
icon
:
'
chat
'
,
handler
:
function
(
entry
)
{
searchB
ar
.
closeMenu
()
searchB
ar
.
launchChat
(
entry
.
sipAddress
)
searchB
ox
.
closeMenu
()
searchB
ox
.
launchChat
(
entry
.
sipAddress
)
}
}]
headerButtonDescription
:
qsTr
(
'
addContact
'
)
headerButtonIcon
:
'
contact_add
'
headerButtonAction
:
(
function
(
sipAddress
)
{
searchB
ar
.
closeMenu
()
searchB
ar
.
addContact
(
sipAddress
)
searchB
ox
.
closeMenu
()
searchB
ox
.
addContact
(
sipAddress
)
})
genSipAddress
:
searchB
ar
.
filter
genSipAddress
:
searchB
ox
.
filter
model
:
SipAddressesProxyModel
{}
onEntryClicked
:
{
searchB
ar
.
closeMenu
()
searchB
ar
.
entryClicked
(
entry
)
searchB
ox
.
closeMenu
()
searchB
ox
.
entryClicked
(
entry
)
}
}
}
linphone
@
4c291e2c
Subproject commit
3841f9c417019448118208291470232f7e20d60f
Subproject commit
4c291e2c5a32711a1176459d74ed405cf225f706
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