Enable the dialog to parse the string passed to it by RefInset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6258 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-02-25 15:38:45 +00:00
parent 08f941df92
commit 3bd1db4654
2 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2003-02-25 Angus Leeming <leeming@lyx.org>
* ref_inset.C (dispatch): add an '\end_inset' to the string passed to
the dialog.
2003-02-21 Angus Leeming <leeming@lyx.org>
* formulabase.C (localDispatch): retire LFUN_REF_INSERT. Add

View File

@ -41,8 +41,7 @@ void RefInset::infoize(std::ostream & os) const
dispatch_result
RefInset::dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
{
lyxerr << "RefInset::dispatch" << std::endl;
lyxerr << "dispatching " << cmd.argument << "\n";
lyxerr << "RefInset::dispatch " << cmd.argument << std::endl;
switch (cmd.action) {
case LFUN_MOUSE_RELEASE:
if (cmd.button() == mouse_button::button3) {
@ -51,17 +50,12 @@ RefInset::dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
return DISPATCHED;
}
if (cmd.button() == mouse_button::button1) {
lyxerr << "trying to open ref" << cell(0) << "\n";
// Eventually trigger dialog with button 3
// not 1
ostringstream data;
WriteStream wsdata(data);
write(wsdata);
lyxerr << "ref_inset dispatch.\n"
<< "this " << this << "\n"
<< "The data is "<< data.str()
<< std::endl;
wsdata << "\n\\end_inset\n\n";
cmd.view()->owner()->getDialogs().
show("ref", data.str(), this);