Aggiunto messaggio di edit
git-svn-id: svn://10.65.10.50/trunk@3228 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
fd8597446c
commit
adc7237f77
@ -829,8 +829,14 @@ bool TRelation_application::main_loop()
|
|||||||
_mask->set_mode(NO_MODE);
|
_mask->set_mode(NO_MODE);
|
||||||
|
|
||||||
if (autoins_caller().not_empty() && _recins >= 0)
|
if (autoins_caller().not_empty() && _recins >= 0)
|
||||||
{
|
{
|
||||||
TMessage msg(autoins_caller(), _lnflag ? MSG_LN : MSG_AI, format("%ld", _recins));
|
TString message(MSG_LN);
|
||||||
|
if (_edflag)
|
||||||
|
message = MSG_ED;
|
||||||
|
else
|
||||||
|
if (_lnflag)
|
||||||
|
message = MSG_LN;
|
||||||
|
TMessage msg(autoins_caller(), message, format("%ld", _recins));
|
||||||
msg.send();
|
msg.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -908,6 +914,52 @@ bool TRelation_application::filter()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mail.restart();
|
||||||
|
msg = mail.next_s(MSG_ED);
|
||||||
|
if (msg)
|
||||||
|
{
|
||||||
|
TToken_string body(msg->body());
|
||||||
|
const int key = body.get_int();
|
||||||
|
|
||||||
|
_autoins_caller = msg->from();
|
||||||
|
_lnflag = TRUE;
|
||||||
|
_edflag = TRUE;
|
||||||
|
|
||||||
|
TAssoc_array field_values;
|
||||||
|
const char * s;
|
||||||
|
TString80 t;
|
||||||
|
|
||||||
|
while((s = body.get()) != NULL)
|
||||||
|
{
|
||||||
|
t = s;
|
||||||
|
const int u = t.find('=');
|
||||||
|
|
||||||
|
CHECKS(u > 0, "Invalid edit message ", (const char *) body);
|
||||||
|
if (u > 0)
|
||||||
|
{
|
||||||
|
const TString v(t.mid(u + 1));
|
||||||
|
|
||||||
|
t.cut(u);
|
||||||
|
field_values.add(t, v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < _mask->fields(); i++)
|
||||||
|
{
|
||||||
|
TMask_field& f = _mask->fld(i);
|
||||||
|
const TFieldref * field = f.field();
|
||||||
|
|
||||||
|
if (field && f.in_key(key))
|
||||||
|
{
|
||||||
|
const TString16 field_name(field->name());
|
||||||
|
const TString * v = (const TString *) field_values.objptr(field_name);
|
||||||
|
|
||||||
|
if (v)
|
||||||
|
_fixed.add(format("%d=%s", f.dlg(), (const char*)*v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user