mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Add --iconified command line option.
This commit is contained in:
parent
8736322634
commit
e34016033a
5 changed files with 20 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue