summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttssapi.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-19 16:49:48 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-19 16:52:58 +0200
commit733eb9af409a0482d92fe8411b1a2bd53375cc71 (patch)
tree41578ac9fa0e91ba09b23860dd23863b1ef15f52 /rbutil/rbutilqt/base/ttssapi.cpp
parent9f89ffa71c7029803c96a102efee0ab65edc6ead (diff)
downloadrockbox-733eb9af409a0482d92fe8411b1a2bd53375cc71.tar.gz
rockbox-733eb9af409a0482d92fe8411b1a2bd53375cc71.tar.bz2
rockbox-733eb9af409a0482d92fe8411b1a2bd53375cc71.zip
Show nicer language names in voice creation dialog.
Instead of showing the internal language names show some more human friendly string. Currently only applies to the voice creation dialog, the language configuration dialog needs further adjustments to support display strings differing from values. Change-Id: Ic94838f1079c1d09a666d7dbd9682c577f686b3f
Diffstat (limited to 'rbutil/rbutilqt/base/ttssapi.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index 00c63550d3..09c1dd0588 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -38,10 +38,14 @@ TTSBase::Capabilities TTSSapi::capabilities()
void TTSSapi::generateSettings()
{
// language
- QMap<QString, QString> languages = SystemInfo::languages();
+ QMap<QString, QStringList> languages = SystemInfo::languages();
+ QStringList langs;
+ for(int i = 0; i < languages.values().size(); ++i) {
+ langs.append(languages.values().at(i).at(0));
+ }
EncTtsSetting* setting =new EncTtsSetting(this,EncTtsSetting::eSTRINGLIST,
tr("Language:"),RbSettings::subValue("sapi",RbSettings::TtsLanguage),
- languages.values());
+ langs);
connect(setting,SIGNAL(dataChanged()),this,SLOT(updateVoiceList()));
insertSetting(eLANGUAGE,setting);
// voice