diff --git a/linphone-desktop/assets/languages/en.ts b/linphone-desktop/assets/languages/en.ts index fc6ee78b3..69d2f1071 100644 --- a/linphone-desktop/assets/languages/en.ts +++ b/linphone-desktop/assets/languages/en.ts @@ -23,6 +23,10 @@ applicationDescription A free SIP video-phone + + commandLineOptionIconified + Start in the system tray, do not show the main interface. + CallControls diff --git a/linphone-desktop/assets/languages/fr.ts b/linphone-desktop/assets/languages/fr.ts index c74398bbe..2a56cb8e4 100644 --- a/linphone-desktop/assets/languages/fr.ts +++ b/linphone-desktop/assets/languages/fr.ts @@ -23,6 +23,10 @@ applicationDescription + + commandLineOptionIconified + + CallControls diff --git a/linphone-desktop/src/app/App.cpp b/linphone-desktop/src/app/App.cpp index 4300b494f..f4611932c 100644 --- a/linphone-desktop/src/app/App.cpp +++ b/linphone-desktop/src/app/App.cpp @@ -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") } }); diff --git a/linphone-desktop/src/app/App.hpp b/linphone-desktop/src/app/App.hpp index f8527151b..75dd6336c 100644 --- a/linphone-desktop/src/app/App.hpp +++ b/linphone-desktop/src/app/App.hpp @@ -58,6 +58,8 @@ public: void initContentApp (); + Q_INVOKABLE bool isInitiallyIconified () const; + Q_INVOKABLE QString locale () const { return m_locale; } diff --git a/linphone-desktop/ui/views/App/Main/MainWindow.qml b/linphone-desktop/ui/views/App/Main/MainWindow.qml index 7c6c307e5..d5103b6e4 100644 --- a/linphone-desktop/ui/views/App/Main/MainWindow.qml +++ b/linphone-desktop/ui/views/App/Main/MainWindow.qml @@ -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()