Skip to content

Commit 1e2531a

Browse files
authored
Apply changes from latest GE version (#29)
1 parent 8040ab0 commit 1e2531a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/GitExtensions.GerritPlugin/FormGerritDownload.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading.Tasks;
55
using System.Windows.Forms;
66
using GitCommands;
7+
using GitCommands.Git.Commands;
78
using GitUI;
89
using GitUIPluginInterfaces;
910
using Newtonsoft.Json.Linq;
@@ -126,7 +127,7 @@ private async Task<bool> DownloadChangeAsync(IWin32Window owner)
126127
return;
127128
}
128129

129-
e.IsError = false;
130+
e = new GitRemoteCommandCompletedEventArgs(e.Command, false, e.Handled);
130131
}
131132
}
132133
};
@@ -223,7 +224,7 @@ private void FormGerritDownloadLoad(object sender, EventArgs e)
223224

224225
private void AddRemoteClick(object sender, EventArgs e)
225226
{
226-
UICommands.StartRemotesDialog();
227+
UICommands.StartRemotesDialog(this);
227228
_NO_TRANSLATE_Remotes.DataSource = Module.GetRemoteNames();
228229
}
229230
}

src/GitExtensions.GerritPlugin/FormGerritPublish.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics;
43
using System.Linq;
54
using System.Windows.Forms;
65
using GitExtensions.GerritPlugin.Server;
@@ -194,7 +193,7 @@ private void FormGerritPublishLoad(object sender, EventArgs e)
194193

195194
private void AddRemoteClick(object sender, EventArgs e)
196195
{
197-
UICommands.StartRemotesDialog();
196+
UICommands.StartRemotesDialog(this);
198197
_NO_TRANSLATE_Remotes.DataSource = Module.GetRemoteNames();
199198
}
200199
}

src/GitExtensions.GerritPlugin/GerritPlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ private void Initialize(Form form)
154154

155155
// Find the controls we're going to extend.
156156

157-
var menuStrip = form.FindDescendantOfType<MenuStrip>(p => p.Name == "menuStrip1");
158-
var toolStrip = form.FindDescendantOfType<ToolStrip>(p => p.Name == "ToolStrip");
157+
var menuStrip = form.FindDescendantOfType<MenuStrip>(p => p.Name == "mainMenuStrip");
158+
var toolStrip = form.FindDescendantOfType<ToolStrip>(p => p.Name == "ToolStripMain");
159159

160160
if (menuStrip == null)
161161
{

src/GitExtensions.GerritPlugin/GerritUtil.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static async Task<string> RunGerritCommandAsync([NotNull] IWin32Window ow
6868

6969
StartAgent(owner, module, remote);
7070

71-
var sshCmd = GitCommandHelpers.Plink()
71+
var sshCmd = GitSshHelpers.Plink()
7272
? AppSettings.Plink
7373
: SshPathLocatorInstance.Find(AppSettings.GitBinDir);
7474

@@ -79,7 +79,7 @@ public static async Task<string> RunGerritCommandAsync([NotNull] IWin32Window ow
7979

8080
string hostname = fetchUrl.Host;
8181
string username = fetchUrl.UserInfo;
82-
string portFlag = GitCommandHelpers.Plink() ? " -P " : " -p ";
82+
string portFlag = GitSshHelpers.Plink() ? " -P " : " -p ";
8383
int port = fetchUrl.Port;
8484

8585
if (port == -1 && fetchUrl.Scheme == "ssh")
@@ -127,7 +127,7 @@ public static void StartAgent([NotNull] IWin32Window owner, [NotNull] IGitModule
127127
throw new ArgumentNullException(nameof(remote));
128128
}
129129

130-
if (GitCommandHelpers.Plink())
130+
if (GitSshHelpers.Plink())
131131
{
132132
if (!File.Exists(AppSettings.Pageant))
133133
{

0 commit comments

Comments
 (0)