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
This commit is contained in:
parent
4bd6c7df61
commit
cbc9208e54
1 changed files with 7 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue