summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-02-02 04:15:37 +0100
committerGitHub <noreply@github.com>2022-02-02 04:15:37 +0100
commit79e8f4abe81b3599104ae91401d11a07c2eff208 (patch)
treeda706c93f5d291b1d9c53a5940e25c23097f3968 /src
parentMerge pull request #7792 from german77/translate (diff)
parentconfigure_filesystem: Add missing changeEvent() override (diff)
downloadyuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar.gz
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar.bz2
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar.lz
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar.xz
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.tar.zst
yuzu-79e8f4abe81b3599104ae91401d11a07c2eff208.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_dialog.cpp2
-rw-r--r--src/yuzu/configuration/configure_filesystem.cpp16
-rw-r--r--src/yuzu/configuration/configure_filesystem.h8
3 files changed, 18 insertions, 8 deletions
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index 464e7a489..19133ccf5 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -109,7 +109,7 @@ void ConfigureDialog::ApplyConfiguration() {
ui_tab->ApplyConfiguration();
system_tab->ApplyConfiguration();
profile_tab->ApplyConfiguration();
- filesystem_tab->applyConfiguration();
+ filesystem_tab->ApplyConfiguration();
input_tab->ApplyConfiguration();
hotkeys_tab->ApplyConfiguration(registry);
cpu_tab->ApplyConfiguration();
diff --git a/src/yuzu/configuration/configure_filesystem.cpp b/src/yuzu/configuration/configure_filesystem.cpp
index 9cb317822..d6fb43f8b 100644
--- a/src/yuzu/configuration/configure_filesystem.cpp
+++ b/src/yuzu/configuration/configure_filesystem.cpp
@@ -14,7 +14,7 @@
ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
: QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) {
ui->setupUi(this);
- this->setConfiguration();
+ SetConfiguration();
connect(ui->nand_directory_button, &QToolButton::pressed, this,
[this] { SetDirectory(DirectoryTarget::NAND, ui->nand_directory_edit); });
@@ -38,7 +38,15 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
ConfigureFilesystem::~ConfigureFilesystem() = default;
-void ConfigureFilesystem::setConfiguration() {
+void ConfigureFilesystem::changeEvent(QEvent* event) {
+ if (event->type() == QEvent::LanguageChange) {
+ RetranslateUI();
+ }
+
+ QWidget::changeEvent(event);
+}
+
+void ConfigureFilesystem::SetConfiguration() {
ui->nand_directory_edit->setText(
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir)));
ui->sdmc_directory_edit->setText(
@@ -60,7 +68,7 @@ void ConfigureFilesystem::setConfiguration() {
UpdateEnabledControls();
}
-void ConfigureFilesystem::applyConfiguration() {
+void ConfigureFilesystem::ApplyConfiguration() {
Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir,
ui->nand_directory_edit->text().toStdString());
Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir,
@@ -143,6 +151,6 @@ void ConfigureFilesystem::UpdateEnabledControls() {
!ui->gamecard_current_game->isChecked());
}
-void ConfigureFilesystem::retranslateUi() {
+void ConfigureFilesystem::RetranslateUI() {
ui->retranslateUi(this);
}
diff --git a/src/yuzu/configuration/configure_filesystem.h b/src/yuzu/configuration/configure_filesystem.h
index 2147cd405..b4f9355eb 100644
--- a/src/yuzu/configuration/configure_filesystem.h
+++ b/src/yuzu/configuration/configure_filesystem.h
@@ -20,11 +20,13 @@ public:
explicit ConfigureFilesystem(QWidget* parent = nullptr);
~ConfigureFilesystem() override;
- void applyConfiguration();
- void retranslateUi();
+ void ApplyConfiguration();
private:
- void setConfiguration();
+ void changeEvent(QEvent* event) override;
+
+ void RetranslateUI();
+ void SetConfiguration();
enum class DirectoryTarget {
NAND,