Cockatrice/cockatrice/src/interface/widgets/tabs/tab_home.cpp
Neel Jogani 6e770eb7b2
Retranslate Home tab when the language changes (#7579)
* Retranslate Home tab when the language changes

TabSupervisor::retranslateUi() never included the Home tab, and
HomeWidget set its button text only once, when the buttons were
created. Switching languages left the Home tab in the old language
until it was reopened.

Store the Home buttons as members, add HomeWidget::retranslateUi()
to set their text, and call it from TabHome and TabSupervisor. The
connect button text still only changes for the Connecting,
Disconnected and LoggedIn statuses, as before.

* Address review: plain ClientStatus, drop optional and placeholder
2026-10-24 08:35:31 +02:00

16 lines
354 B
C++

#include "tab_home.h"
#include "../general/home_widget.h"
class TabSupervisor;
TabHome::TabHome(TabSupervisor *_tabSupervisor, AbstractClient *_client) : Tab(_tabSupervisor), client(_client)
{
homeWidget = new HomeWidget(this, tabSupervisor);
setCentralWidget(homeWidget);
}
void TabHome::retranslateUi()
{
homeWidget->retranslateUi();
}