[Monodevelop-patches-list] r1007 - in trunk/MonoDevelop/src/Main/Base/Internal/Project: Combine Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Feb 23 15:59:08 EST 2004
Author: tberman
Date: 2004-02-23 15:59:08 -0500 (Mon, 23 Feb 2004)
New Revision: 1007
Modified:
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs
Log:
fixing unported save file dialogs
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-02-23 20:34:16 UTC (rev 1006)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-02-23 20:59:08 UTC (rev 1007)
@@ -304,20 +304,14 @@
public void SaveCombineAs()
{
- /*SaveFileDialog fdiag = new SaveFileDialog();
- fdiag.OverwritePrompt = true;
- fdiag.AddExtension = true;
-
- StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- fdiag.Filter = stringParserService.Parse("${res:SharpDevelop.FileFilter.CombineFiles}|*.cmbx|${res:SharpDevelop.FileFilter.AllFiles}|*.*");
-
- if (fdiag.ShowDialog() == DialogResult.OK) {
- string filename = fdiag.FileName;
+ Gtk.FileSelection fdiag = new Gtk.FileSelection ("Save Combine As...");
+ fdiag.Filename = System.Environment.GetEnvironmentVariable ("HOME");
+ if (fdiag.Run() == (int)Gtk.ResponseType.Ok) {
+ string filename = fdiag.Filename;
SaveCombine(filename);
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
messageService.ShowMessage(filename, resourceService.GetString("Internal.Project.Combine.CombineSavedMessage"));
- }*/
- Console.WriteLine ("Unported dialog in Combine.cs");
+ }
}
public object AddEntry(string filename)
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs 2004-02-23 20:34:16 UTC (rev 1006)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/AbstractProject.cs 2004-02-23 20:59:08 UTC (rev 1007)
@@ -512,20 +512,16 @@
public void SaveProjectAs()
{
- /*SaveFileDialog fdiag = new SaveFileDialog();
- fdiag.OverwritePrompt = true;
- fdiag.AddExtension = true;
+ Gtk.FileSelection fdiag = new Gtk.FileSelection ("Save Project As...");
+ fdiag.Filename = System.Environment.GetEnvironmentVariable ("HOME");
- fdiag.Filter = String.Join("|", (string[])(AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/Combine/FileFilter").BuildChildItems(this)).ToArray(typeof(string)));
-
- if (fdiag.ShowDialog() == DialogResult.OK) {
- string filename = fdiag.FileName;
+ if (fdiag.Run() == (int)Gtk.ResponseType.Ok) {
+ string filename = fdiag.Filename;
SaveProject(filename);
IResourceService resourceService = (IResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
messageService.ShowMessage(filename, resourceService.GetString("Internal.Project.DefaultProject.ProjectSavedMessage"));
- }*/
- Console.WriteLine ("AbstractProject.cs unported Dialog");
+ }
}
public void CopyReferencesToOutputPath(bool force)
More information about the Monodevelop-patches-list
mailing list