diff options
author | Petr Mrázek <peterix@users.noreply.github.com> | 2021-06-19 12:50:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-19 12:50:21 +0200 |
commit | 5f8d07c0092b6cc44f81104a3d7f9e7e49d9df5d (patch) | |
tree | 8fe8110d91c112d5596610df8045801e23e7212b /application/MainWindow.cpp | |
parent | 25955c08179a9077ca7eef89d0f72eb7803bec08 (diff) | |
parent | b246fc171e1e8c747b0aedd6b0b47b923cc8cfb7 (diff) | |
download | PrismLauncher-5f8d07c0092b6cc44f81104a3d7f9e7e49d9df5d.tar.gz PrismLauncher-5f8d07c0092b6cc44f81104a3d7f9e7e49d9df5d.tar.bz2 PrismLauncher-5f8d07c0092b6cc44f81104a3d7f9e7e49d9df5d.zip |
Merge pull request #3875 from jamierocks/feature/gh-3033
GH-3033 Add filtering for version components
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r-- | application/MainWindow.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 9d046ddb..13a7c7ae 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -738,7 +738,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow repopulateAccountsMenu(); accountMenuButton = new QToolButton(this); - accountMenuButton->setText(tr("Profiles")); accountMenuButton->setMenu(accountMenu); accountMenuButton->setPopupMode(QToolButton::InstantPopup); accountMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -837,6 +836,21 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow // removing this looks stupid view->setFocus(); + + retranslateUi(); +} + +void MainWindow::retranslateUi() +{ + accountMenuButton->setText(tr("Profiles")); + + if (m_selectedInstance) { + m_statusLeft->setText(m_selectedInstance->getStatusbarDescription()); + } else { + m_statusLeft->setText(tr("No instance selected")); + } + + ui->retranslateUi(this); } MainWindow::~MainWindow() @@ -1751,7 +1765,7 @@ void MainWindow::changeEvent(QEvent* event) { if (event->type() == QEvent::LanguageChange) { - ui->retranslateUi(this); + retranslateUi(); } QMainWindow::changeEvent(event); } |