[Monodevelop-patches-list] r2009 - in trunk/MonoDevelop/Core/src/Main/Base: . Commands

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Fri Oct 29 17:55:35 EDT 2004


Author: tberman
Date: 2004-10-29 17:55:35 -0400 (Fri, 29 Oct 2004)
New Revision: 2009

Modified:
   trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
   trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs
Log:
disable save if current document is not changed.


Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-10-29 21:23:31 UTC (rev 2008)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-10-29 21:55:35 UTC (rev 2009)
@@ -1,3 +1,8 @@
+2004-10-29  Todd Berman  <tberman at off.net>
+
+	* Commands/FileCommands.cs: Patch from Valters Svabe
+	<valters at inbox.lv> to close bug #62300
+
 2004-10-28  Todd Berman  <tberman at off.net>
 
 	* Services/File/RecentFiles.cs: Remove C.WL

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs	2004-10-29 21:23:31 UTC (rev 2008)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs	2004-10-29 21:55:35 UTC (rev 2009)
@@ -88,6 +88,17 @@
 				}
 			}
 		}
+		
+		public override bool IsEnabled {
+			get {
+				IWorkbenchWindow window   = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
+				IViewContent content = window != null ? window.ActiveViewContent as IViewContent : null;
+				if (content != null) {
+					return content.IsDirty;
+				}
+				return false;
+			}
+		}
 	} 
 
 	public class ReloadFile : AbstractMenuCommand




More information about the Monodevelop-patches-list mailing list