]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
* Doxy.
[lyx.git] / src / LyXFunc.cpp
index ffc723f01099f54a5b300b77c3b56d9c30f2f97d..ad802c7c2ca60862dbb5aa67b771cea5000c41b8 100644 (file)
@@ -389,7 +389,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
 
        if (cmd.action == LFUN_NOACTION) {
                flag.message(from_utf8(N_("Nothing to do")));
-               flag.enabled(false);
+               flag.setEnabled(false);
                return flag;
        }
 
@@ -399,7 +399,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_THESAURUS_ENTRY:
 #endif
                flag.unknown(true);
-               flag.enabled(false);
+               flag.setEnabled(false);
                break;
 
        default:
@@ -422,7 +422,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                // no, exit directly
                flag.message(from_utf8(N_("Command not allowed with"
                                    "out any document open")));
-               flag.enabled(false);
+               flag.setEnabled(false);
                return flag;
        }
 
@@ -433,20 +433,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        bool enable = true;
        switch (cmd.action) {
 
-       // FIXME optimally this should be in Text::getStatus. In such a case the flags
-       // are not passed when using context menu. This way it works.
-       case LFUN_SET_GRAPHICS_GROUP: {
-               if (!view())
-                       break;
-               InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(view()->cursor());
-               if (!ins)
-                       break;
-               if (!cmd.argument().empty())
-                       flag.setOnOff(to_utf8(cmd.argument()) == ins->getParams().groupId);
-               enable = true;
-               break;
-       }
-
        case LFUN_BUFFER_TOGGLE_READ_ONLY:
                flag.setOnOff(buf->isReadonly());
                break;
@@ -638,14 +624,14 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        }
 
        if (!enable)
-               flag.enabled(false);
+               flag.setEnabled(false);
 
        // Can we use a readonly buffer?
        if (buf && buf->isReadonly()
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
                flag.message(from_utf8(N_("Document is read-only")));
-               flag.enabled(false);
+               flag.setEnabled(false);
        }
 
        // Are we in a DELETED change-tracking region?
@@ -654,7 +640,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
                flag.message(from_utf8(N_("This portion of the document is deleted.")));
-               flag.enabled(false);
+               flag.setEnabled(false);
        }
 
        // the default error message if we disable the command
@@ -1424,7 +1410,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        if (argument.empty() || !lyx_view_->buffer())
                                break;
                        //view()->cursor().recordUndoFullDocument(); let inset-apply do that job
-                       InsetGraphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument);
+                       graphics::unifyGraphicsGroups(*lyx_view_->buffer(), argument);
                        lyx_view_->buffer()->markDirty();
                        updateFlags = Update::Force | Update::FitCursor;
                        break;