Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutchinson@novell.com>2011-02-03 05:46:37 +0300
committerMichael Hutchinson <mhutchinson@novell.com>2011-02-03 05:46:37 +0300
commit5f13bb88df0921b731e31b5f4f5c073e5d018131 (patch)
treea66805bd38ceb8b0e88152d362fdf2cf67b20638 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
parente31978e0bfed15bc710594952cd90e2a548ce502 (diff)
[Ide] Don't use /usr as dialog default path on Windows
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
index 115ed248ef..f4e874590f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs
@@ -112,8 +112,18 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
{
var dlg = new SelectFolderDialog (GettextCatalog.GetString ("Select the mono installation prefix")) {
TransientFor = this.Toplevel as Gtk.Window,
- CurrentFolder = "/usr",
};
+
+ //set a platform-dependent default folder for the dialog if possible
+ if (PropertyService.IsWindows) {
+ string folder = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
+ if (!string.IsNullOrEmpty (folder) && System.IO.Directory.Exists (folder))
+ dlg.CurrentFolder = folder;
+ } else {
+ if (System.IO.Directory.Exists ("/usr"))
+ dlg.CurrentFolder = "/usr";
+ }
+
if (!dlg.Run ())
return;