Added 'settext' action handler to default logic.

git-svn-id: http://yate.null.ro/svn/yate/trunk@3193 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-04-14 14:32:20 +00:00
parent 7056dd5c80
commit 8dd9d23f8e
1 changed files with 13 additions and 0 deletions

View File

@ -500,6 +500,19 @@ bool DefaultLogic::action(Window* wnd, const String& name, NamedList* params)
return true;
}
}
// 'settext' action
if (name.startsWith("settext:") && name.at(8)) {
int pos = name.find(':',9);
String ctrl;
String text;
if (pos > 9) {
ctrl = name.substr(8,pos - 8);
text = name.substr(pos + 1);
}
else
ctrl = name.substr(8);
return Client::self() && Client::self()->setText(ctrl,text,false,wnd);
}
// action taken when receiving a backspace
if (name.startsWith("back:"))
return backspace(name.substr(5),wnd);