Skip to content

Commit aad4fc1

Browse files
committed
update subtitle's setting type display to System settings/Control Panel
1 parent 0b725eb commit aad4fc1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ internal static List<Result> GetResultList(
9191
{
9292
Action = _ => DoOpenSettingsAction(entry),
9393
IcoPath = type == "AppSettingsApp" ? windowsSettingIconPath : controlPanelIconPath,
94-
SubTitle = $"{Resources.Area} \"{entry.Area}\" {Resources.SubtitlePreposition} {entry.Type}",
94+
SubTitle = GetSubtitle(entry.Area, type),
9595
Title = entry.Name + entry.glyph,
9696
ContextData = entry,
9797
Score = score
@@ -101,6 +101,13 @@ internal static List<Result> GetResultList(
101101
return resultList;
102102
}
103103

104+
private static string GetSubtitle(string section, string entryType)
105+
{
106+
var settingType = entryType == "AppSettingsApp" ? "System settings" : "Control Panel";
107+
108+
return $"{settingType} > {section}";
109+
}
110+
104111
/// <summary>
105112
/// Add a tool-tip to the given <see cref="Result"/>, based o the given <see cref="IWindowsSetting"/>.
106113
/// </summary>
@@ -109,8 +116,10 @@ internal static List<Result> GetResultList(
109116
private static void AddOptionalToolTip(WindowsSetting entry, Result result)
110117
{
111118
var toolTipText = new StringBuilder();
119+
120+
var settingType = entry.Type == "AppSettingsApp" ? "System settings" : "Control Panel";
112121

113-
toolTipText.AppendLine($"{Resources.Application}: {entry.Type}");
122+
toolTipText.AppendLine($"{Resources.Application}: {settingType}");
114123
toolTipText.AppendLine($"{Resources.Area}: {entry.Area}");
115124

116125
if (entry.AltNames != null && entry.AltNames.Any())

0 commit comments

Comments
 (0)