[apps/i18n] Added default country for languages

After choosing a language at onboarding, the country menu now has a
specific country selected by default (Spain for Spanish, Italy for
Italian...)
Default countries are specified in apps/language_preferences.csv

Change-Id: Ia6392aceb9bebf7e62a692c5a79eb8c4d7b71a9d
This commit is contained in:
Gabriel Ozouf
2020-08-13 10:49:27 +02:00
committed by Émilie Feral
parent ec6ee82b81
commit df6383d2d8
9 changed files with 66 additions and 15 deletions

View File

@@ -127,7 +127,7 @@ LocalizationController::LocalizationController(Responder * parentResponder, KDCo
void LocalizationController::resetSelection() {
selectableTableView()->deselectTable();
selectCellAtLocation(0, (shouldResetSelectionToTopCell()) ? 0 : (mode() == Mode::Language) ? static_cast<int>(GlobalPreferences::sharedGlobalPreferences()->language()) : IndexOfCountry(GlobalPreferences::sharedGlobalPreferences()->country()));
selectCellAtLocation(0, indexOfCellToSelectOnReset());
}
void LocalizationController::setMode(LocalizationController::Mode mode) {