mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 08:56:15 +02:00
Remove plugins from setting that are not loaded anymore
This commit is contained in:
Binary file not shown.
@@ -557,8 +557,10 @@ namespace DesktopMagic
|
|||||||
|
|
||||||
bool showWindow = true;
|
bool showWindow = true;
|
||||||
|
|
||||||
|
// Load plugins
|
||||||
foreach (string pluginName in pluginNames)
|
foreach (string pluginName in pluginNames)
|
||||||
{
|
{
|
||||||
|
// Add plugin to layout if it doesn't exist
|
||||||
if (!Settings.CurrentLayout.Plugins.TryGetValue(pluginName, out PluginSettings? pluginSettings))
|
if (!Settings.CurrentLayout.Plugins.TryGetValue(pluginName, out PluginSettings? pluginSettings))
|
||||||
{
|
{
|
||||||
Settings.CurrentLayout.Plugins.Add(pluginName, new PluginSettings());
|
Settings.CurrentLayout.Plugins.Add(pluginName, new PluginSettings());
|
||||||
@@ -577,6 +579,15 @@ namespace DesktopMagic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove plugins that are not loaded anymore
|
||||||
|
foreach (string pluginName in Settings.CurrentLayout.Plugins.Keys)
|
||||||
|
{
|
||||||
|
if (!pluginNames.Contains(pluginName))
|
||||||
|
{
|
||||||
|
Settings.CurrentLayout.Plugins.Remove(pluginName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Settings.CurrentLayout.UpdatePlugins();
|
Settings.CurrentLayout.UpdatePlugins();
|
||||||
|
|
||||||
if (!showWindow && minimize)
|
if (!showWindow && minimize)
|
||||||
|
|||||||
Reference in New Issue
Block a user