diff --git a/assets/languages/de.ts b/assets/languages/de.ts index 50edeb4d2..95dfa9647 100644 --- a/assets/languages/de.ts +++ b/assets/languages/de.ts @@ -76,6 +76,22 @@ commandLineDescription sende einen Befehl zur Anwendung für eine Kommandozeile + + restore + + + + quit + Schließen + + + settings + Einstellungen + + + about + Über + AssistantAbstractView diff --git a/assets/languages/en.ts b/assets/languages/en.ts index 8e1c64231..4f2a32568 100644 --- a/assets/languages/en.ts +++ b/assets/languages/en.ts @@ -76,6 +76,22 @@ commandLineDescription send an order to the application towards a command line + + restore + Restore + + + quit + Quit + + + settings + Preferences + + + about + About + AssistantAbstractView diff --git a/assets/languages/fr_FR.ts b/assets/languages/fr_FR.ts index 2b550df80..9df3bfa31 100644 --- a/assets/languages/fr_FR.ts +++ b/assets/languages/fr_FR.ts @@ -76,6 +76,22 @@ commandLineDescription envoie un ordre à l'application Linphone, voir --cli-help pour plus de détails + + restore + Restorer + + + quit + Quitter + + + settings + Préférences + + + about + À propos + AssistantAbstractView diff --git a/assets/languages/ja.ts b/assets/languages/ja.ts index bed886662..aa945f8fb 100644 --- a/assets/languages/ja.ts +++ b/assets/languages/ja.ts @@ -76,6 +76,22 @@ commandLineDescription + + restore + + + + quit + 終了 + + + settings + 設定 + + + about + + AssistantAbstractView diff --git a/assets/languages/lt.ts b/assets/languages/lt.ts index 7a6f02a50..b3424ce45 100644 --- a/assets/languages/lt.ts +++ b/assets/languages/lt.ts @@ -76,6 +76,22 @@ commandLineDescription siųsti programai įsakymą į komandų eilutę + + restore + + + + quit + Išeiti + + + settings + Nuostatos + + + about + Apie + AssistantAbstractView diff --git a/assets/languages/pt_BR.ts b/assets/languages/pt_BR.ts index 86248897c..f16dae3f8 100644 --- a/assets/languages/pt_BR.ts +++ b/assets/languages/pt_BR.ts @@ -76,6 +76,22 @@ commandLineDescription enviar um pedido para o aplicativo em direção a uma linha de comando + + restore + + + + quit + Sair + + + settings + Preferências + + + about + Sobre + AssistantAbstractView diff --git a/assets/languages/ru.ts b/assets/languages/ru.ts index 7a6ba8437..a7c74466f 100644 --- a/assets/languages/ru.ts +++ b/assets/languages/ru.ts @@ -76,6 +76,22 @@ commandLineDescription отправка команды приложения через командную строку + + restore + + + + quit + Выйти + + + settings + Настройки + + + about + О программе + AssistantAbstractView diff --git a/assets/languages/sv.ts b/assets/languages/sv.ts index cc4d7afa6..28d744c38 100644 --- a/assets/languages/sv.ts +++ b/assets/languages/sv.ts @@ -76,6 +76,22 @@ commandLineDescription + + restore + + + + quit + Avsluta + + + settings + Inställningar + + + about + Om + AssistantAbstractView diff --git a/assets/languages/tr.ts b/assets/languages/tr.ts index 5a82113c8..d620b8475 100644 --- a/assets/languages/tr.ts +++ b/assets/languages/tr.ts @@ -76,6 +76,22 @@ commandLineDescription komut satırıyla uygulamaya emir gönder + + restore + + + + quit + Çıkış + + + settings + Tercihler + + + about + Hakkında + AssistantAbstractView diff --git a/src/app/App.cpp b/src/app/App.cpp index c07aa1614..0f204d256 100644 --- a/src/app/App.cpp +++ b/src/app/App.cpp @@ -63,6 +63,9 @@ namespace { constexpr int VersionUpdateCheckInterval = 86400000; // 24 hours in milliseconds. constexpr char MainQmlUri[] = "Linphone"; + + constexpr char AttachVirtualWindowMethodName[] = "attachVirtualWindow"; + constexpr char AboutPath[] = "qrc:/ui/views/App/Main/Dialogs/About.qml"; } static inline bool installLocale (App &app, QTranslator &translator, const QLocale &locale) { @@ -463,14 +466,28 @@ void App::setTrayIcon () { QSystemTrayIcon *systemTrayIcon = new QSystemTrayIcon(mEngine); // trayIcon: Right click actions. - QAction *quitAction = new QAction("Quit", root); - root->connect(quitAction, &QAction::triggered, this, &App::quit); + QAction *settingsAction = new QAction(tr("settings"), root); + root->connect(settingsAction, &QAction::triggered, root, [this] { + App::smartShowWindow(getSettingsWindow()); + }); - QAction *restoreAction = new QAction("Restore", root); + QAction *aboutAction = new QAction(tr("about"), root); + root->connect(aboutAction, &QAction::triggered, root, [root] { + App::smartShowWindow(root); + QMetaObject::invokeMethod( + root, AttachVirtualWindowMethodName, Qt::DirectConnection, + Q_ARG(QVariant, QUrl(AboutPath)), Q_ARG(QVariant, QVariant()), Q_ARG(QVariant, QVariant()) + ); + }); + + QAction *restoreAction = new QAction(tr("restore"), root); root->connect(restoreAction, &QAction::triggered, root, [root] { smartShowWindow(root); }); + QAction *quitAction = new QAction(tr("quit"), root); + root->connect(quitAction, &QAction::triggered, this, &App::quit); + // trayIcon: Left click actions. QMenu *menu = new QMenu(); root->connect(systemTrayIcon, &QSystemTrayIcon::activated, [root]( @@ -485,6 +502,9 @@ void App::setTrayIcon () { }); // Build trayIcon menu. + menu->addAction(settingsAction); + menu->addAction(aboutAction); + menu->addSeparator(); menu->addAction(restoreAction); menu->addSeparator(); menu->addAction(quitAction); diff --git a/ui/modules/Common/Window/ApplicationWindow.qml b/ui/modules/Common/Window/ApplicationWindow.qml index b9fbac6df..203032d87 100644 --- a/ui/modules/Common/Window/ApplicationWindow.qml +++ b/ui/modules/Common/Window/ApplicationWindow.qml @@ -19,8 +19,8 @@ ApplicationWindow { // --------------------------------------------------------------------------- - function attachVirtualWindow () { - Logic.attachVirtualWindow.apply(this, arguments) + function attachVirtualWindow (component, properties, exitStatusHandler) { + Logic.attachVirtualWindow.call(this, component, properties, exitStatusHandler) } function detachVirtualWindow () { diff --git a/ui/modules/Common/Window/Window.qml b/ui/modules/Common/Window/Window.qml index b27de3e0e..9d4f913f5 100644 --- a/ui/modules/Common/Window/Window.qml +++ b/ui/modules/Common/Window/Window.qml @@ -19,8 +19,8 @@ Window { // --------------------------------------------------------------------------- - function attachVirtualWindow () { - Logic.attachVirtualWindow.apply(this, arguments) + function attachVirtualWindow (component, properties, exitStatusHandler) { + Logic.attachVirtualWindow.call(this, component, properties, exitStatusHandler) } function detachVirtualWindow () {