mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-123576: Also reconstruct the plugin menu items when a plugin is enabled/disabled.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
f120ffd496
commit
6e4c39ac96
@ -118,7 +118,7 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Control event handlers
|
||||
#region Control event handlers
|
||||
|
||||
private void refreshButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
@ -288,6 +288,7 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
|
||||
Settings.UpdateDisabledPluginsList(disabled);
|
||||
Program.MainWindow.UpdateToolbarsCore();
|
||||
_pluginManager.OnPluginsChanged();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -104,6 +104,12 @@ namespace XenAdmin.Plugins
|
||||
get { return (from PluginDescriptor plugin in _plugins where plugin.Enabled select plugin).Count(); }
|
||||
}
|
||||
|
||||
public void OnPluginsChanged()
|
||||
{
|
||||
if (PluginsChanged != null)
|
||||
PluginsChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads the plugins from the default Plugins folder.
|
||||
/// </summary>
|
||||
@ -154,9 +160,8 @@ namespace XenAdmin.Plugins
|
||||
{
|
||||
log.Error("Error loading plugins.", ex);
|
||||
}
|
||||
|
||||
if (PluginsChanged != null)
|
||||
PluginsChanged();
|
||||
|
||||
OnPluginsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,8 +189,7 @@ namespace XenAdmin.Plugins
|
||||
}
|
||||
_plugins.Clear();
|
||||
|
||||
if (PluginsChanged != null)
|
||||
PluginsChanged();
|
||||
OnPluginsChanged();
|
||||
}
|
||||
|
||||
public void ReloadPlugins()
|
||||
|
Loading…
Reference in New Issue
Block a user