[Monodevelop-patches-list] r1801 - in trunk/MonoDevelop/src/Main/Base: . Gui/Dialogs/OptionPanels/ProjectOptions

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jun 21 19:58:52 EDT 2004


Author: jluke
Date: 2004-06-21 19:58:52 -0400 (Mon, 21 Jun 2004)
New Revision: 1801

Modified:
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
Log:
 * Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs:
+       use the messageservice for a the error dialog
+       don't skip the first item when storing whether files should be
+       included, fixes bug # 60363


Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-06-21 22:40:52 UTC (rev 1800)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-06-21 23:58:52 UTC (rev 1801)
@@ -1,3 +1,10 @@
+2004-06-21  John Luke <jluke at cfl.rr.com>
+
+	* Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs:
+	use the messageservice for a the error dialog
+	don't skip the first item when storing whether files should be	
+	included, fixes bug # 60363
+
 2004-06-21  Todd Berman  <tberman at off.net>
 
 	* Commands/AutostartCommands.cs: workaround icewm issue, dont show

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-06-21 22:40:52 UTC (rev 1800)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-06-21 23:58:52 UTC (rev 1801)
@@ -12,23 +12,20 @@
 using System.ComponentModel;
 
 using MonoDevelop.Core.AddIns.Codons;
-
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Core.Services;
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Gui.Components;
 using MonoDevelop.Services;
+using MonoDevelop.Gui.Widgets;
 
 using Gtk;
-using MonoDevelop.Gui.Widgets;
 
 namespace MonoDevelop.Gui.Dialogs.OptionPanels
 {
-	/// <summary>
-	/// Summary description for Form1.
-	/// </summary>
 	public class CompileFileProjectOptions : AbstractOptionPanel
 	{
+		static MessageService messageService = (MessageService) ServiceManager.Services.GetService (typeof (MessageService));
 
 		class CompileFileOptionsWidget : GladeWidgetExtract 
 		{
@@ -38,10 +35,8 @@
 			public ListStore store;
 			
 			// Services
-			StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (
-							typeof (StringParserService));
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(
-				typeof(FileUtilityService));
+			StringParserService StringParserService = (StringParserService) ServiceManager.Services.GetService (typeof (StringParserService));
+			FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.Services.GetService (typeof (FileUtilityService));
 
 			IProject project;
 
@@ -88,8 +83,10 @@
 				TreeIter first;	
 				store.GetIterFirst(out first);
 				TreeIter current = first;
+
 				for (int i = 0; i < store.IterNChildren() - 1 ; ++i) {
-					store.IterNext(ref current);
+					if (i != 0)
+						store.IterNext(ref current);
 					string name = fileUtilityService.RelativeToAbsolutePath(
 						project.BaseDirectory, "." + System.IO.Path.DirectorySeparatorChar + store.GetValue(current, 1));
 					int j = 0;
@@ -99,14 +96,7 @@
 					if (j < project.ProjectFiles.Count) {
 						project.ProjectFiles[j].BuildAction = (bool) store.GetValue(current, 0) ? BuildAction.Compile : BuildAction.Nothing;
 					} else {
-						MessageDialog dialog = new MessageDialog ((Window) WorkbenchSingleton.Workbench, 
-								DialogFlags.DestroyWithParent,
-								MessageType.Error, 
-								ButtonsType.Close, 
-								String.Format (GettextCatalog.GetString ("File {0} not found in {1}."), name, project.Name));
-						dialog.Run ();
-						dialog.Hide ();
-						dialog.Dispose ();
+						messageService.ShowError (String.Format (GettextCatalog.GetString ("File {0} not found in {1}."), name, project.Name));
 						success = false;
 					}
 				}




More information about the Monodevelop-patches-list mailing list