[Monodevelop-patches-list] r2662 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Dialogs Internal/ProgressMonitoring Services/Tasks

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Mon Jul 18 07:09:05 EDT 2005


Author: lluis
Date: 2005-07-18 07:09:05 -0400 (Mon, 18 Jul 2005)
New Revision: 2662

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/ProgressMonitoring/BaseProgressMonitor.cs
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/StatusProgressMonitor.cs
Log:
2005-07-18  Lluis Sanchez Gual  <lluis at novell.com> 

	* Internal/ProgressMonitoring/BaseProgressMonitor.cs: Store the
	last reported exception object. Added ErrorException property.
	* Services/Tasks/StatusProgressMonitor.cs: Include the exception when
	showing the error dialog.
	* Gui/Dialogs/ErrorDialog.cs: Don't make it modal. There are some
	issues with that.



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-07-18 11:05:38 UTC (rev 2661)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-07-18 11:09:05 UTC (rev 2662)
@@ -1,3 +1,12 @@
+2005-07-18  Lluis Sanchez Gual  <lluis at novell.com> 
+
+	* Internal/ProgressMonitoring/BaseProgressMonitor.cs: Store the
+	last reported exception object. Added ErrorException property.
+	* Services/Tasks/StatusProgressMonitor.cs: Include the exception when
+	showing the error dialog.
+	* Gui/Dialogs/ErrorDialog.cs: Don't make it modal. There are some
+	issues with that.
+
 2005-07-16  John Luke  <john.luke at gmail.com>
 
 	* Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs:

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs	2005-07-18 11:05:38 UTC (rev 2661)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs	2005-07-18 11:09:05 UTC (rev 2662)
@@ -48,10 +48,10 @@
 			okButton.Clicked += new EventHandler (OnClose);
 		}
 		
-		public int Run ()
+		public void Run ()
 		{
 			dialog.ShowAll ();
-			return dialog.Run ();
+//			dialog.Run ();
 		}
 		
 		void OnClose (object sender, EventArgs args)

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/ProgressMonitoring/BaseProgressMonitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/ProgressMonitoring/BaseProgressMonitor.cs	2005-07-18 11:05:38 UTC (rev 2661)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/ProgressMonitoring/BaseProgressMonitor.cs	2005-07-18 11:09:05 UTC (rev 2662)
@@ -59,6 +59,7 @@
 		StringCollection errorsMessages = new StringCollection ();
 		StringCollection successMessages = new StringCollection ();
 		StringCollection warningMessages = new StringCollection ();
+		Exception errorException;
 		
 		public BaseProgressMonitor ()
 		{
@@ -109,11 +110,16 @@
 		{
 			if (message == null && ex != null)
 				message = ex.Message;
-			else if (message != null && ex != null)
-				message += ". " + ex.Message;
+			else if (message != null && ex != null) {
+				if (!message.EndsWith (".")) message += ".";
+				message += " " + ex.Message;
+			}
+			
 			errorsMessages.Add (message);
-			if (ex != null)
+			if (ex != null) {
 				Runtime.LoggingService.Info (ex);
+				errorException = ex;
+			}
 		}
 		
 		[FreeDispatch]
@@ -208,6 +214,10 @@
 			}
 		}		
 		
+		protected Exception ErrorException {
+			get { return errorException; }
+		}
+		
 		protected StringCollection Errors {
 			get { return errorsMessages; }
 		}

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/StatusProgressMonitor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/StatusProgressMonitor.cs	2005-07-18 11:05:38 UTC (rev 2661)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/StatusProgressMonitor.cs	2005-07-18 11:09:05 UTC (rev 2662)
@@ -64,7 +64,7 @@
 					string s = "";
 					foreach (string m in Errors)
 						s += m + "\n";
-					Runtime.MessageService.ShowError (s);
+					Runtime.MessageService.ShowError (ErrorException, s);
 				}
 				Gtk.Image img = Runtime.Gui.Resources.GetImage (Stock.Error, Gtk.IconSize.Menu);
 				Runtime.Gui.StatusBar.SetMessage (img, Errors [Errors.Count - 1]);




More information about the Monodevelop-patches-list mailing list