Index: src/ictranslate/ICTranslateDlg.cpp =================================================================== diff -u -rc72f797f7e7795e3ff15dc2ed832032ee6bafd0a -r5c56f25198545656fc8e2c53980c6e6c1ba1f788 --- src/ictranslate/ICTranslateDlg.cpp (.../ICTranslateDlg.cpp) (revision c72f797f7e7795e3ff15dc2ed832032ee6bafd0a) +++ src/ictranslate/ICTranslateDlg.cpp (.../ICTranslateDlg.cpp) (revision 5c56f25198545656fc8e2c53980c6e6c1ba1f788) @@ -95,6 +95,10 @@ ON_COMMAND(ID_FILE_NEWTRANSLATION, &CICTranslateDlg::OnFileNewTranslation) ON_COMMAND(ID_FILE_SAVETRANSLATIONAS, &CICTranslateDlg::OnFileSaveTranslationAs) ON_COMMAND(ID_FILE_SAVETRANSLATION, &CICTranslateDlg::OnFileSaveTranslation) + ON_EN_KILLFOCUS(IDC_DST_AUTHOR_EDIT, &CICTranslateDlg::OnEnKillFocusDstAuthorEdit) + ON_EN_KILLFOCUS(IDC_DST_LANGUAGE_NAME_EDIT, &CICTranslateDlg::OnEnKillFocusDstLanguageNameEdit) + ON_EN_KILLFOCUS(IDC_DST_HELP_FILENAME_EDIT, &CICTranslateDlg::OnEnKillFocusDstHelpFilenameEdit) + ON_BN_CLICKED(IDC_DST_RTL_CHECK, &CICTranslateDlg::OnBnClickedDstRtlCheck) END_MESSAGE_MAP() @@ -672,3 +676,36 @@ if(WarnModified()) CDialog::OnCancel(); } + +void CICTranslateDlg::OnEnKillFocusDstAuthorEdit() +{ + CString str; + m_ctlDstAuthor.GetWindowText(str); + const tchar_t* psz = m_ldCustom.GetAuthor(); + if(psz && psz != str) + m_ldCustom.SetAuthor(str); +} + +void CICTranslateDlg::OnEnKillFocusDstLanguageNameEdit() +{ + CString str; + m_ctlDstLanguageName.GetWindowText(str); + const tchar_t* psz = m_ldCustom.GetLangName(); + if(psz && psz != str) + m_ldCustom.SetLangName(str); +} + +void CICTranslateDlg::OnEnKillFocusDstHelpFilenameEdit() +{ + CString str; + m_ctlDstHelpFilename.GetWindowText(str); + const tchar_t* psz = m_ldCustom.GetHelpName(); + if(psz && psz != str) + m_ldCustom.SetHelpName(str); +} + +void CICTranslateDlg::OnBnClickedDstRtlCheck() +{ + bool bRTL = (m_ctlDstRTL.GetCheck() == BST_CHECKED); + m_ldCustom.SetDirection(bRTL); +} Index: src/ictranslate/ICTranslateDlg.h =================================================================== diff -u -rc72f797f7e7795e3ff15dc2ed832032ee6bafd0a -r5c56f25198545656fc8e2c53980c6e6c1ba1f788 --- src/ictranslate/ICTranslateDlg.h (.../ICTranslateDlg.h) (revision c72f797f7e7795e3ff15dc2ed832032ee6bafd0a) +++ src/ictranslate/ICTranslateDlg.h (.../ICTranslateDlg.h) (revision 5c56f25198545656fc8e2c53980c6e6c1ba1f788) @@ -75,4 +75,9 @@ afx_msg void OnFileSaveTranslation(); protected: virtual void OnCancel(); +public: + afx_msg void OnEnKillFocusDstAuthorEdit(); + afx_msg void OnEnKillFocusDstLanguageNameEdit(); + afx_msg void OnEnKillFocusDstHelpFilenameEdit(); + afx_msg void OnBnClickedDstRtlCheck(); };