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,6 +393,10 @@ 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);
if(newval.countchars("\"")!=0){
SaySomething("Double quotes are forbidden !");
}
else
store.setValue(t, cast(int)crt.getData("colnumber"), newval); store.setValue(t, cast(int)crt.getData("colnumber"), newval);
}); });
} }