CompilerLinkerOptionsPage::CompilerLinkerOptionsPage( wxWindow* parent, const wxString &cmpname )
: CompilerLinkerOptionsBase( parent )
, m_cmpname(cmpname)
, m_selectedLnkOption(wxNOT_FOUND)
{
	m_listLinkerOptions->InsertColumn(0, wxT("Switch"));
	m_listLinkerOptions->InsertColumn(1, wxT("Help"));
	
	CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(m_cmpname);
	const Compiler::CmpCmdLineOptions& lnkOptions = cmp->GetLinkerOptions();
	Compiler::CmpCmdLineOptions::const_iterator itLnkOption = lnkOptions.begin();
	for ( ; itLnkOption != lnkOptions.end(); ++itLnkOption)
	{
		const Compiler::CmpCmdLineOption& lnkOption = itLnkOption->second;
		long idx = m_listLinkerOptions->InsertItem(m_listLinkerOptions->GetItemCount(), lnkOption.name);
		m_listLinkerOptions->SetItem(idx, 1, lnkOption.help);
	}
	m_listLinkerOptions->SetColumnWidth(0, 100);
	m_listLinkerOptions->SetColumnWidth(1, wxLIST_AUTOSIZE);
}
Пример #2
0
void PSLinkerPage::OnCustomEditorClicked(wxCommandEvent& event)
{
    wxPGProperty* prop = m_pgMgr->GetSelectedProperty();
    CHECK_PTR_RET(prop);
    m_dlg->SetIsDirty(true);

    if ( prop == m_pgPropLibraries || prop == m_pgPropLibraryPaths ) {
        wxString value = prop->GetValueAsString();
        if ( PopupAddOptionDlg(value) ) {
            prop->SetValueFromString( value );
        }

    } else if ( prop == m_pgPropOptions ) {
        wxString value = prop->GetValueAsString();
        wxString cmpName = m_gp->GetCompiler();
        CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(cmpName);
        if (PopupAddOptionCheckDlg(value, _("Linker options"), cmp->GetLinkerOptions())) {
            prop->SetValueFromString( value );
        }
    }
}