Ignore:
Timestamp:
Oct 18, 2013 9:25:39 AM (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
e8cdd4d
Parents:
4fb8829
Message:

When the user changes language, we can also set a new keyboard layout
at the same time. TODO, add more fine-grained checks for a LANG
and the relevant keyboard layout

Trac Ticket: http://trac.pcbsd.org/ticket/697

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-installgui/installer.cpp

    rb1a3938 r01ffd8d  
    776776      this->retranslateUi(this); 
    777777    } 
    778 } 
    779  
    780 void Installer::changeLang(QString code) 
    781 { 
    782    // Change the language in the combobox with the current running one 
    783    comboLanguage->disconnect(); 
    784  
    785    for (int i=0; i < languages.count(); ++i) { 
    786       if ( languages.at(i).indexOf("(" + code + ")" ) != -1 ) { 
    787         comboLanguage->setCurrentIndex(i);  
    788       } 
    789    } 
    790  
    791    connect(comboLanguage, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotChangeLanguage())); 
     778 
     779    // Change the default keyboard layout 
     780    if ( langCode == "en" ) { 
     781       Scripts::Backend::changeKbMap(langCode, "pc104", ""); 
     782    } else { 
     783       // TODO - At some point, add additional tests here and set more specific layouts 
     784       // based upon the language selected 
     785       Scripts::Backend::changeKbMap(langCode, "pc105", "intl"); 
     786    } 
     787     
    792788} 
    793789 
Note: See TracChangeset for help on using the changeset viewer.