Sort categories with translated names

This commit is contained in:
2012-12-16 09:49:51 +01:00
parent d206d5b051
commit 3e89eb7279
5 changed files with 27 additions and 6 deletions

View File

@@ -238,12 +238,20 @@ void wxUI::LoadPanels()
void wxUI::LoadUser()
{
User* user = _kiss->GetUser();
int i;
if (user->_preferences["language"].size())
SetLanguage(user->GetLanguage());
else
SetLanguage(SupportedLanguages::languages[0].name);
// Sort with translated names
std::sort(user->_categories.begin(), user->_categories.end(), Category());
for (i=0; i < (int)user->_categories.size(); i++)
{
user->_categoriesFonts[i] = KissCount::ExtractFont(user->_categories[i].font);
}
LoadPanels();
if (_panels.size())