summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Kyle K2022-05-01 20:36:10 -0700
committerGravatar Kyle K2022-05-01 21:39:39 -0700
commit4be00def5c0e6778d51e49e83a6e8111e18afb10 (patch)
tree9fa9e8080c55f9a7cec0eeb3836f2318a1224772
parentMerge pull request #8283 from Tachi107/appstream (diff)
downloadyuzu-4be00def5c0e6778d51e49e83a6e8111e18afb10.tar.gz
yuzu-4be00def5c0e6778d51e49e83a6e8111e18afb10.tar.xz
yuzu-4be00def5c0e6778d51e49e83a6e8111e18afb10.zip
ui: retranslate the network tab
Looks like it was just missed when it was added, as currently the Network Tab only has one item RetranslateUI is used more commonly throughout the project
-rw-r--r--src/yuzu/configuration/configure_network.cpp10
-rw-r--r--src/yuzu/configuration/configure_network.h3
2 files changed, 11 insertions, 2 deletions
diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp
index f87d3d53a..8ed08fa6a 100644
--- a/src/yuzu/configuration/configure_network.cpp
+++ b/src/yuzu/configuration/configure_network.cpp
@@ -26,7 +26,15 @@ void ConfigureNetwork::ApplyConfiguration() {
26 Settings::values.network_interface = ui->network_interface->currentText().toStdString(); 26 Settings::values.network_interface = ui->network_interface->currentText().toStdString();
27} 27}
28 28
29void ConfigureNetwork::RetranslateUi() { 29void ConfigureNetwork::changeEvent(QEvent* event) {
30 if (event->type() == QEvent::LanguageChange) {
31 RetranslateUI();
32 }
33
34 QWidget::changeEvent(event);
35}
36
37void ConfigureNetwork::RetranslateUI() {
30 ui->retranslateUi(this); 38 ui->retranslateUi(this);
31} 39}
32 40
diff --git a/src/yuzu/configuration/configure_network.h b/src/yuzu/configuration/configure_network.h
index e8245cfdc..f666edbd1 100644
--- a/src/yuzu/configuration/configure_network.h
+++ b/src/yuzu/configuration/configure_network.h
@@ -18,9 +18,10 @@ public:
18 ~ConfigureNetwork() override; 18 ~ConfigureNetwork() override;
19 19
20 void ApplyConfiguration(); 20 void ApplyConfiguration();
21 void RetranslateUi();
22 21
23private: 22private:
23 void changeEvent(QEvent*) override;
24 void RetranslateUI();
24 void SetConfiguration(); 25 void SetConfiguration();
25 26
26 std::unique_ptr<Ui::ConfigureNetwork> ui; 27 std::unique_ptr<Ui::ConfigureNetwork> ui;