summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2016-01-31 19:28:55 +0100
committerDees Troy <dees_troy@teamw.in>2016-02-03 05:25:50 +0100
commitcac6ace1ff704f0ca7267ecb2268b84ecf688643 (patch)
tree5bd01e95583c9e85f392358bb56ec320061c55c7
parentAdd ru.xml to translation engine on behalf on jemmini (diff)
downloadandroid_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar.gz
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar.bz2
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar.lz
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar.xz
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.tar.zst
android_bootable_recovery-cac6ace1ff704f0ca7267ecb2268b84ecf688643.zip
Diffstat (limited to '')
-rw-r--r--gui/pages.cpp3
-rw-r--r--gui/pages.hpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 4a4c52361..cfe306773 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -36,6 +36,7 @@
#include "../partitions.hpp"
#include <string>
+#include <algorithm>
extern "C" {
#include "../twcommon.h"
@@ -1333,6 +1334,8 @@ void PageManager::LoadLanguageList(ZipArchive* package) {
} else {
LoadLanguageListDir(TWRES "languages/");
}
+
+ std::sort(Language_List.begin(), Language_List.end());
}
void PageManager::LoadLanguage(string filename) {
diff --git a/gui/pages.hpp b/gui/pages.hpp
index cf1afa1e9..927f3fc01 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -34,6 +34,11 @@ struct language_struct {
std::string displayvalue;
};
+inline bool operator < (const language_struct& language1, const language_struct& language2)
+{
+ return language1.displayvalue < language2.displayvalue;
+}
+
extern std::vector<language_struct> Language_List;
// Utility Functions