void InsetBox::init()
{
- setInsetName("Box");
+ setInsetName(from_ascii("Box"));
setButtonLabel();
}
BoxType btype = boxtranslator().find(params_.type);
docstring label;
- // FIXME UNICODE
label += _("Box");
label += " (";
if (btype == Frameless) {
else
label += _("Minipage");
} else
- // FXIME unicode
+ // FIXME UNICODE
label += from_utf8(boxtranslator_loc().find(btype));
label += ")";
}
-void InsetBox::metrics(MetricsInfo & m, Dimension & dim) const
+bool InsetBox::metrics(MetricsInfo & m, Dimension & dim) const
{
MetricsInfo mi = m;
if (params_.inner_box || params_.special != "width")
mi.base.textwidth = params_.width.inPixels(m.base.textwidth);
InsetCollapsable::metrics(mi, dim);
+ bool const changed = dim_ != dim;
dim_ = dim;
+ return changed;
}
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
- lyxerr << "InsetBox::dispatch MODIFY" << endl;
+ //lyxerr << "InsetBox::dispatch MODIFY" << endl;
InsetBoxMailer::string2params(to_utf8(cmd.argument()), params_);
setButtonLabel();
break;