void PSCustomBuildPage::Save(BuildConfigPtr buildConf, ProjectSettingsPtr projSettingsPtr) { // loop over the list and create the targets map std::map<wxString, wxString> targets; for(int i = 0; i < m_dvListCtrlTargets->GetItemCount(); i++) { wxVariant vTarget, vCommand; m_dvListCtrlTargets->GetValue(vTarget, i, 0); m_dvListCtrlTargets->GetValue(vCommand, i, 1); if(ProjectCustomBuildTragetDlg::IsPredefinedTarget(vTarget.GetString())) continue; targets[vTarget.GetString()] = vCommand.GetString(); } buildConf->SetCustomTargets(targets); buildConf->SetCustomBuildCmd(GetTargetCommand(ProjectCustomBuildTragetDlg::CUSTOM_TARGET_BUILD)); buildConf->SetCustomCleanCmd(GetTargetCommand(ProjectCustomBuildTragetDlg::CUSTOM_TARGET_CLEAN)); buildConf->SetCustomRebuildCmd(GetTargetCommand(ProjectCustomBuildTragetDlg::CUSTOM_TARGET_REBUILD)); buildConf->SetSingleFileBuildCommand( GetTargetCommand(ProjectCustomBuildTragetDlg::CUSTOM_TARGET_COMPILE_SINGLE_FILE)); buildConf->SetPreprocessFileCommand(GetTargetCommand(ProjectCustomBuildTragetDlg::CUSTOM_TARGET_PREPROCESS_FILE)); buildConf->EnableCustomBuild(m_checkEnableCustomBuild->IsChecked()); buildConf->SetCustomBuildWorkingDir(m_textCtrlCustomBuildWD->GetValue()); }