Skip to content

Commit

Permalink
Parse control panel item description from JSON and show in results
Browse files Browse the repository at this point in the history
  • Loading branch information
dkgv committed Oct 29, 2020
1 parent 86001a8 commit d6e8a3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Pinpoint.Plugin.ControlPanel/ControlPanelItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public ControlPanelItem()

public string Name { get; set; }

public string Description { get; set; }

public string CanonicalName { get; set; }

public string[] Category { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Pinpoint.Plugin.ControlPanel/ControlPanelPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async IAsyncEnumerable<AbstractQueryResult> Process(Query query)
{
foreach (var item in _controlPanelItems.Where(i => i.Name.ToLower().Contains(query.RawQuery.ToLower()) && i.RegistryKey != null))
{
yield return new ControlPanelResult(item.Name, ControlPanelIconProvider.GetIcon(item.RegistryKey));
yield return new ControlPanelResult(item.Name, item.Description, ControlPanelIconProvider.GetIcon(item.RegistryKey));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Pinpoint.Plugin.ControlPanel/ControlPanelResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Pinpoint.Plugin.ControlPanel
{
public class ControlPanelResult : AbstractQueryResult
{
public ControlPanelResult(string title, Bitmap icon) : base(title, "Show in control panel.")
public ControlPanelResult(string title, string description, Bitmap icon) : base(title, description)
{
Icon = icon;
}
Expand Down

0 comments on commit d6e8a3a

Please sign in to comment.