mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
add tooltips to vscode workspaces plugin (#10348)
This commit is contained in:
committed by
GitHub
parent
730e5f299f
commit
55cfaaf929
@@ -49,11 +49,14 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
|||||||
title += $" - {(a.ExtraInfo != null ? $"{a.ExtraInfo} ({typeWorkspace})" : typeWorkspace)}";
|
title += $" - {(a.ExtraInfo != null ? $"{a.ExtraInfo} ({typeWorkspace})" : typeWorkspace)}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tooltip = new ToolTipData(title, $"{Resources.Workspace}{(a.TypeWorkspace != TypeWorkspace.Local ? $" {Resources.In} {typeWorkspace}" : "")}: {SystemPath.RealPath(a.RelativePath)}");
|
||||||
|
|
||||||
results.Add(new Result
|
results.Add(new Result
|
||||||
{
|
{
|
||||||
Title = title,
|
Title = title,
|
||||||
SubTitle = $"{Resources.Workspace}{(a.TypeWorkspace != TypeWorkspace.Local ? $" {Resources.In} {typeWorkspace}" : "")}: {SystemPath.RealPath(a.RelativePath)}",
|
SubTitle = $"{Resources.Workspace}{(a.TypeWorkspace != TypeWorkspace.Local ? $" {Resources.In} {typeWorkspace}" : "")}: {SystemPath.RealPath(a.RelativePath)}",
|
||||||
Icon = a.VSCodeInstance.WorkspaceIcon,
|
Icon = a.VSCodeInstance.WorkspaceIcon,
|
||||||
|
ToolTipData = tooltip,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
bool hide;
|
bool hide;
|
||||||
@@ -83,6 +86,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Search opened remote machines
|
// Search opened remote machines
|
||||||
_machinesApi.Machines.ForEach(a =>
|
_machinesApi.Machines.ForEach(a =>
|
||||||
{
|
{
|
||||||
@@ -93,11 +97,14 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces
|
|||||||
title += $" [{a.User}@{a.HostName}]";
|
title += $" [{a.User}@{a.HostName}]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tooltip = new ToolTipData(title, Resources.SSHRemoteMachine);
|
||||||
|
|
||||||
results.Add(new Result
|
results.Add(new Result
|
||||||
{
|
{
|
||||||
Title = title,
|
Title = title,
|
||||||
SubTitle = Resources.SSHRemoteMachine,
|
SubTitle = Resources.SSHRemoteMachine,
|
||||||
Icon = a.VSCodeInstance.RemoteIcon,
|
Icon = a.VSCodeInstance.RemoteIcon,
|
||||||
|
ToolTipData = tooltip,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
bool hide;
|
bool hide;
|
||||||
|
|||||||
Reference in New Issue
Block a user