diff --git a/ChangeLog b/ChangeLog index 7503d638..e9793411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,7 +21,6 @@ TODO add support to change language (#297) - TODO add language selector also in the server GUI TODO search in the code for "TODO maybe first try to find the complete string, if not found use only first two letters instead" TODO bug fix: incorrect selection of UI language (#408) !!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 1be9cafc..788655c0 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -334,6 +334,9 @@ lvwClients->setMinimumHeight ( 140 ); UpdateRecorderStatus ( QString::null ); + // language combo box (corrects the setting if language not found) + cbxLanguage->Init ( pSettings->strLanguage ); + // update GUI dependencies UpdateGUIDependencies(); @@ -397,6 +400,9 @@ lvwClients->setMinimumHeight ( 140 ); QObject::connect ( cbxCentServAddrType, static_cast ( &QComboBox::activated ), this, &CServerDlg::OnCentServAddrTypeActivated ); + QObject::connect ( cbxLanguage, &CLanguageComboBox::LanguageChanged, + this, &CServerDlg::OnLanguageChanged ); + // push buttons QObject::connect ( pbtRecordingDir, &QPushButton::released, this, &CServerDlg::OnRecordingDirClicked ); diff --git a/src/serverdlg.h b/src/serverdlg.h index 35d849bc..9e40001e 100755 --- a/src/serverdlg.h +++ b/src/serverdlg.h @@ -117,6 +117,7 @@ public slots: void keyPressEvent ( QKeyEvent *e ) // block escape key { if ( e->key() != Qt::Key_Escape ) QDialog::keyPressEvent ( e ); } + void OnLanguageChanged ( QString strLanguage ) { pSettings->strLanguage = strLanguage; } void OnNewRecordingClicked() { pServer->RequestNewRecording(); } void OnRecordingDirClicked(); void OnClearRecordingDirClicked(); diff --git a/src/serverdlgbase.ui b/src/serverdlgbase.ui index 9a57988a..1754716d 100755 --- a/src/serverdlgbase.ui +++ b/src/serverdlgbase.ui @@ -7,7 +7,7 @@ 0 0 588 - 419 + 447 @@ -186,8 +186,7 @@ - - + @@ -223,6 +222,20 @@ + + + + + + Language + + + + + + + + @@ -270,6 +283,13 @@ + + + CLanguageComboBox + QComboBox +
util.h
+
+
lvwClients chbStartOnOSStart @@ -286,6 +306,7 @@ chbEnableRecorder edtCurrentSessionDir pbtNewRecording + cbxLanguage