mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
Remove InsetCommand::mailer_name_.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35893 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
aafe985042
commit
2bbf8e5f2d
@ -52,7 +52,7 @@ docstring const key_prefix = from_ascii("key-");
|
||||
|
||||
|
||||
InsetBibitem::InsetBibitem(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "bibitem")
|
||||
: InsetCommand(buf, p)
|
||||
{
|
||||
buffer().invalidateBibinfoCache();
|
||||
if (getParam("key").empty())
|
||||
|
@ -52,7 +52,7 @@ namespace os = support::os;
|
||||
|
||||
|
||||
InsetBibtex::InsetBibtex(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "bibtex")
|
||||
: InsetCommand(buf, p)
|
||||
{
|
||||
buffer().invalidateBibinfoCache();
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ ParamInfo InsetCitation::param_info_;
|
||||
|
||||
|
||||
InsetCitation::InsetCitation(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "citation")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -52,23 +52,22 @@ namespace lyx {
|
||||
|
||||
// FIXME Would it now be possible to use the InsetCode in
|
||||
// place of the mailer name and recover that information?
|
||||
InsetCommand::InsetCommand(Buffer * buf, InsetCommandParams const & p,
|
||||
string const & mailer_name)
|
||||
: Inset(buf), p_(p), mailer_name_(mailer_name)
|
||||
InsetCommand::InsetCommand(Buffer * buf, InsetCommandParams const & p)
|
||||
: Inset(buf), p_(p)
|
||||
{}
|
||||
|
||||
|
||||
// The sole purpose of this copy constructor is to make sure
|
||||
// that the mouse_hover_ map is not copied and remains empty.
|
||||
InsetCommand::InsetCommand(InsetCommand const & rhs)
|
||||
: Inset(rhs), p_(rhs.p_), mailer_name_(rhs.mailer_name_)
|
||||
: Inset(rhs), p_(rhs.p_)
|
||||
{}
|
||||
|
||||
|
||||
InsetCommand::~InsetCommand()
|
||||
{
|
||||
if (!mailer_name_.empty())
|
||||
hideDialogs(mailer_name_, this);
|
||||
if (p_.code() != NO_CODE)
|
||||
hideDialogs(insetName(p_.code()), this);
|
||||
|
||||
map<BufferView const *, bool>::iterator it = mouse_hover_.begin();
|
||||
map<BufferView const *, bool>::iterator end = mouse_hover_.end();
|
||||
@ -209,14 +208,14 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
docstring InsetCommand::contextMenu(BufferView const &, int, int) const
|
||||
{
|
||||
return from_ascii("context-") + from_ascii(mailer_name_);
|
||||
return from_ascii("context-") + from_ascii(insetName(p_.code()));
|
||||
}
|
||||
|
||||
|
||||
bool InsetCommand::showInsetDialog(BufferView * bv) const
|
||||
{
|
||||
if (!mailer_name_.empty())
|
||||
bv->showDialog(mailer_name_, params2string(p_),
|
||||
if (p_.code() != NO_CODE)
|
||||
bv->showDialog(insetName(p_.code()), params2string(p_),
|
||||
const_cast<InsetCommand *>(this));
|
||||
return true;
|
||||
}
|
||||
|
@ -35,8 +35,7 @@ class InsetCommand : public Inset
|
||||
{
|
||||
public:
|
||||
///
|
||||
InsetCommand(Buffer *, InsetCommandParams const &,
|
||||
std::string const & mailer_name);
|
||||
InsetCommand(Buffer *, InsetCommandParams const &);
|
||||
///
|
||||
InsetCommand(InsetCommand const & rhs);
|
||||
///
|
||||
@ -133,8 +132,6 @@ private:
|
||||
|
||||
///
|
||||
InsetCommandParams p_;
|
||||
///
|
||||
std::string mailer_name_;
|
||||
/// changes color when mouse enters/leaves this inset
|
||||
mutable std::map<BufferView const *, bool> mouse_hover_;
|
||||
///
|
||||
|
@ -38,12 +38,12 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetFloatList::InsetFloatList(Buffer * buf)
|
||||
: InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "floatlist")
|
||||
: InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
|
||||
{}
|
||||
|
||||
|
||||
InsetFloatList::InsetFloatList(Buffer * buf, string const & type)
|
||||
: InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "floatlist")
|
||||
: InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
|
||||
{
|
||||
setParam("type", from_ascii(type));
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetHyperlink::InsetHyperlink(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "href")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -160,7 +160,7 @@ InsetLabel * createLabel(Buffer * buf, docstring const & label_str)
|
||||
|
||||
|
||||
InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "include"), include_label(uniqueID()),
|
||||
: InsetCommand(buf, p), include_label(uniqueID()),
|
||||
preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
|
||||
set_label_(false), label_(0), child_buffer_(0)
|
||||
{
|
||||
|
@ -425,7 +425,7 @@ void InsetIndexParams::read(Lexer & lex)
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
InsetPrintIndex::InsetPrintIndex(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "index_print")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetLabel::InsetLabel(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "label")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ using frontend::Painter;
|
||||
|
||||
|
||||
InsetLine::InsetLine(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "line")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace lyx {
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
InsetNomencl::InsetNomencl(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "nomenclature"),
|
||||
: InsetCommand(buf, p),
|
||||
nomenclature_entry_id(sgml::uniqueID(from_ascii("nomen")))
|
||||
{}
|
||||
|
||||
@ -135,7 +135,7 @@ void InsetNomencl::validate(LaTeXFeatures & features) const
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
InsetPrintNomencl::InsetPrintNomencl(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "nomencl_print")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetRef::InsetRef(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "ref")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetTOC::InsetTOC(Buffer * buf, InsetCommandParams const & p)
|
||||
: InsetCommand(buf, p, "toc")
|
||||
: InsetCommand(buf, p)
|
||||
{}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user