From 5caf1bb4de291a0f586ea9f39e13cfb3aba872f3 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sun, 23 Dec 2007 19:07:46 +0000 Subject: [PATCH] * Some dialogs are independent of the lyxview. Moreover it seems that the Qt Mac application menu is handled differently such that no getStatus() is issued anymore later when opening it. Hence we have to return the correct (i.e. enable==true) value for those lfuns from the beginning. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22286 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 27a8b9fc9f..305d0da214 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -513,6 +513,15 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const case LFUN_DIALOG_TOGGLE: case LFUN_DIALOG_SHOW: case LFUN_DIALOG_UPDATE: + if (cmd.argument() == "prefs" + || cmd.argument() == "aboutlyx") + enable = true; + else if (lyx_view_) + return lyx_view_->getStatus(cmd); + else + enable = false; + break; + case LFUN_TOOLBAR_TOGGLE: case LFUN_INSET_APPLY: case LFUN_BUFFER_WRITE: