}
-bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover)
+bool InsetExternal::setMouseHover(BufferView const * bv, bool mouse_hover) const
{
mouse_hover_[bv] = mouse_hover;
return true;
from_utf8(params.templatename()));
// FIXME UNICODE
docstring gui = _(ptr->guiName);
- return from_utf8(external::doSubstitution(params, buffer,
- to_utf8(gui), false));
+ gui += ": ";
+
+ if (params.filename.empty())
+ gui += "???";
+ else
+ gui += from_utf8(params.filename.relFileName(buffer.filePath()));
+
+ return gui;
}
} // namespace anon
return;
RenderMonitoredPreview * const ptr = renderer_->asMonitoredPreview();
- LASSERT(ptr, /**/);
+ LASSERT(ptr, return);
ptr->removePreview(*buffer);
add_preview_and_start_loading(*ptr, *this, *buffer);
}
-int InsetExternal::plaintext(odocstream & os,
- OutputParams const & runparams) const
+int InsetExternal::plaintext(odocstringstream & os,
+ OutputParams const & runparams, size_t) const
{
+ // this is too slow for constant use
+ if (runparams.for_tooltip)
+ return 0;
+
os << '\n'; // output external material on a new line
external::writeExternal(params_, "Ascii", buffer(), os,
*(runparams.exportdata), false,
case OutputParams::TEXT:
format = "text";
break;
+ case OutputParams::LYX:
+ format = "lyx";
+ break;
}
external::Template::Formats::const_iterator cit =
et.formats.find(format);
return;
}
- // FIXME: We don't need that always
+ // FIXME: We don't need that always, see InsetGraphics
features.require("lyxdot");
vector<string>::const_iterator it = cit->second.requirements.begin();
}
-docstring InsetExternal::contextMenuName() const
+string InsetExternal::contextMenuName() const
{
- return from_ascii("context-external");
+ return "context-external";
}