}
case LFUN_HYPERLINK_INSERT: {
- InsetCommandParams p("href");
+ InsetCommandParams p(HYPERLINK_CODE);
docstring content;
if (cur.selection()) {
content = cur.selectionAsString(false);
}
case LFUN_LABEL_INSERT: {
- InsetCommandParams p("label");
+ InsetCommandParams p(LABEL_CODE);
// Try to generate a valid label
p["name"] = (cmd.argument().empty()) ?
cur.getPossibleLabel() :
break;
case LFUN_BRANCH_INSERT:
code = BRANCH_CODE;
- if (cur.buffer().getMasterBuffer()->params().branchlist().empty())
+ if (cur.buffer().masterBuffer()->params().branchlist().empty())
enable = false;
break;
case LFUN_LABEL_INSERT:
case LFUN_INSET_DISSOLVE:
if (!cmd.argument().empty()) {
InsetLayout il = cur.inset().getLayout(cur.buffer().params());
- enable = (cur.inset().lyxCode() == FLEX_CODE)
- && (il.lyxtype == to_utf8(cmd.argument()));
- } else
+ enable = cur.inset().lyxCode() == FLEX_CODE
+ && il.lyxtype == to_utf8(cmd.argument());
+ } else {
enable = !isMainText(cur.bv().buffer())
- && cur.inset().nargs() == 1;
+ && cur.inset().nargs() == 1;
+ }
break;
case LFUN_CHANGE_ACCEPT: