]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.cpp
Comments.
[lyx.git] / src / insets / InsetBox.cpp
index 38c864ccbc2402170fea0429d98f28b2f507c01a..03cdc318a4bd3aef4acf0fa5f897f8879f737e62 100644 (file)
@@ -212,10 +212,13 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action()) {
 
        case LFUN_INSET_MODIFY:
-               if (cmd.getArg(0) == "changetype")
-                       flag.setOnOff(cmd.getArg(1) == params_.type);
-               flag.setEnabled(true);
-               return true;
+               if (cmd.getArg(0) == "changetype") {
+                       string const type = cmd.getArg(1);
+                       flag.setOnOff(type == params_.type);
+                       flag.setEnabled(!params_.inner_box || type != "Framed");
+                       return true;
+               }
+               return InsetCollapsable::getStatus(cur, cmd, flag);
 
        case LFUN_INSET_DIALOG_UPDATE:
                flag.setEnabled(true);
@@ -309,7 +312,7 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
                os << "\\shadowbox{";
                break;
        case Shaded:
-               // must be set later becaue e.g. the width settings only work when
+               // must be set later because e.g. the width settings only work when
                // it is inside a minipage or parbox
                break;
        case Doublebox:
@@ -527,9 +530,9 @@ void InsetBox::validate(LaTeXFeatures & features) const
 }
 
 
-docstring InsetBox::contextMenuName() const
+string InsetBox::contextMenuName() const
 {
-       return from_ascii("context-box");
+       return "context-box";
 }