From 9ab55cbeb79485fcc433c17a1c312c83d05af703 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 16 Mar 2006 13:12:40 +0000 Subject: [PATCH] disable save when document is clean (bug 2313) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13389 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/lyxfunc.C | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cd2d312313..1c0e9aac38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-03-16 John Spray + + * lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is + clean (bug 2313) + 2006-03-15 Martin Vermeer * CutAndPaste.C (pasteSelectionHelper): comments diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 7a7882d85f..99a39f3dff 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -540,6 +540,11 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const break; } + case LFUN_MENUWRITE: { + enable = !view()->buffer()->isClean(); + break; + } + // this one is difficult to get right. As a half-baked // solution, we consider only the first action of the sequence case LFUN_SEQUENCE: { @@ -559,7 +564,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const case LFUN_CANCEL: case LFUN_META_FAKE: case LFUN_CLOSEBUFFER: - case LFUN_MENUWRITE: case LFUN_WRITEAS: case LFUN_UPDATE: case LFUN_PREVIEW: