]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
saner borderline between buffer and exporter
[lyx.git] / src / Text3.cpp
index 726b65b8a955a7a262d3abeadb63f377315c692d..48de101b36b9b0e96f382defe3cb1ef058035fc7 100644 (file)
@@ -1060,7 +1060,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_HYPERLINK_INSERT: {
-               InsetCommandParams p("href");
+               InsetCommandParams p(HYPERLINK_CODE);
                docstring content;
                if (cur.selection()) {
                        content = cur.selectionAsString(false);
@@ -1079,7 +1079,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        }
 
        case LFUN_LABEL_INSERT: {
-               InsetCommandParams p("label");
+               InsetCommandParams p(LABEL_CODE);
                // Try to generate a valid label
                p["name"] = (cmd.argument().empty()) ?
                        cur.getPossibleLabel() :
@@ -1697,7 +1697,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                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:
@@ -1823,11 +1823,12 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        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: