diff options
author | Lluis Sanchez Gual <lluis@novell.com> | 2010-11-12 12:53:13 +0300 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@novell.com> | 2010-11-12 12:53:13 +0300 |
commit | 06f4f755e7f8999062a6770d352b3390d9e910f1 (patch) | |
tree | 4985adcaa187807a7243099787cdb2ba5db502fe /main | |
parent | eb6727578e58ce6c0e2657752e414aba88f5ce59 (diff) |
Moved code for opening folders to the platform service.
Diffstat (limited to 'main')
3 files changed, 11 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs index e3611d325f..ad0e3ff933 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs @@ -64,6 +64,11 @@ namespace MonoDevelop.Ide.Desktop Process.Start ("file://" + filename); } + public virtual void OpenFolder (FilePath folderPath) + { + Process.Start ("file://" + folderPath); + } + public virtual void ShowUrl (string url) { Process.Start (url); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs index 56c7d2f38c..f62dbbcb6d 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs @@ -71,7 +71,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad foreach (ITreeNavigator node in CurrentNodes) { string path = GetDir (node.DataItem); if (!string.IsNullOrEmpty (path) && paths.Add (path)) - System.Diagnostics.Process.Start ("file://" + path); + DesktopService.OpenFolder (path); } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs index e96ab28fc8..39446a5c07 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs @@ -89,6 +89,11 @@ namespace MonoDevelop.Ide platformService.OpenFile (filename); } + public static void OpenFolder (FilePath folderPath) + { + platformService.OpenFolder (folderPath); + } + public static string GetMimeTypeForUri (string uri) { return platformService.GetMimeTypeForUri (uri); |