void PropertiesDialog::TransferTo(Catalog *cat) { SetCharsetToCombobox(m_charset, cat->Header().Charset); SetCharsetToCombobox(m_sourceCodeCharset, cat->Header().SourceCodeCharset); #define SET_VAL(what,what2) m_##what2->SetValue(cat->Header().what) SET_VAL(Team, team); SET_VAL(TeamEmail, teamEmail); SET_VAL(Project, project); SET_VAL(BasePath, basePath); #undef SET_VAL m_language->SetLang(cat->Header().Lang); OnLanguageValueChanged(m_language->GetValue()); wxString pf_def = cat->Header().Lang.DefaultPluralFormsExpr(); wxString pf_cat = cat->Header().GetHeader("Plural-Forms"); if (pf_cat == "nplurals=INTEGER; plural=EXPRESSION;") pf_cat = pf_def; m_pluralFormsExpr->SetValue(pf_cat); if (!pf_cat.empty() && pf_cat == pf_def) m_pluralFormsDefault->SetValue(true); else m_pluralFormsCustom->SetValue(true); m_paths->SetStrings(cat->Header().SearchPaths); m_keywords->SetStrings(cat->Header().Keywords); }
void PropertiesDialog::TransferTo(Catalog *cat) { SetCharsetToCombobox(m_charset, cat->Header().Charset); SetCharsetToCombobox(m_sourceCodeCharset, cat->Header().SourceCodeCharset); #define SET_VAL(what,what2) m_##what2->SetValue(cat->Header().what) SET_VAL(Team, team); SET_VAL(TeamEmail, teamEmail); SET_VAL(Project, project); SET_VAL(BasePath, basePath); SET_VAL(LanguageCode, language); #undef SET_VAL if (cat->Header().HasHeader(_T("Plural-Forms"))) m_pluralForms->SetValue(cat->Header().GetHeader(_T("Plural-Forms"))); m_paths->SetStrings(cat->Header().SearchPaths); m_keywords->SetStrings(cat->Header().Keywords); }