Skip to content

Commit cb52632

Browse files
committed
Update plugin settings menu icon and title handling
Replaced static plugin settings title with dynamic one using plugin name, added SettingsIcon constant for settings.png, and updated context menu to use the new icon. Removed unused string resource from en.xaml.
1 parent b513d30 commit cb52632

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Flow.Launcher.Infrastructure/Constant.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public static class Constant
3333
public static readonly string LoadingImgIcon = Path.Combine(ImagesDirectory, "loading.png");
3434
public static readonly string ImageIcon = Path.Combine(ImagesDirectory, "image.png");
3535
public static readonly string HistoryIcon = Path.Combine(ImagesDirectory, "history.png");
36+
public static readonly string SettingsIcon = Path.Combine(ImagesDirectory, "settings.png");
3637

3738
public static string PythonPath;
3839
public static string NodePath;

Flow.Launcher/Languages/en.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>
4747
<system:String x:Key="setAsTopMostInThisQuery">Set as topmost in this query</system:String>
4848
<system:String x:Key="cancelTopMostInThisQuery">Cancel topmost in this query</system:String>
49-
<system:String x:Key="contextMenuPluginSettingsTitle">Plugin Settings</system:String>
5049
<system:String x:Key="executeQuery">Execute query: {0}</system:String>
5150
<system:String x:Key="lastExecuteTime">Last execution time: {0}</system:String>
5251
<system:String x:Key="iconTrayOpen">Open</system:String>

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,12 +1831,12 @@ private Result ContextMenuTopMost(Result result)
18311831
private static Result ContextMenuPluginSettings(Result result)
18321832
{
18331833
var id = result.PluginID;
1834-
1835-
var title = Localize.contextMenuPluginSettingsTitle();
1834+
var metadata = PluginManager.GetPluginForId(id).Metadata;
18361835

18371836
var menu = new Result
18381837
{
1839-
Title = title,
1838+
Title = Localize.pluginSettingsWindowTitle(metadata.Name),
1839+
IcoPath = Constant.SettingsIcon,
18401840
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE713"),
18411841
PluginDirectory = Constant.ProgramDirectory,
18421842
Action = _ =>

0 commit comments

Comments
 (0)