]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbox.C
more cleanup:
[lyx.git] / src / insets / insetbox.C
index ce28dccd9a32966f98a4c39c80f729d3a3558362..e5be700ae43f1b8afa81e8e50e1c9fa91cb4ee8f 100644 (file)
@@ -88,7 +88,7 @@ BoxTranslator const & boxtranslator_loc()
 
 void InsetBox::init()
 {
-       setInsetName("Box");
+       setInsetName(from_ascii("Box"));
        setButtonLabel();
 }
 
@@ -149,7 +149,6 @@ void InsetBox::setButtonLabel()
        BoxType btype = boxtranslator().find(params_.type);
 
        docstring label;
-       // FIXME UNICODE
        label += _("Box");
        label += " (";
        if (btype == Frameless) {
@@ -158,7 +157,7 @@ void InsetBox::setButtonLabel()
                else
                        label += _("Minipage");
        } else
-               // FXIME unicode
+               // FIXME UNICODE
                label += from_utf8(boxtranslator_loc().find(btype));
        label += ")";
 
@@ -170,13 +169,15 @@ void InsetBox::setButtonLabel()
 }
 
 
-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;
 }
 
 
@@ -198,7 +199,7 @@ void InsetBox::doDispatch(LCursor & cur, FuncRequest & cmd)
        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;