summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-08-14 21:32:32 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-08-14 21:32:32 +0000
commitcbc9208e544296c0656159182d1dd0fe408dc1c0 (patch)
treef6fbe99bcc0807bf07a8c665824a98898c054fc4 /rbutil
parent4bd6c7df613f42e0e05e218f082fcd60f117f7ad (diff)
downloadrockbox-cbc9208e544296c0656159182d1dd0fe408dc1c0.tar.gz
rockbox-cbc9208e544296c0656159182d1dd0fe408dc1c0.tar.bz2
rockbox-cbc9208e544296c0656159182d1dd0fe408dc1c0.zip
Don't reset the language setting if it wasn't changed but the configuration saved.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18279 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/configure.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 4406e4aba2..1589477cd7 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -38,6 +38,7 @@
#endif
#define DEFAULT_LANG "English (en)"
+#define DEFAULT_LANG_CODE "en"
Config::Config(QWidget *parent,int index) : QDialog(parent)
{
@@ -55,8 +56,9 @@ Config::Config(QWidget *parent,int index) : QDialog(parent)
// build language list and sort alphabetically
QStringList langs = findLanguageFiles();
for(int i = 0; i < langs.size(); ++i)
- lang.insert(languageName(langs.at(i)) + tr(" (%1)").arg(langs.at(i)), langs.at(i));
- lang.insert(DEFAULT_LANG, "en");
+ lang.insert(languageName(langs.at(i))
+ + QString(" (%1)").arg(langs.at(i)), langs.at(i));
+ lang.insert(DEFAULT_LANG, DEFAULT_LANG_CODE);
QMap<QString, QString>::const_iterator i = lang.constBegin();
while (i != lang.constEnd()) {
ui.listLanguages->addItem(i.key());
@@ -108,10 +110,11 @@ void Config::accept()
settings->setProxyType(proxyType);
// language
- if(settings->curLang() != language && !language.isEmpty())
+ if(settings->curLang() != language && !language.isEmpty()) {
QMessageBox::information(this, tr("Language changed"),
tr("You need to restart the application for the changed language to take effect."));
- settings->setLang(language);
+ settings->setLang(language);
+ }
// mountpoint
QString mp = ui.mountPoint->text();