Commit e3401603 authored by Ghislain MARY's avatar Ghislain MARY

Add --iconified command line option.

parent 87363226
......@@ -23,6 +23,10 @@
<source>applicationDescription</source>
<translation>A free SIP video-phone</translation>
</message>
<message>
<source>commandLineOptionIconified</source>
<translation>Start in the system tray, do not show the main interface.</translation>
</message>
</context>
<context>
<name>CallControls</name>
......
......@@ -23,6 +23,10 @@
<source>applicationDescription</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>commandLineOptionIconified</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CallControls</name>
......
......@@ -151,6 +151,10 @@ void App::initContentApp () {
}
}
bool App::isInitiallyIconified () const {
return m_parser.isSet("iconified");
}
// -----------------------------------------------------------------------------
void App::parseArgs () {
......@@ -159,6 +163,9 @@ void App::parseArgs () {
m_parser.addVersionOption();
m_parser.addOptions({
{ "config", tr("commandLineOptionConfig"), "file" },
#ifndef __APPLE__
{ "iconified", tr("commandLineOptionIconified") },
#endif // __APPLE__
{ "selftest", tr("commandLineOptionSelftest") },
{ { "V", "verbose" }, tr("commandLineOptionVerbose") }
});
......
......@@ -58,6 +58,8 @@ public:
void initContentApp ();
Q_INVOKABLE bool isInitiallyIconified () const;
Q_INVOKABLE QString locale () const {
return m_locale;
}
......
......@@ -105,6 +105,9 @@ Controls1.ApplicationWindow {
Component.onCompleted: Utils.setTimeout(window, 0, function () {
_setView('Home')
if (App.isInitiallyIconified()) {
window.hide()
}
})
onActiveFocusItemChanged: activeFocusItem == null && smartSearchBar.hideMenu()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment