#include "InsetCommand.h"
+#include "Buffer.h"
#include "BufferView.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
using std::string;
using std::istringstream;
-using std::ostream;
using std::ostringstream;
{
if (updateButtonLabel_) {
updateButtonLabel_ = false;
- button_.update(getScreenLabel(*mi.base.bv->buffer()),
+ button_.update(getScreenLabel(mi.base.bv->buffer()),
editable() != NOT_EDITABLE);
}
button_.metrics(mi, dim);
int InsetCommand::latex(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
os << getCommand();
return 0;
}
-int InsetCommand::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+int InsetCommand::plaintext(Buffer const & buf, odocstream & os,
+ OutputParams const &) const
{
- docstring const str = "[" + _("LaTeX Command: ") + from_utf8(getCmdName()) + "]";
+ docstring const str = "[" + buf.B_("LaTeX Command: ") + from_utf8(getCmdName()) + "]";
os << str;
return str.size();
}
int InsetCommand::docbook(Buffer const &, odocstream &,
- OutputParams const &) const
+ OutputParams const &) const
{
return 0;
}
}
case LFUN_MOUSE_RELEASE: {
- if (!mailer_name_.empty())
+ if (!mailer_name_.empty() && !cur.selection())
InsetCommandMailer(mailer_name_, *this).showDialog(&cur.bv());
break;
}
default:
- InsetBase::doDispatch(cur, cmd);
+ Inset::doDispatch(cur, cmd);
break;
}
status.enabled(true);
return true;
default:
- return InsetBase::getStatus(cur, cmd, status);
+ return Inset::getStatus(cur, cmd, status);
}
}
return print_mailer_error("InsetCommandMailer", in, 1, name);
// This is part of the inset proper that is usually swallowed
- // by LyXText::readInset
+ // by Text::readInset
string id;
lex >> id;
if (!lex || id != "LatexCommand")