Commit e3401603 authored by Ghislain MARY's avatar Ghislain MARY

Add --iconified command line option.

parent 87363226
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
<source>applicationDescription</source> <source>applicationDescription</source>
<translation>A free SIP video-phone</translation> <translation>A free SIP video-phone</translation>
</message> </message>
<message>
<source>commandLineOptionIconified</source>
<translation>Start in the system tray, do not show the main interface.</translation>
</message>
</context> </context>
<context> <context>
<name>CallControls</name> <name>CallControls</name>
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
<source>applicationDescription</source> <source>applicationDescription</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>commandLineOptionIconified</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CallControls</name> <name>CallControls</name>
......
...@@ -151,6 +151,10 @@ void App::initContentApp () { ...@@ -151,6 +151,10 @@ void App::initContentApp () {
} }
} }
bool App::isInitiallyIconified () const {
return m_parser.isSet("iconified");
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void App::parseArgs () { void App::parseArgs () {
...@@ -159,6 +163,9 @@ void App::parseArgs () { ...@@ -159,6 +163,9 @@ void App::parseArgs () {
m_parser.addVersionOption(); m_parser.addVersionOption();
m_parser.addOptions({ m_parser.addOptions({
{ "config", tr("commandLineOptionConfig"), "file" }, { "config", tr("commandLineOptionConfig"), "file" },
#ifndef __APPLE__
{ "iconified", tr("commandLineOptionIconified") },
#endif // __APPLE__
{ "selftest", tr("commandLineOptionSelftest") }, { "selftest", tr("commandLineOptionSelftest") },
{ { "V", "verbose" }, tr("commandLineOptionVerbose") } { { "V", "verbose" }, tr("commandLineOptionVerbose") }
}); });
......
...@@ -58,6 +58,8 @@ public: ...@@ -58,6 +58,8 @@ public:
void initContentApp (); void initContentApp ();
Q_INVOKABLE bool isInitiallyIconified () const;
Q_INVOKABLE QString locale () const { Q_INVOKABLE QString locale () const {
return m_locale; return m_locale;
} }
......
...@@ -105,6 +105,9 @@ Controls1.ApplicationWindow { ...@@ -105,6 +105,9 @@ Controls1.ApplicationWindow {
Component.onCompleted: Utils.setTimeout(window, 0, function () { Component.onCompleted: Utils.setTimeout(window, 0, function () {
_setView('Home') _setView('Home')
if (App.isInitiallyIconified()) {
window.hide()
}
}) })
onActiveFocusItemChanged: activeFocusItem == null && smartSearchBar.hideMenu() 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