aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-12-01 16:44:32 -0500
committerKen Moore <moorekou@gmail.com>2015-12-01 16:44:32 -0500
commit2f521da9aa36926f5dc451a82ab68fd98d04aefd (patch)
tree77ded8c753cf87708d341880e8e38325a622b8c9 /lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
parentAdd a link to the Lumina IRC channel in the lumina-info utility, and also cre... (diff)
downloadlumina-2f521da9aa36926f5dc451a82ab68fd98d04aefd.tar.gz
lumina-2f521da9aa36926f5dc451a82ab68fd98d04aefd.tar.bz2
lumina-2f521da9aa36926f5dc451a82ab68fd98d04aefd.zip
Fix up the loading of locales through the StartMenu/Session. Now it will properly make the locale changes *if* it could properly load the locale (ensuring consistency between system/session).
Diffstat (limited to 'lumina-desktop/panel-plugins/systemstart/StartMenu.cpp')
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
index 043cbba0..c817b1a3 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -99,11 +99,13 @@ void StartMenu::UpdateAll(){
QStringList locales = LUtils::knownLocales();
ui->stackedWidget->setCurrentWidget(ui->page_main); //need to ensure the settings page is not active
ui->combo_locale->clear();
- QLocale curr;
+ QString curr = LUtils::currentLocale();
+ qDebug() << "Update Locales:" << locales;
+ qDebug() << "Current Locale:" << curr;
for(int i=0; i<locales.length(); i++){
QLocale loc(locales[i]);
- ui->combo_locale->addItem(loc.nativeLanguageName(), locales[i]); //Make the display text prettier later
- if(locales[i] == curr.name() || locales[i] == curr.name().section("_",0,0) ){
+ ui->combo_locale->addItem(loc.nativeLanguageName() +" ("+locales[i]+")", locales[i]); //Make the display text prettier later
+ if(locales[i] == curr || locales[i] == curr.section("_",0,0) ){
//Current Locale
ui->combo_locale->setCurrentIndex(ui->combo_locale->count()-1); //the last item in the list right now
}
@@ -553,6 +555,7 @@ void StartMenu::on_combo_locale_currentIndexChanged(int){
if(ui->stackedWidget->currentWidget()!=ui->page_settings){ return; }
QString locale = ui->combo_locale->currentData().toString();
emit CloseMenu();
+ LSession::processEvents();
LSession::handle()->switchLocale(locale);
}
bgstack15