+2004-06-10 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * lyxfunc.C (getStatus): if lyx_gui::getStatus disables the
+ command, return early.
+
2004-06-18 Lars Gullik Bjonnes <larsbj@gullik.net>
* debug.h: add DEBUG to enum and fix size of ANY.
+2004-06-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * lyx_gui.C (getStatus): under Mac OS X, disable the
+ buffer-related lfuns when the main window does not have the focus.
+
2004-06-21 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* QCitation.[Ch]: add validation (fix bug 1617).
default:
break;
}
+
+#ifdef Q_WS_MACX
+ // 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-related.
+ if (use_gui
+ && qApp->activeWindow() != qApp->mainWidget()
+ && !lyxaction.funcHasFlag(ev.action, LyXAction::NoBuffer))
+ flag.enabled(false);
+#endif
+
return flag;
}
// the default error message if we disable the command
setStatusMessage(N_("Command disabled"));
+ if (!flag.enabled())
+ return flag;
// Check whether we need a buffer
if (!lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer) && !buf) {