#include <config.h>
-
-
#include "insetparent.h"
-#include "support/filetools.h"
#include "BufferView.h"
#include "frontends/LyXView.h"
#include "support/LOstream.h"
#include "buffer.h"
#include "gettext.h"
-#include "BoostFormat.h"
+#include "support/filetools.h"
+#include "support/lstrings.h"
using std::ostream;
string const InsetParent::getScreenLabel(Buffer const *) const
{
-#if USE_BOOST_FORMAT
- return boost::io::str(boost::format(_("Parent: %s")) % getContents());
-#else
- return _("Parent: ") + getContents();
-#endif
-}
-
-
-void InsetParent::edit(BufferView * bv, int, int, mouse_button::state)
-{
- bv->owner()->dispatch(FuncRequest(LFUN_CHILDOPEN, getContents()));
+ return bformat(_("Parent: %1$s"), getContents());
}
-void InsetParent::edit(BufferView * bv, bool)
+dispatch_result InsetParent::localDispatch(FuncRequest const & cmd)
{
- edit(bv, 0, 0, mouse_button::none);
+ switch (cmd.action) {
+ case LFUN_INSET_EDIT:
+ cmd.view()->owner()->dispatch(FuncRequest(LFUN_CHILDOPEN, getContents()));
+ return DISPATCHED;
+ default:
+ return UNDISPATCHED;
+ }
}