]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Look for mathed xpms. Doesn't do anything yet due to lack of workable XPMs
[lyx.git] / src / lyxfunc.C
index 9f0327bc49025c28e6f47e396a84c0c8ab71661b..6a22b5531e29df4328798807a9eb31e00b447d83 100644 (file)
@@ -332,6 +332,10 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        case LFUN_REDO:
                disable = buf->redostack.empty();
                break;
+       case LFUN_CUT:
+       case LFUN_COPY:
+               disable = !mathcursor && !view()->getLyXText()->selection.set();
+               break;
 #ifndef HAVE_LIBAIKSAURUS
        case LFUN_THESAURUS_ENTRY:
                disable = true;
@@ -361,6 +365,10 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                break;
        }
 
+       case LFUN_INSET_OPTARG:
+               disable = (TEXT(false)->cursor.par()->layout()->optionalargs == 0);
+               break;
+
        case LFUN_TABULAR_FEATURE:
                if (mathcursor) {
 #if 0
@@ -527,6 +535,9 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        case LFUN_INSERT_LABEL:
                code = Inset::LABEL_CODE;
                break;
+       case LFUN_INSET_OPTARG:
+               code = Inset::OPTARG_CODE;
+               break;
        case LFUN_REF_INSERT:
                code = Inset::REF_CODE;
                break;
@@ -577,9 +588,8 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        default:
                break;
        }
-       if (code != Inset::NO_CODE && tli && !tli->insetAllowed(code)) {
+       if (code != Inset::NO_CODE && tli && !tli->insetAllowed(code))
                disable = true;
-       }
 
        if (disable)
                flag.disabled(true);