Browse Source

Make sure the hide/show text in the tray icon menu is correct

adaptive-webui-19844
Christophe Dumez 13 years ago
parent
commit
7b4b2fe0f5
  1. 8
      src/mainwindow.cpp
  2. 1
      src/mainwindow.h

8
src/mainwindow.cpp

@ -715,7 +715,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) { @@ -715,7 +715,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
hide();
}
}
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
}
// Display About Dialog
@ -1193,12 +1192,17 @@ void MainWindow::updateAltSpeedsBtn(bool alternative) { @@ -1193,12 +1192,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);

1
src/mainwindow.h

@ -111,6 +111,7 @@ protected slots: @@ -111,6 +111,7 @@ protected slots:
void notifyOfUpdate(QString);
void showConnectionSettings();
void minimizeWindow();
void updateTrayIconMenu();
// Keyboard shortcuts
void createKeyboardShortcuts();
void displayTransferTab() const;

Loading…
Cancel
Save