X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetparent.C;h=7ed200b7f9e1bc1f1092f1e84099b49967264a47;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=8738e04d5bfae65e4cc4aeb76bca21d83cbd64b5;hpb=ee1229d7431f99788d04e99fcd8c57de69b4acaf;p=lyx.git diff --git a/src/insets/insetparent.C b/src/insets/insetparent.C index 8738e04d5b..7ed200b7f9 100644 --- a/src/insets/insetparent.C +++ b/src/insets/insetparent.C @@ -3,7 +3,7 @@ * * LyX, The Document Processor * - * Copyright (C) 1997-1999 LyX Team + * Copyright 1997-2000 The LyX Team. * * ====================================================== */ @@ -23,10 +23,9 @@ #include "LyXView.h" #include "lyxfunc.h" #include "commandtags.h" +#include "buffer.h" - -extern BufferView * current_view; - +using std::ostream; InsetParent::InsetParent(string const & fn, Buffer * owner) : InsetCommand("lyxparent") @@ -38,26 +37,24 @@ InsetParent::InsetParent(string const & fn, Buffer * owner) } -void InsetParent::Edit(int, int) -{ - current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, - getContents().c_str()); +string InsetParent::getScreenLabel() const +{ + return string(_("Parent:")) + getContents(); } -// LaTeX must just ignore this command -int InsetParent::Latex(ostream & os, signed char fragile) -{ - os << "%%#{lyx}"; - InsetCommand::Latex(os, fragile); - return 0; +void InsetParent::Edit(BufferView * bv, int, int, unsigned int) +{ + bv->owner()->getLyXFunc()-> + Dispatch(LFUN_CHILDOPEN, getContents().c_str()); } // LaTeX must just ignore this command -int InsetParent::Latex(string & file, signed char fragile) +int InsetParent::Latex(ostream & os, + bool fragile, bool free_spc) const { - file += "%%#{lyx}"; - InsetCommand::Latex(file, fragile); + os << "%%#{lyx}"; + InsetCommand::Latex(os, fragile, free_spc); return 0; }