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

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/windoc
diff options
context:
space:
mode:
authorJeremie Laval <jeremie.laval@gmail.com>2012-06-12 16:16:53 +0400
committerJeremie Laval <jeremie.laval@gmail.com>2012-06-12 16:17:31 +0400
commit73a689b9601891f77dbbf57554a0030d71869a2e (patch)
treec9c282e3fde9307cb88e2b88417dba576f188ac1 /windoc
parentc81b42c94adcaaecf884b526fcff92e466872037 (diff)
[windoc] Add support for external url launching
Diffstat (limited to 'windoc')
-rw-r--r--windoc/WinDoc/Program.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/windoc/WinDoc/Program.cs b/windoc/WinDoc/Program.cs
index ed2986bf..6bd8308b 100644
--- a/windoc/WinDoc/Program.cs
+++ b/windoc/WinDoc/Program.cs
@@ -24,11 +24,18 @@ namespace WinDoc
{ "docdir=", dir => docSources.Add (dir) },
}.Parse (args);
+ if (initialUrl.StartsWith ("mdoc://")) {
+ initialUrl = initialUrl.Substring ("mdoc://".Length); // Remove leading scheme
+ initialUrl = initialUrl.Substring (0, initialUrl.Length - 1); // Remove trailing '/'
+ initialUrl = Uri.UnescapeDataString (initialUrl); // Unescape URL
+ }
+
SetupLogging ();
PrepareCache ();
ExtractImages ();
// Load documentation
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (typeof (Program).Assembly.Location));
Root = RootTree.LoadTree (null);
foreach (var dir in docSources)
Root.AddSource (dir);