diff options
author | Lluis Sanchez <lluis@novell.com> | 2009-11-20 01:39:47 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2009-11-20 01:39:47 +0300 |
commit | 140aa46b8328b56ad100e5afc6d2b837dd0496b2 (patch) | |
tree | 672cd833a621f27eb9aaa87a22f346cdeb7227ae | |
parent | 626179e3c6b960afeb6a26f5d5677ed477787f06 (diff) |
svn path=/branches/monodevelop/extras/VersionControl.Subversion.Win32/2.2/; revision=146579extras/VersionControl.Subversion.Win32/2.2.1VersionControl.Subversion.Win32-2.2
2 files changed, 26 insertions, 1 deletions
diff --git a/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/SvnSharpClient.cs b/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/SvnSharpClient.cs index cb67ec009e..7dce4d5527 100644 --- a/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/SvnSharpClient.cs +++ b/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/SvnSharpClient.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq;
using System.Text;
using MonoDevelop.Core;
+using MonoDevelop.Core.Gui;
using MonoDevelop.VersionControl;
using MonoDevelop.VersionControl.Subversion;
using SharpSvn;
@@ -15,9 +16,21 @@ namespace SubversionAddinWindows public class SvnSharpClient: SubversionVersionControl
{
SvnClient client;
+ bool errorShown;
+ bool installError;
public SvnSharpClient ( )
{
+ try {
+ Init ();
+ }
+ catch (Exception ex) {
+ LoggingService.LogError ("SVN client could not be initialized", ex);
+ installError = true;
+ }
+ }
+ void Init ( )
+ {
client = new SvnClient ();
client.Authentication.SslClientCertificateHandlers += new EventHandler<SharpSvn.Security.SvnSslClientCertificateEventArgs> (AuthenticationSslClientCertificateHandlers);
client.Authentication.SslClientCertificatePasswordHandlers += new EventHandler<SvnSslClientCertificatePasswordEventArgs> (AuthenticationSslClientCertificatePasswordHandlers);
@@ -85,7 +98,15 @@ namespace SubversionAddinWindows public override bool IsInstalled {
get {
- return true;
+ if (!errorShown && installError) {
+ errorShown = true;
+ AlertButton db = new AlertButton ("Go to Download Page");
+ AlertButton res = MessageService.AskQuestion ("The Subversion add-in could not be initialized", "This add-in requires the 'Microsoft Visual C++ 2005 Service Pack 1 Redistributable'. You may need to install it.", db, AlertButton.Ok);
+ if (res == db) {
+ DesktopService.ShowUrl ("http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2");
+ }
+ }
+ return !installError;
}
}
diff --git a/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32.csproj b/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32.csproj index 2b4915435d..fc709cd317 100644 --- a/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32.csproj +++ b/extras/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32/VersionControl.Subversion.Win32.csproj @@ -36,6 +36,10 @@ <HintPath>..\..\..\main\build\bin\MonoDevelop.Core.dll</HintPath>
<Private>False</Private>
</Reference>
+ <Reference Include="MonoDevelop.Core.Gui, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\main\build\bin\MonoDevelop.Core.Gui.dll</HintPath>
+ </Reference>
<Reference Include="MonoDevelop.Ide, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\main\build\bin\MonoDevelop.Ide.dll</HintPath>
|