diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2011-02-03 05:46:37 +0300 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2011-02-03 05:46:37 +0300 |
commit | 5f13bb88df0921b731e31b5f4f5c073e5d018131 (patch) | |
tree | a66805bd38ceb8b0e88152d362fdf2cf67b20638 | |
parent | e31978e0bfed15bc710594952cd90e2a548ce502 (diff) |
[Ide] Don't use /usr as dialog default path on Windows
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/MonoRuntimePanel.cs | 12 |
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; |