for(int i=1;i<=numLev;i++)
{
out<<i;
- as.Add(out.str());
+ as.Add(crea::std2wx(out.str()));
out.str("");
}
- levels=new wxComboBox(this, ID_COMBO,"1",wxPoint(190, 5),wxDefaultSize,as);
+ levels=new wxComboBox(this, ID_COMBO,_T("1"),wxPoint(190, 5),wxDefaultSize,as);
wxStaticText * na=new wxStaticText(this,-1,_T(" Currently hidden attributes: "), wxPoint(255,10));
- shownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(5,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER | wxLC_SINGLE_SEL );
+ shownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(5,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER );
shownAtts->InsertColumn(0,
crea::std2wx(""),
wxButton *remove = new wxButton(this,wxID_ANY,_T("<<"), wxPoint(170,70) );
Connect( remove->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxAttributeSelectionPanel::OnRemove );
- notShownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(255,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER | wxLC_SINGLE_SEL );
+ notShownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(255,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER );
notShownAtts->InsertColumn(0,
crea::std2wx(""),
void WxAttributeSelectionPanel::OnSaveConfig(wxCommandEvent& event)
{
- /*mView->OnSaveSettingsCallback(crea::wx2std(copyPath->GetValue()),
- crea::wx2std(dbPath->GetValue()),
- crea::wx2std(syncEvent->GetValue()),
- crea::wx2std(syncFrequency->GetValue()));
- */
+ int n=levels->GetSelection();
+ if(n<0){n=0;}
+ mView->OnAttributesChanged(notShownA,n);
dialog->Destroy();
}
for ( ;; )
{
item = shownAtts->GetNextItem(item,
- wxLIST_NEXT_ALL,
- wxLIST_STATE_SELECTED);
+ wxLIST_NEXT_ALL,
+ wxLIST_STATE_SELECTED);
if ( item == -1 )
break;
- std::string change=shownAtts->GetItemText(item);
+ std::string change = crea::wx2std(shownAtts->GetItemText(item));
std::vector<std::string>::iterator it;
bool found=false;
for(it=shownA.begin();it!=shownA.end()&&!found;++it)
}
shownA.erase(it-1);
notShownA.push_back(change);
- LoadCtrls();
-
}
+ LoadCtrls();
}
for ( ;; )
{
item = notShownAtts->GetNextItem(item,
- wxLIST_NEXT_ALL,
- wxLIST_STATE_SELECTED);
+ wxLIST_NEXT_ALL,
+ wxLIST_STATE_SELECTED);
if ( item == -1 )
break;
- std::string change=notShownAtts->GetItemText(item);
+ std::string change = crea::wx2std(notShownAtts->GetItemText(item));
std::vector<std::string>::iterator it;
bool found=false;
for(it=notShownA.begin();it!=notShownA.end()&&!found;++it)
}
notShownA.erase(it-1);
shownA.push_back(change);
- LoadCtrls();
}
+ LoadCtrls();
}