]> git.lyx.org Git - features.git/blobdiff - src/lyxfunc.C
The 'Branches' mega-patch.
[features.git] / src / lyxfunc.C
index 8c6840a28818075090b045361c6467b3e9fafb84..185600625a79d090b775b5bc73c2155570ddbbc7 100644 (file)
@@ -505,6 +505,9 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                        case InsetOld::NOTE_CODE:
                                disable = ev.argument != "note";
                                break;
+                       case InsetOld::BRANCH_CODE:
+                               disable = ev.argument != "branch";
+                               break;
                        default:
                                break;
                }
@@ -633,6 +636,11 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        case LFUN_INSERT_NOTE:
                code = InsetOld::NOTE_CODE;
                break;
+       case LFUN_INSERT_BRANCH:
+               code = InsetOld::BRANCH_CODE;
+               if (buf->params.branchlist.empty())
+                       disable = true;
+               break;
        case LFUN_INSERT_LABEL:
                code = InsetOld::LABEL_CODE;
                break;