[Monodevelop-patches-list] r610 - trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Jan 21 20:45:58 EST 2004


Author: jluke
Date: 2004-01-21 20:45:58 -0500 (Wed, 21 Jan 2004)
New Revision: 610

Modified:
   trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
Log:
port the two unported dialogs here


Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-01-21 04:06:34 UTC (rev 609)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-01-22 01:45:58 UTC (rev 610)
@@ -74,14 +74,14 @@
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			
 			if (node != null) {
-				/*using (OpenFileDialog fdiag = new OpenFileDialog()) {
-					fdiag.AddExtension    = true;
+				Gtk.FileSelection fdiag = new Gtk.FileSelection ("Add a Project");
+					//fdiag.AddExtension    = true;
 					StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
-					fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.ProjectFiles}|*.prjx|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-					fdiag.Multiselect     = false;
-					fdiag.CheckFileExists = true;
-					if (fdiag.ShowDialog() == DialogResult.OK) {
-						object obj = node.Combine.AddEntry(fdiag.FileName);
+					//fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.ProjectFiles}|*.prjx|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+					fdiag.SelectMultiple = false;
+					//fdiag.CheckFileExists = true;
+					if (fdiag.Run () == (int) Gtk.ResponseType.Ok) {
+						object obj = node.Combine.AddEntry(fdiag.Filename);
 						if (obj is IProject) {
 							node.Nodes.Add(ProjectBrowserView.BuildProjectTreeNode((IProject)obj));
 						} else {
@@ -89,8 +89,8 @@
 						}
 						projectService.SaveCombine();
 					}
-				}*/
-				Console.WriteLine ("Unported dialog in CombineNodeCommands.cs");
+
+					fdiag.Hide ();
 			}
 		}
 	}
@@ -104,14 +104,14 @@
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			
 			if (node != null) {
-				/*using (OpenFileDialog fdiag = new OpenFileDialog()) {
-					fdiag.AddExtension    = true;
+				Gtk.FileSelection fdiag = new Gtk.FileSelection ("Add a Combine");
+					//fdiag.AddExtension    = true;
 					StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
-					fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.CombineFiles}|*.cmbx|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-					fdiag.Multiselect     = false;
-					fdiag.CheckFileExists = true;
-					if (fdiag.ShowDialog() == DialogResult.OK) {
-						object obj = node.Combine.AddEntry(fdiag.FileName);
+					//fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.CombineFiles}|*.cmbx|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
+					fdiag.SelectMultiple = false;
+					//fdiag.CheckFileExists = true;
+					if (fdiag.Run () == (int) Gtk.ResponseType.Ok) {
+						object obj = node.Combine.AddEntry(fdiag.Filename);
 						if (obj is IProject) {
 							node.Nodes.Add(ProjectBrowserView.BuildProjectTreeNode((IProject)obj));
 						} else {
@@ -119,8 +119,7 @@
 						}
 						projectService.SaveCombine();
 					}
-				}*/
-				Console.WriteLine ("unported dialog in CombineNodeCommands.cs");
+					fdiag.Hide ();
 			}
 		}
 	}




More information about the Monodevelop-patches-list mailing list