This patch disables Save when document is not changed. This is going
in trunk and branch this afternoon if nobody complains.

JMarc

Index: src/ChangeLog
===================================================================
--- src/ChangeLog	(revision 13376)
+++ src/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-03-16  John Spray  <[EMAIL PROTECTED]>
+
+	* lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is
+	clean (bug 2313)
+
 2006-03-10  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* bufferparams.C (writeLaTeX): define \labelitemi with \def. Fixes LaTeX 
Index: src/lyxfunc.C
===================================================================
--- src/lyxfunc.C	(revision 13376)
+++ src/lyxfunc.C	(working copy)
@@ -540,6 +540,11 @@
 		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 @@
 	case LFUN_CANCEL:
 	case LFUN_META_FAKE:
 	case LFUN_CLOSEBUFFER:
-	case LFUN_MENUWRITE:
 	case LFUN_WRITEAS:
 	case LFUN_UPDATE:
 	case LFUN_PREVIEW:

Reply via email to