I'm now using c::b 13.12, there is a bug at NewFromTemplateDlg::NewFromTemplateDlg
NewFromTemplateDlg::NewFromTemplateDlg(TemplateOutputType initial, const wxArrayString& user_templates)
: m_Template(nullptr),
m_pWizard(nullptr),
m_WizardIndex(-1)
{
//ctor
wxXmlResource::Get()->LoadObject(this, nullptr, _T("dlgNewFromTemplate"),_T("wxScrollingDialog"));
m_Wizards = Manager::Get()->GetPluginManager()->GetOffersFor(ptWizard);
wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook);
SetSettingsIconsStyle(lb->GetListView(), sisNoIcons);
// create image lists
XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
// load view prefs
XRCCTRL(*this, "rbView", wxRadioBox)->SetSelection(Manager::Get()->GetConfigManager(_T("new_from_template"))->ReadInt(_T("/view"), 0));
ChangeView();
BuildCategories();
BuildList();
// fill user templates list
XRCCTRL(*this, "lstUser", wxListBox)->Clear();
for (unsigned int i = 0; i < user_templates.GetCount(); ++i)
{
XRCCTRL(*this, "lstUser", wxListBox)->Append(user_templates[i]);
}
lb->SetSelection((int)initial);
}
NewFromTemplateDlg::~NewFromTemplateDlg()
{
//dtor
delete XRCCTRL(*this, "listProjects", wxListCtrl)->GetImageList(wxIMAGE_LIST_NORMAL);
delete XRCCTRL(*this, "listTargets", wxListCtrl)->GetImageList(wxIMAGE_LIST_NORMAL);
delete XRCCTRL(*this, "listFiles", wxListCtrl)->GetImageList(wxIMAGE_LIST_NORMAL);
delete XRCCTRL(*this, "listCustoms", wxListCtrl)->GetImageList(wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_SMALL);
XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_NORMAL);
XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(nullptr, wxIMAGE_LIST_SMALL);
ClearList();
}