Use custom application name in tray popup menu

This commit is contained in:
Alexey Minnekhanov 2018-02-05 14:11:07 +03:00
parent dc231f2e29
commit 1e3ac691eb
2 changed files with 5 additions and 5 deletions

View File

@ -31,9 +31,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
"lng_disable_notifications_from_tray" = "Disable notifications"; "lng_disable_notifications_from_tray" = "Disable notifications";
"lng_enable_notifications_from_tray" = "Enable notifications"; "lng_enable_notifications_from_tray" = "Enable notifications";
"lng_open_from_tray" = "Open Telegram"; "lng_open_from_tray" = "Open ";
"lng_minimize_to_tray" = "Minimize to tray"; "lng_minimize_to_tray" = "Minimize to tray";
"lng_quit_from_tray" = "Quit Telegram"; "lng_quit_from_tray" = "Quit ";
"lng_tray_icon_text" = "Telegram is still running here,\nyou can change this from settings page.\nIf this icon disappears from tray menu,\nyou can drag it here from hidden icons."; "lng_tray_icon_text" = "Telegram is still running here,\nyou can change this from settings page.\nIf this icon disappears from tray menu,\nyou can drag it here from hidden icons.";
"lng_month1" = "January"; "lng_month1" = "January";

View File

@ -166,14 +166,14 @@ void MainWindow::firstShow() {
: lng_enable_notifications_from_tray); : lng_enable_notifications_from_tray);
if (isLinux) { if (isLinux) {
trayIconMenu->addAction(lang(lng_open_from_tray), this, SLOT(showFromTray()))->setEnabled(true); trayIconMenu->addAction(lang(lng_open_from_tray) + QCoreApplication::applicationName(), this, SLOT(showFromTray()))->setEnabled(true);
trayIconMenu->addAction(lang(lng_minimize_to_tray), this, SLOT(minimizeToTray()))->setEnabled(true); trayIconMenu->addAction(lang(lng_minimize_to_tray), this, SLOT(minimizeToTray()))->setEnabled(true);
trayIconMenu->addAction(notificationActionText, this, SLOT(toggleDisplayNotifyFromTray()))->setEnabled(true); trayIconMenu->addAction(notificationActionText, this, SLOT(toggleDisplayNotifyFromTray()))->setEnabled(true);
trayIconMenu->addAction(lang(lng_quit_from_tray), this, SLOT(quitFromTray()))->setEnabled(true); trayIconMenu->addAction(lang(lng_quit_from_tray) + QCoreApplication::applicationName(), this, SLOT(quitFromTray()))->setEnabled(true);
} else { } else {
trayIconMenu->addAction(lang(lng_minimize_to_tray), this, SLOT(minimizeToTray()))->setEnabled(true); trayIconMenu->addAction(lang(lng_minimize_to_tray), this, SLOT(minimizeToTray()))->setEnabled(true);
trayIconMenu->addAction(notificationActionText, this, SLOT(toggleDisplayNotifyFromTray()))->setEnabled(true); trayIconMenu->addAction(notificationActionText, this, SLOT(toggleDisplayNotifyFromTray()))->setEnabled(true);
trayIconMenu->addAction(lang(lng_quit_from_tray), this, SLOT(quitFromTray()))->setEnabled(true); trayIconMenu->addAction(lang(lng_quit_from_tray) + QCoreApplication::applicationName(), this, SLOT(quitFromTray()))->setEnabled(true);
} }
Global::RefWorkMode().setForced(Global::WorkMode().value(), true); Global::RefWorkMode().setForced(Global::WorkMode().value(), true);