]> git.lyx.org Git - features.git/commitdiff
disable save when document is clean (bug 2313)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 16 Mar 2006 13:12:40 +0000 (13:12 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 16 Mar 2006 13:12:40 +0000 (13:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13389 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxfunc.C

index cd2d312313b03967dce12d82b0a6354e8753c9fa..1c0e9aac38e23eac0198ef85f2c8ae3e875a7cc7 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-16  John Spray  <spray@lyx.org>
+
+       * lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is
+       clean (bug 2313)
+
 2006-03-15  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * CutAndPaste.C (pasteSelectionHelper): comments
index 7a7882d85f4688cfea484db224cccb1dfbddb5fe..99a39f3dff01ec3f47683287408e0d4d2fdad85f 100644 (file)
@@ -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: