mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
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
This commit is contained in:
parent
3419422c23
commit
988b3083df
6 changed files with 60 additions and 56 deletions
|
|
@ -34,7 +34,7 @@ class SystemInfo : public QObject
|
|||
MapError,
|
||||
MapIncompatible,
|
||||
};
|
||||
|
||||
|
||||
//! All system settings
|
||||
enum SystemInfos {
|
||||
ManualUrl,
|
||||
|
|
@ -78,14 +78,14 @@ class SystemInfo : public QObject
|
|||
//! return a list of all platforms (rbutil internal names)
|
||||
static QStringList platforms(enum PlatformType type = PlatformAll,
|
||||
QString variant="");
|
||||
//! returns a list of all languages
|
||||
static QStringList languages(void);
|
||||
//! returns a map of all languages
|
||||
static QMap<QString, QString> languages(void);
|
||||
//! returns a map of usb-ids and their targets
|
||||
static QMap<int, QString> usbIdMap(enum MapType);
|
||||
//! get a value from system settings
|
||||
static QVariant value(enum SystemInfos info);
|
||||
//! get a value from system settings for a named platform.
|
||||
static QVariant platformValue(QString platform, enum SystemInfos info);
|
||||
static QVariant platformValue(QString platform, enum SystemInfos info);
|
||||
|
||||
private:
|
||||
//! you shouldnt call this, its a fully static calls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue