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:
authorLluis Sanchez Gual <lluis@xamarin.com>2015-07-22 11:51:23 +0300
committerLluis Sanchez Gual <lluis@xamarin.com>2015-07-22 11:51:23 +0300
commit7e3b6535ab1d8e3350a0d3e30c7b434773fd4b50 (patch)
tree3c1b11f271aff65a970aaddde885867b558070b5 /main/src/addins
parent9c6aa547c43a7fcb59c62bccbf7f3d69e568af33 (diff)
parent7bcb8ecc7194fef55cd4f7a8d045130ec782e139 (diff)
Merge remote-tracking branch 'origin/master' into roslyn
Diffstat (limited to 'main/src/addins')
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs46
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs10
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs129
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj2
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs74
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/TfsSmartSubtransport.cs159
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs2
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs3
-rw-r--r--main/src/addins/WindowsPlatform/WindowsPlatform/JumpList.cs20
-rw-r--r--main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs4
10 files changed, 403 insertions, 46 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs
index f620d07c58..13b590023a 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/TestEvaluation.cs
@@ -78,6 +78,28 @@ namespace MonoDevelop.Debugger.Tests.TestApp
{
return 6;
}
+
+ public override int OverridenMethodInt ()
+ {
+ return 6;
+ }
+
+ public override int OverridenPropertyInt {
+ get {
+ return 6;
+ }
+ }
+
+ public override string OverridenMethodString ()
+ {
+ return "6";
+ }
+
+ public override string OverridenPropertyString {
+ get {
+ return "6";
+ }
+ }
}
class TestEvaluation : TestEvaluationParent
@@ -166,6 +188,8 @@ namespace MonoDevelop.Debugger.Tests.TestApp
}
}
+ var testEvaluationChild = new TestEvaluationChild ();
+
Console.WriteLine (n); /*break*/
}
@@ -269,6 +293,28 @@ namespace MonoDevelop.Debugger.Tests.TestApp
{
return 5;
}
+
+ public virtual int OverridenMethodInt ()
+ {
+ return 5;
+ }
+
+ public virtual int OverridenPropertyInt {
+ get {
+ return 5;
+ }
+ }
+
+ public virtual string OverridenMethodString ()
+ {
+ return "5";
+ }
+
+ public virtual string OverridenPropertyString {
+ get {
+ return "5";
+ }
+ }
}
public class SomeClassInNamespace
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs
index 033e45bb70..6b2e752541 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/DebugTests.cs
@@ -224,6 +224,9 @@ namespace MonoDevelop.Debugger.Tests
default:
throw new Exception ("Timeout while waiting for initial breakpoint");
}
+ if (Session is SoftDebuggerSession) {
+ Console.WriteLine ("SDB protocol version:" + ((SoftDebuggerSession)Session).ProtocolVersion);
+ }
}
void GetLineAndColumn (string breakpointMarker, int offset, string statement, out int line, out int col)
@@ -401,6 +404,13 @@ namespace MonoDevelop.Debugger.Tests
static class EvalHelper
{
+ public static bool AtLeast (this Version ver, int major, int minor) {
+ if ((ver.Major > major) || ((ver.Major == major && ver.Minor >= minor)))
+ return true;
+ else
+ return false;
+ }
+
public static ObjectValue Sync (this ObjectValue val)
{
if (!val.IsEvaluating)
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
index 9371dfa6f2..4f06ceae1d 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/EvaluationTests.cs
@@ -177,6 +177,11 @@ namespace MonoDevelop.Debugger.Tests
public virtual void HiddenMembers ()
{
IgnoreCorDebugger ("TODO");
+ if (Session is SoftDebuggerSession) {
+ if (!((SoftDebuggerSession)Session).ProtocolVersion.AtLeast (2, 40)) {
+ Assert.Ignore ("Need newer Mono with SDB protocol 2.40+");
+ }
+ }
ObjectValue val;
val = Eval ("HiddenField");
Assert.AreEqual ("5", val.Value);
@@ -203,6 +208,122 @@ namespace MonoDevelop.Debugger.Tests
}
Assert.AreEqual ("5", val.Value);
Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("OverridenPropertyInt");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("OverridenMethodInt()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("OverridenPropertyString");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("\"6\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("OverridenMethodString()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("\"6\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+
+
+ val = Eval ("testEvaluationChild.HiddenField");
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("testEvaluationChild.HiddenProperty");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("testEvaluationChild.HiddenMethod()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("testEvaluationChild.OverridenPropertyInt");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("testEvaluationChild.OverridenMethodInt()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("testEvaluationChild.OverridenPropertyString");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("\"6\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("testEvaluationChild.OverridenMethodString()");
+ if (!AllowTargetInvokes) {
+ var options = Session.Options.EvaluationOptions.Clone ();
+ options.AllowTargetInvoke = true;
+
+ val.Refresh (options);
+ val = val.Sync ();
+ }
+ Assert.AreEqual ("\"6\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
}
[Test]
@@ -610,7 +731,7 @@ namespace MonoDevelop.Debugger.Tests
Assert.AreEqual ("bool", val.TypeName);
val = Eval ("alist.Count");
- if (!AllowTargetInvokes && soft == null) {
+ if (!AllowTargetInvokes) {
// Note: this is a simple property which gets evaluated client-side by the SDB backend
var options = Session.Options.EvaluationOptions.Clone ();
options.AllowTargetInvoke = true;
@@ -1659,7 +1780,7 @@ namespace MonoDevelop.Debugger.Tests
Assert.Ignore ("A newer version of the Mono runtime is required.");
val = Eval ("a.Prop");
- if (!AllowTargetInvokes && soft == null) {
+ if (!AllowTargetInvokes) {
var options = Session.Options.EvaluationOptions.Clone ();
options.AllowTargetInvoke = true;
@@ -1683,7 +1804,7 @@ namespace MonoDevelop.Debugger.Tests
Assert.AreEqual ("int", val.TypeName);
val = Eval ("a.PropNoVirt2");
- if (!AllowTargetInvokes && soft == null) {
+ if (!AllowTargetInvokes) {
var options = Session.Options.EvaluationOptions.Clone ();
options.AllowTargetInvoke = true;
@@ -1735,7 +1856,7 @@ namespace MonoDevelop.Debugger.Tests
Assert.AreEqual ("int", val.TypeName);
val = Eval ("b.Prop");
- if (!AllowTargetInvokes && soft == null) {
+ if (!AllowTargetInvokes) {
var options = Session.Options.EvaluationOptions.Clone ();
options.AllowTargetInvoke = true;
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
index 1c05383835..12e0013822 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
@@ -113,6 +113,7 @@
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Mono.Posix" />
<Reference Include="System.Core" />
+ <Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -157,6 +158,7 @@
<Compile Include="MonoDevelop.VersionControl.Git\GitSelectRevisionDialog.cs" />
<Compile Include="AddinInfo.cs" />
<Compile Include="MonoDevelop.VersionControl.Git\ProjectTemplateHandler.cs" />
+ <Compile Include="MonoDevelop.VersionControl.Git\TfsSmartSubtransport.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
index b83d45bcb7..42a84cd191 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
@@ -599,39 +599,47 @@ namespace MonoDevelop.VersionControl.Git
static void RetryUntilSuccess (ProgressMonitor monitor, Action func)
{
bool retry;
- do {
- try {
- func ();
- GitCredentials.StoreCredentials ();
- retry = false;
- } catch (AuthenticationException) {
- GitCredentials.InvalidateCredentials ();
- retry = true;
- } catch (VersionControlException e) {
- GitCredentials.InvalidateCredentials ();
- if (monitor != null)
- monitor.ReportError (e.Message, null);
- retry = false;
- } catch (UserCancelledException) {
- GitCredentials.StoreCredentials ();
- retry = false;
- } catch (LibGit2SharpException e) {
- GitCredentials.InvalidateCredentials ();
-
- string message;
- // TODO: Remove me once https://github.com/libgit2/libgit2/pull/3137 goes in.
- if (string.Equals (e.Message, "early EOF", StringComparison.OrdinalIgnoreCase))
- message = "Unable to authorize credentials for the repository.";
- else if (string.Equals (e.Message, "Received unexpected content-type", StringComparison.OrdinalIgnoreCase))
- message = "Not a valid git repository.";
- else
- message = e.Message;
-
- if (monitor != null)
- monitor.ReportError (message, null);
- retry = false;
- }
- } while (retry);
+ using (var tfsSession = new TfsSmartSession ()) {
+ do {
+ try {
+ func ();
+ GitCredentials.StoreCredentials ();
+ retry = false;
+ } catch (AuthenticationException) {
+ GitCredentials.InvalidateCredentials ();
+ retry = true;
+ } catch (VersionControlException e) {
+ GitCredentials.InvalidateCredentials ();
+ if (monitor != null)
+ monitor.ReportError (e.Message, null);
+ retry = false;
+ } catch (UserCancelledException) {
+ GitCredentials.StoreCredentials ();
+ retry = false;
+ } catch (LibGit2SharpException e) {
+ if (!tfsSession.Disposed) {
+ retry = true;
+ tfsSession.Dispose ();
+ continue;
+ }
+
+ GitCredentials.InvalidateCredentials ();
+
+ string message;
+ // TODO: Remove me once https://github.com/libgit2/libgit2/pull/3137 goes in.
+ if (string.Equals (e.Message, "early EOF", StringComparison.OrdinalIgnoreCase))
+ message = "Unable to authorize credentials for the repository.";
+ else if (string.Equals (e.Message, "Received unexpected content-type", StringComparison.OrdinalIgnoreCase))
+ message = "Not a valid git repository.";
+ else
+ message = e.Message;
+
+ if (monitor != null)
+ monitor.ReportError (message, null);
+ retry = false;
+ }
+ } while (retry);
+ }
}
public void Fetch (ProgressMonitor monitor, string remote)
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/TfsSmartSubtransport.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/TfsSmartSubtransport.cs
new file mode 100644
index 0000000000..5d90c377b4
--- /dev/null
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/TfsSmartSubtransport.cs
@@ -0,0 +1,159 @@
+//
+// NtlmSmartSubtransport.cs
+//
+// Author:
+// Marius Ungureanu <marius.ungureanu@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Net.Http;
+using LibGit2Sharp;
+using System.IO;
+
+namespace MonoDevelop.VersionControl.Git
+{
+ public class TfsSmartSession : IDisposable
+ {
+ readonly SmartSubtransportRegistration<TfsSmartSubtransport> httpRegistration;
+ readonly SmartSubtransportRegistration<TfsSmartSubtransport> httpsRegistration;
+
+ public TfsSmartSession ()
+ {
+ httpRegistration = GlobalSettings.RegisterSmartSubtransport<TfsSmartSubtransport> ("http");
+ httpsRegistration = GlobalSettings.RegisterSmartSubtransport<TfsSmartSubtransport> ("https");
+ }
+
+ public bool Disposed { get; private set; }
+ public void Dispose ()
+ {
+ if (!Disposed) {
+ GlobalSettings.UnregisterSmartSubtransport<TfsSmartSubtransport> (httpRegistration);
+ GlobalSettings.UnregisterSmartSubtransport<TfsSmartSubtransport> (httpsRegistration);
+ Disposed = true;
+ }
+ }
+ }
+
+ public class TfsSmartSubtransport : RpcSmartSubtransport
+ {
+ protected override SmartSubtransportStream Action(string url, GitSmartSubtransportAction action)
+ {
+ string postContentType = null;
+ string serviceUri;
+
+ switch (action) {
+ case GitSmartSubtransportAction.UploadPackList:
+ serviceUri = url + "/info/refs?service=git-upload-pack";
+ break;
+ case GitSmartSubtransportAction.UploadPack:
+ serviceUri = url + "/git-upload-pack";
+ postContentType = "application/x-git-upload-pack-request";
+ break;
+ case GitSmartSubtransportAction.ReceivePackList:
+ serviceUri = url + "/info/refs?service=git-receive-pack";
+ break;
+ case GitSmartSubtransportAction.ReceivePack:
+ serviceUri = url + "/git-receive-pack";
+ postContentType = "application/x-git-receive-pack-request";
+ break;
+ default:
+ throw new InvalidOperationException();
+ }
+
+ // Grab the credentials from the user.
+ var cred = (UsernamePasswordCredentials)GitCredentials.TryGet (url, "", SupportedCredentialTypes.UsernamePassword);
+
+ var httpClient = new HttpClient (new HttpClientHandler { Credentials = new System.Net.NetworkCredential (cred.Username, cred.Password) }) {
+ Timeout = TimeSpan.FromMinutes (1.0),
+ };
+
+ return new TfsSmartSubtransportStream(this) {
+ HttpClient = httpClient,
+ ServiceUri = new Uri (serviceUri),
+ PostContentType = postContentType,
+ };
+ }
+
+ class TfsSmartSubtransportStream : SmartSubtransportStream
+ {
+ public HttpClient HttpClient;
+ public Uri ServiceUri;
+ public string PostContentType;
+
+ Lazy<Stream> responseStream;
+ MemoryStream requestStream;
+
+ public TfsSmartSubtransportStream(SmartSubtransport smartSubtransport) : base(smartSubtransport)
+ {
+ responseStream = new Lazy<Stream> (CreateResponseStream);
+ }
+
+ Stream CreateResponseStream()
+ {
+ HttpResponseMessage result;
+
+ if (requestStream == null)
+ result = HttpClient.GetAsync (ServiceUri, HttpCompletionOption.ResponseHeadersRead).Result;
+ else {
+ requestStream.Seek (0, SeekOrigin.Begin);
+
+ var streamContent = new StreamContent (requestStream);
+ if (!string.IsNullOrEmpty (PostContentType))
+ streamContent.Headers.Add ("Content-Type", PostContentType);
+
+ result = HttpClient.SendAsync (new HttpRequestMessage (HttpMethod.Post, ServiceUri) {
+ Content = streamContent,
+ }, HttpCompletionOption.ResponseHeadersRead).Result;
+ }
+
+ return result.EnsureSuccessStatusCode().Content.ReadAsStreamAsync().Result;
+ }
+
+ public override int Read(Stream dataStream, long length, out long bytesRead)
+ {
+ bytesRead = 0L;
+ var buffer = new byte[64 * 1024];
+ int count;
+
+ while (length > 0 && (count = responseStream.Value.Read(buffer, 0, (int)Math.Min(buffer.Length, length))) > 0) {
+ dataStream.Write(buffer, 0, count);
+ bytesRead += (long)count;
+ length -= (long)count;
+ }
+ return 0;
+ }
+
+ public override int Write(Stream dataStream, long length)
+ {
+ requestStream = requestStream ?? new MemoryStream ();
+
+ var buffer = new byte[64 * 1024];
+ int count;
+ while (length > 0 && (count = dataStream.Read(buffer, 0, (int)Math.Min(buffer.Length, length))) > 0) {
+ requestStream.Write(buffer, 0, count);
+ length -= (long)count;
+ }
+ return 0;
+ }
+ }
+ }
+}
+
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
index 6b7d2f34ca..e2fcd3cee5 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
@@ -44,7 +44,7 @@ namespace MonoDevelop.VersionControl
VersionControlSystem = vcs;
Repositories.SetValue (Repositories.Count + 1, string.Format ("Repository #{0}", Repositories.Count + 1), new Dictionary<string, string> {
{ "Type", vcs.Name },
- { "Version", vcs.Version },
+ { "Type+Version", string.Format ("{0} {1}", vcs.Name, vcs.Version) },
});
}
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
index 175ad51185..4aee516289 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
@@ -124,9 +124,10 @@ namespace MonoDevelop.VersionControl
switch (status & VersionStatus.LocalChangesMask) {
case VersionStatus.Modified:
- case VersionStatus.ScheduledReplace:
case VersionStatus.ScheduledIgnore:
return overlay_modified;
+ case VersionStatus.ScheduledReplace:
+ return overlay_renamed;
case VersionStatus.Conflicted:
return overlay_conflicted;
case VersionStatus.ScheduledAdd:
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/JumpList.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/JumpList.cs
index aaf01a6545..67ec27e51e 100644
--- a/main/src/addins/WindowsPlatform/WindowsPlatform/JumpList.cs
+++ b/main/src/addins/WindowsPlatform/WindowsPlatform/JumpList.cs
@@ -74,7 +74,10 @@ namespace MonoDevelop.Platform
private void UpdateJumpList ()
{
- Taskbar.JumpList jumplist = Taskbar.JumpList.CreateJumpList ();
+ Taskbar.JumpList jumplist = Taskbar.JumpList.CreateJumpListForIndividualWindow (
+ MonoDevelop.Core.BrandingService.ApplicationName,
+ GdkWin32.HgdiobjGet (MessageService.RootWindow.GdkWindow)
+ );
jumplist.KnownCategoryToDisplay = Taskbar.JumpListKnownCategoryType.Neither;
Taskbar.JumpListCustomCategory recentProjectsCategory = new Taskbar.JumpListCustomCategory ("Recent Solutions");
@@ -88,27 +91,34 @@ namespace MonoDevelop.Platform
// has been registered as supported in the registry can be added.
bool isSupportedFileExtension = this.supportedExtensions.Contains (Path.GetExtension (recentProject.FileName));
if (isSupportedFileExtension) {
- recentProjectsCategory.AddJumpListItems (new Taskbar.JumpListItem (recentProject.FileName));
+ recentProjectsCategory.AddJumpListItems (new Taskbar.JumpListLink (exePath, recentProject.DisplayName) {
+ Arguments = MonoDevelop.Core.Execution.ProcessArgumentBuilder.Quote (recentProject.FileName),
+ IconReference = new Microsoft.WindowsAPICodePack.Shell.IconReference (exePath, 0),
+ });
}
}
foreach (RecentFile recentFile in recentFiles.GetFiles ()) {
if (this.supportedExtensions.Contains (Path.GetExtension (recentFile.FileName)))
- recentFilesCategory.AddJumpListItems (new Taskbar.JumpListItem (recentFile.FileName));
+ recentFilesCategory.AddJumpListItems (new Taskbar.JumpListLink (exePath, recentFile.DisplayName) {
+ Arguments = MonoDevelop.Core.Execution.ProcessArgumentBuilder.Quote (recentFile.FileName),
+ IconReference = new Microsoft.WindowsAPICodePack.Shell.IconReference (exePath, 0),
+ });
}
jumplist.Refresh ();
}
+ string exePath;
private bool Initialize ()
{
this.supportedExtensions = new List<string> ();
// Determine the correct value for /HKCR/XamarinStudio/shell/Open/Command
ProcessModule monoDevelopAssembly = Process.GetCurrentProcess ().MainModule;
- string exePath = monoDevelopAssembly.FileName;
+ exePath = monoDevelopAssembly.FileName;
string executeString = exePath + " %1";
- string progId = Taskbar.TaskbarManager.Instance.ApplicationId;
+ string progId = MonoDevelop.Core.BrandingService.ProfileDirectoryName;
using (RegistryKey progIdKey = Registry.ClassesRoot.OpenSubKey (progId + @"\shell\Open\Command", false)) {
if (progIdKey == null) {
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
index 229063160d..4690339ffa 100644
--- a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
+++ b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
@@ -64,11 +64,11 @@ namespace MonoDevelop.Platform
get { return "Windows"; }
}
- public override void Initialize ()
+ internal override void SetMainWindowDecorations (Gtk.Window window)
{
// Only initialize elements for Win7+.
if (TaskbarManager.IsPlatformSupported) {
- TaskbarManager.Instance.ApplicationId = BrandingService.ProfileDirectoryName;
+ TaskbarManager.Instance.SetApplicationIdForSpecificWindow (GdkWin32.HgdiobjGet (window.GdkWindow), BrandingService.ApplicationName);
}
}