The method UpdateToolbarsCore should be private. Do not call it explicitly; it is

called by the PluginsChanged event handler.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2018-08-06 18:42:24 +01:00 committed by Mihaela Stoica
parent c270882737
commit a918a0b0c8
2 changed files with 3 additions and 4 deletions

View File

@ -129,8 +129,6 @@ namespace XenAdmin.Dialogs.OptionsPages
Refresh();
_pluginManager.ReloadPlugins();
Program.MainWindow.UpdateToolbarsCore();
m_tlpScanning.Visible = false;
LoadPluginList();
refreshButton.Enabled = true;
@ -288,7 +286,6 @@ namespace XenAdmin.Dialogs.OptionsPages
}
Settings.UpdateDisabledPluginsList(disabled);
Program.MainWindow.UpdateToolbarsCore();
_pluginManager.OnPluginsChanged();
}

View File

@ -1386,7 +1386,7 @@ namespace XenAdmin
/// <summary>
/// Updates the toolbar buttons. Also updates which tabs are visible.
/// </summary>
public void UpdateToolbarsCore()
private void UpdateToolbarsCore()
{
// refresh the selection-manager
SelectionManager.RefreshSelection();
@ -1673,6 +1673,8 @@ namespace XenAdmin
private void pluginManager_PluginsChanged()
{
UpdateToolbarsCore();
foreach (ToolStripMenuItem menu in MainMenuBar.Items)
{
//clear existing plugin items