Changeset 01ffd8dd


Ignore:
Timestamp:
10/18/13 09:25:39 (11 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
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

Location:
src-qt4/pc-installgui
Files:
2 edited

Legend:

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

    rb1a3938 r01ffd8dd  
    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 
  • src-qt4/pc-installgui/installer.h

    r93572be r01ffd8dd  
    3535    Installer(QWidget *parent = 0); 
    3636    ~Installer(); 
    37     void changeLang(QString code); 
    3837    void initInstall(); 
    3938 
Note: See TracChangeset for help on using the changeset viewer.