summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttssapi.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-02-04 23:28:34 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-02-04 23:28:34 +0000
commit988b3083df91d88848ec637664e2d8b9ed26a489 (patch)
tree07186d46e09da918d246ecbe2d86f3e49440f9e5 /rbutil/rbutilqt/base/ttssapi.cpp
parent3419422c239758fc6002e56e6be3c034bc8dbe8e (diff)
downloadrockbox-988b3083df91d88848ec637664e2d8b9ed26a489.tar.gz
rockbox-988b3083df91d88848ec637664e2d8b9ed26a489.tar.bz2
rockbox-988b3083df91d88848ec637664e2d8b9ed26a489.zip
Replace list of languages with map.
- Use ISO codes as keys for voice languages instead of enumeration. - Instead of trying to select a suitable voicefile language from the UI language use the ISO codes stored as UI language and match against the mapping. - Always store the selected UI language. Fixes the voicefile creation language lookup to fail if the language used is the system language. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29207 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/ttssapi.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index b149e1d786..2cc95cd4aa 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -38,11 +38,10 @@ TTSBase::Capabilities TTSSapi::capabilities()
void TTSSapi::generateSettings()
{
// language
- QStringList languages = SystemInfo::languages();
- languages.sort();
+ QMap<QString, QString> languages = SystemInfo::languages();
EncTtsSetting* setting =new EncTtsSetting(this,EncTtsSetting::eSTRINGLIST,
tr("Language:"),RbSettings::subValue("sapi",RbSettings::TtsLanguage),
- languages);
+ languages.values());
connect(setting,SIGNAL(dataChanged()),this,SLOT(updateVoiceList()));
insertSetting(eLANGUAGE,setting);
// voice