[Monodevelop-patches-list] r999 - trunk/MonoDevelop/src/Main/Base/Commands
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Feb 23 05:34:10 EST 2004
Author: jba
Date: 2004-02-23 05:34:10 -0500 (Mon, 23 Feb 2004)
New Revision: 999
Modified:
trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
Log:
fixed combine open and file open not using default location property setting
Modified: trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-02-23 09:42:11 UTC (rev 998)
+++ trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-02-23 10:34:10 UTC (rev 999)
@@ -208,10 +208,16 @@
public class OpenCombine : AbstractMenuCommand
{
+ static PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
+
public override void Run()
{
Gtk.FileSelection fs = new Gtk.FileSelection ("File to Open");
- fs.Complete (System.IO.Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "MonoDevelopProjects"));
+ string defaultFolder = PropertyService.GetProperty(
+ "ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
+ System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
+ "MonoDevelopProjects")).ToString();
+ fs.Complete (defaultFolder);
int response = fs.Run ();
string name = fs.Filename;
fs.Hide ();
@@ -244,6 +250,8 @@
public class OpenFile : AbstractMenuCommand
{
+ static PropertyService PropertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
+
public override void Run()
{
#if !GTK
@@ -294,7 +302,11 @@
}
Gtk.FileSelection fs = new Gtk.FileSelection ("File to Open");
- fs.Complete (System.IO.Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "MonoDevelopProjects"));
+ string defaultFolder = PropertyService.GetProperty(
+ "ICSharpCode.SharpDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
+ System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
+ "MonoDevelopProjects")).ToString();
+ fs.Complete (defaultFolder);
int response = fs.Run ();
string name = fs.Filename;
fs.Destroy ();
More information about the Monodevelop-patches-list
mailing list