Skip to content

Commit 81c0ea7

Browse files
authored
Merge pull request #69 from poupounetjoyeux/master
Fix URLs openings
2 parents ce701ed + 7d9e7cd commit 81c0ea7

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

src/GitExtensions.GerritPlugin/FormGerritChangeSubmitted.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Diagnostics;
2-
using System.Windows.Forms;
1+
using System.Windows.Forms;
32
using GitUI;
43

54
namespace GitExtensions.GerritPlugin
@@ -17,7 +16,7 @@ public static void ShowSubmitted(IWin32Window owner, string change)
1716
var form = new FormGerritChangeSubmitted();
1817

1918
form._NO_TRANSLATE_TargetLabel.Text = change;
20-
form._NO_TRANSLATE_TargetLabel.Click += (s, e) => Process.Start(change);
19+
form._NO_TRANSLATE_TargetLabel.Click += (s, e) => OsShellUtil.OpenUrlInDefaultBrowser(change);
2120

2221
form.ShowDialog(owner);
2322
}

src/GitExtensions.GerritPlugin/FormGitReview.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private void GitReviewFileLoaded(object sender, EventArgs e)
176176

177177
private void lnkGitReviewPatterns_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
178178
{
179-
Process.Start("https://docs.opendev.org/opendev/git-review/latest/installation.html#gitreview-file-format");
179+
OsShellUtil.OpenUrlInDefaultBrowser("https://docs.opendev.org/opendev/git-review/latest/installation.html#gitreview-file-format");
180180
}
181181
}
182182
}
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Diagnostics;
2-
using System.Windows.Forms;
1+
using System.Windows.Forms;
32
using GitUI;
43

54
namespace GitExtensions.GerritPlugin
@@ -12,19 +11,9 @@ public FormPluginInformation()
1211
InitializeComplete();
1312
}
1413

15-
public static void ShowSubmitted(IWin32Window owner, string change)
16-
{
17-
var form = new FormPluginInformation();
18-
19-
form._NO_TRANSLATE_TargetLabel.Text = change;
20-
form._NO_TRANSLATE_TargetLabel.Click += (s, e) => Process.Start(change);
21-
22-
form.ShowDialog(owner);
23-
}
24-
2514
private void _NO_TRANSLATE_TargetLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
2615
{
27-
Process.Start("https://docs.opendev.org/opendev/git-review/latest/installation.html#gitreview-file-format");
16+
OsShellUtil.OpenUrlInDefaultBrowser("https://docs.opendev.org/opendev/git-review/latest/installation.html#gitreview-file-format");
2817
}
2918
}
3019
}

0 commit comments

Comments
 (0)