Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit f297056

Browse files
committed
Show statusbar message when a link is copied
1 parent a4f8516 commit f297056

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

src/GitHub.VisualStudio/GitHub.VisualStudio.vsct

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,23 @@
122122

123123
<Button guid="guidContextMenuSet" id="openLinkCommand" priority="0x0100" type="Button">
124124
<Parent guid="guidContextMenuSet" id="idContextMenuGroup"/>
125+
<Icon guid="guidImages" id="logo" />
126+
<CommandFlag>IconIsMoniker</CommandFlag>
125127
<CommandFlag>DefaultInvisible</CommandFlag>
126128
<CommandFlag>DynamicVisibility</CommandFlag>
127129
<Strings>
128-
<ButtonText>Open in Browser</ButtonText>
130+
<ButtonText>Open on GitHub</ButtonText>
129131
</Strings>
130132
</Button>
131133

132134
<Button guid="guidContextMenuSet" id="copyLinkCommand" priority="0x0101" type="Button">
133135
<Parent guid="guidContextMenuSet" id="idContextMenuGroup"/>
136+
<Icon guid="guidImages" id="logo" />
137+
<CommandFlag>IconIsMoniker</CommandFlag>
134138
<CommandFlag>DefaultInvisible</CommandFlag>
135139
<CommandFlag>DynamicVisibility</CommandFlag>
136140
<Strings>
137-
<ButtonText>Copy Link to Clipboard</ButtonText>
141+
<ButtonText>Copy link to clipboard</ButtonText>
138142
</Strings>
139143
</Button>
140144
</Buttons>

src/GitHub.VisualStudio/Menus/CopyLink.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using System;
33
using System.ComponentModel.Composition;
44
using System.Windows;
5+
using GitHub.Extensions;
6+
using GitHub.Services;
57

68
namespace GitHub.VisualStudio.Menus
79
{
@@ -27,6 +29,8 @@ public void Activate()
2729
if (link == null)
2830
return;
2931
Clipboard.SetText(link.AbsoluteUri);
32+
var ns = ServiceProvider.GetExportedValue<IStatusBarNotificationService>();
33+
ns?.ShowMessage(Resources.LinkCopiedToClipboardMessage);
3034
}
3135

3236
public bool CanShow()

src/GitHub.VisualStudio/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.VisualStudio/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,7 @@
282282
<data name="RepositoryPublishedMessage" xml:space="preserve">
283283
<value>Repository created successfully.</value>
284284
</data>
285+
<data name="LinkCopiedToClipboardMessage" xml:space="preserve">
286+
<value>Link copied to clipboard</value>
287+
</data>
285288
</root>

0 commit comments

Comments
 (0)