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:
authorMikayla Hutchinson <m.j.hutchinson@gmail.com>2016-11-15 21:26:49 +0300
committerMikayla Hutchinson <m.j.hutchinson@gmail.com>2016-11-15 21:26:55 +0300
commitd4c95cb993c25daf78030daf3ef6f2e29093f2b0 (patch)
tree765fb002cd0874534a4bb66c70a4e6ac4ab22410 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs
parent13a127b46ac8536f9e8db2dcad46bddd0669a1f6 (diff)
About dialog should open License.txt
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs32
1 files changed, 24 insertions, 8 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
index a59b8a337c..4de47d8866 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
@@ -27,6 +27,7 @@
//
//
using System;
+using System.IO;
using MonoDevelop.Components;
using MonoDevelop.Core;
@@ -75,28 +76,43 @@ namespace MonoDevelop.Ide.Gui.Dialogs
Spacing = 0,
MarginLeft = 12
};
- cbox.PackStart (new Xwt.Label () {
- Text = GettextCatalog.GetString ("Visit ")
- });
var linkLabel = new Xwt.Label {
- Markup = "<span underline='true'>aka.ms/visual-studio-license</span>",
+ Markup = "<span underline='true'>License Terms</span>",
Cursor = Xwt.CursorType.Hand,
};
if (IdeTheme.UserInterfaceTheme == Theme.Light)
linkLabel.Markup = string.Format ("<span color='#5C2D91'>{0}</span>", linkLabel.Markup);
- linkLabel.ButtonReleased += (sender, e) => DesktopService.ShowUrl ("https://aka.ms/visual-studio-license");
+ linkLabel.ButtonReleased += (sender, e) => {
+ var binDir = System.IO.Path.GetDirectoryName (System.Reflection.Assembly.GetEntryAssembly ().Location);
+ string licensePath = System.IO.Path.Combine (binDir, "branding", "License.txt");
+ if (Platform.IsMac) {
+ var appDir = System.IO.Path.GetFullPath (System.IO.Path.Combine (binDir, "..", "..", "..", ".."));
+ if (appDir.EndsWith (".app", StringComparison.Ordinal)) {
+ licensePath = System.IO.Path.Combine (appDir, "Contents", "License.txt");
+ }
+ }
+ if (!File.Exists (licensePath)) {
+ MessageService.ShowError ("License file is missing");
+ } else {
+ DesktopService.OpenFile (licensePath);
+ }
+ };
cbox.PackStart (linkLabel);
infoBox.PackStart (cbox);
linkLabel = new Xwt.Label {
- Markup = string.Format ("<span underline='true'>{0}</span>", GettextCatalog.GetString ("Privacy Policy")),
+ Markup = string.Format ("<span underline='true'>{0}</span>", GettextCatalog.GetString ("Privacy Statement")),
Cursor = Xwt.CursorType.Hand,
MarginLeft = 12
};
+
+ //TODO: factor out
+ const string PRIVACY_URL = "https://go.microsoft.com/fwlink/?LinkID=824704";
+
if (IdeTheme.UserInterfaceTheme == Theme.Light)
linkLabel.Markup = string.Format ("<span color='#5C2D91'>{0}</span>", linkLabel.Markup);
- linkLabel.ButtonReleased += (sender, e) => DesktopService.ShowUrl ("https://privacy.microsoft.com/");
+ linkLabel.ButtonReleased += (sender, e) => DesktopService.ShowUrl (PRIVACY_URL);
infoBox.PackStart (linkLabel);
infoBox.PackStart (new Xwt.Label () {
@@ -120,4 +136,4 @@ namespace MonoDevelop.Ide.Gui.Dialogs
this.ShowAll ();
}
}
-} \ No newline at end of file
+}