Forbid double quotes in values

This commit is contained in:
Crom (Thibaut CHARLES) 2014-11-19 16:31:17 +01:00
parent 33ccf7d8f0
commit 04f9086315

View File

@ -393,7 +393,11 @@ auto ref SetupColumn(TreeView tree, string sName, size_t index){
else{ else{
cr.addOnEdited((string path, string newval, CellRendererText crt){ cr.addOnEdited((string path, string newval, CellRendererText crt){
TreeIter t = new TreeIter(tree.getModel(), path); TreeIter t = new TreeIter(tree.getModel(), path);
store.setValue(t, cast(int)crt.getData("colnumber"), newval); if(newval.countchars("\"")!=0){
SaySomething("Double quotes are forbidden !");
}
else
store.setValue(t, cast(int)crt.getData("colnumber"), newval);
}); });
} }