+ else if (cmd.action() == LFUN_UNKNOWN_ACTION) {
+ status.setUnknown(true);
+ status.message(from_utf8(N_("Unknown action")));
+ status.setEnabled(false);
+ }
+
+ // Does the GuiApplication know something?
+ else if (getStatus(cmd, status)) { }
+
+ // If we do not have a GuiView, then other functions are disabled
+ else if (!current_view_)
+ status.setEnabled(false);
+
+ // Does the GuiView know something?
+ else if (current_view_->getStatus(cmd, status)) { }
+
+ // In LyX/Mac, when a dialog is open, the menus of the
+ // application can still be accessed without giving focus to
+ // the main window. In this case, we want to disable the menu
+ // entries that are buffer or view-related.
+ //FIXME: Abdel (09/02/10) This has very bad effect on Linux, don't know why...
+ /*
+ else if (cmd.origin() == FuncRequest::MENU && !current_view_->hasFocus())
+ status.setEnabled(false);
+ */
+
+ // If we do not have a BufferView, then other functions are disabled
+ else if (!(bv = current_view_->currentBufferView()))
+ status.setEnabled(false);
+
+ // Does the current BufferView know something?
+ else if (bv->getStatus(cmd, status)) { }
+
+ // Does the current Buffer know something?
+ else if (bv->buffer().getStatus(cmd, status)) { }
+
+ // If we do not have a document BufferView, different from the
+ // current BufferView, then other functions are disabled
+ else if (!(doc_bv = current_view_->documentBufferView()) || doc_bv == bv)
+ status.setEnabled(false);
+
+ // Does the document Buffer know something?
+ else if (doc_bv->buffer().getStatus(cmd, status)) { }
+
+ else {
+ LYXERR(Debug::ACTION, "LFUN not handled in getStatus(): " << cmd);
+ status.message(from_utf8(N_("Command not handled")));
+ status.setEnabled(false);