mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Make sure the hide/show text in the tray icon menu is correct
This commit is contained in:
parent
4bd2641d70
commit
24ab195d2f
2 changed files with 7 additions and 2 deletions
|
@ -714,7 +714,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
|||
hide();
|
||||
}
|
||||
}
|
||||
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
||||
}
|
||||
|
||||
// Display About Dialog
|
||||
|
@ -1209,12 +1208,17 @@ void MainWindow::updateAltSpeedsBtn(bool alternative) {
|
|||
actionUse_alternative_speed_limits->setChecked(alternative);
|
||||
}
|
||||
|
||||
void MainWindow::updateTrayIconMenu()
|
||||
{
|
||||
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
||||
}
|
||||
|
||||
QMenu* MainWindow::getTrayIconMenu() {
|
||||
if(myTrayIconMenu)
|
||||
return myTrayIconMenu;
|
||||
// Tray icon Menu
|
||||
myTrayIconMenu = new QMenu(this);
|
||||
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
||||
connect(myTrayIconMenu, SIGNAL(aboutToShow()), SLOT(updateTrayIconMenu()));
|
||||
myTrayIconMenu->addAction(actionToggleVisibility);
|
||||
myTrayIconMenu->addSeparator();
|
||||
myTrayIconMenu->addAction(actionOpen);
|
||||
|
|
|
@ -111,6 +111,7 @@ protected slots:
|
|||
void notifyOfUpdate(QString);
|
||||
void showConnectionSettings();
|
||||
void minimizeWindow();
|
||||
void updateTrayIconMenu();
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayTransferTab() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue