mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Qt/Mac disappearing menu syndrom, part II
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8821 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
451b1bb338
commit
3dceaedfa2
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -1,3 +1,8 @@
|
||||
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).
|
||||
|
@ -244,6 +244,18 @@ FuncStatus getStatus(FuncRequest const & ev)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -299,6 +299,8 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
|
||||
// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user