macOS: Rename 'Explorer' appropriately on non-Windows
authorMichael Schuster <michael@schuster.ms>
Mon, 9 Dec 2019 20:00:34 +0000 (21:00 +0100)
committerMichael Schuster <48932272+misch7@users.noreply.github.com>
Mon, 9 Dec 2019 20:37:21 +0000 (21:37 +0100)
- Rename it to 'Finder' on macOS.
- This way we also avoid having the whole string re-translated on Transifex.

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/generalsettings.cpp

index c2d5873afe21a894098678ab176e372ca56c655f..632ae43f838ae091f2da54edfd2dba0ffc72019a 100644 (file)
@@ -57,6 +57,13 @@ GeneralSettings::GeneralSettings(QWidget *parent)
 
     connect(_ui->showInExplorerNavigationPaneCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotShowInExplorerNavigationPane);
 
+    // Rename 'Explorer' appropriately on non-Windows
+#ifdef Q_OS_MAC
+    QString txt = _ui->showInExplorerNavigationPaneCheckBox->text();
+    txt.replace(QString::fromLatin1("Explorer"), QString::fromLatin1("Finder"));
+    _ui->showInExplorerNavigationPaneCheckBox->setText(txt);
+#endif
+
     _ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName()));
     connect(_ui->autostartCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleLaunchOnStartup);