mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Save relative path to settings (#11543)
This commit is contained in:
@@ -193,6 +193,12 @@ namespace PowerLauncher
|
||||
return results.Values.ToList();
|
||||
}
|
||||
|
||||
private static string GetIcon(PluginMetadata metadata, string iconPath)
|
||||
{
|
||||
var pluginDirectory = Path.GetFileName(metadata.PluginDirectory);
|
||||
return Path.Combine(pluginDirectory, iconPath);
|
||||
}
|
||||
|
||||
private static IEnumerable<PowerLauncherPluginSettings> GetDefaultPluginsSettings()
|
||||
{
|
||||
return PluginManager.AllPlugins.Select(x => new PowerLauncherPluginSettings()
|
||||
@@ -204,8 +210,8 @@ namespace PowerLauncher
|
||||
Disabled = x.Metadata.Disabled,
|
||||
IsGlobal = x.Metadata.IsGlobal,
|
||||
ActionKeyword = x.Metadata.ActionKeyword,
|
||||
IconPathDark = x.Metadata.IcoPathDark,
|
||||
IconPathLight = x.Metadata.IcoPathLight,
|
||||
IconPathDark = GetIcon(x.Metadata, x.Metadata.IcoPathDark),
|
||||
IconPathLight = GetIcon(x.Metadata, x.Metadata.IcoPathLight),
|
||||
AdditionalOptions = x.Plugin is ISettingProvider ? (x.Plugin as ISettingProvider).AdditionalOptions : new List<PluginAdditionalOption>(),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user