mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-27 02:56:01 +01:00
CP-6093: Filter by Location ToolStripDropDownButton: only add ShowAll item if there
are actually items to show. Button enablement on Events page. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
5d04edae99
commit
58d0599bdc
@ -139,17 +139,22 @@ namespace XenAdmin.Controls
|
||||
DropDownItems.Add(GeneratePoolFilterItem(p));
|
||||
}
|
||||
|
||||
toolStripMenuItemAll = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.FILTER_SHOW_ALL,
|
||||
Enabled = FilterIsOn
|
||||
};
|
||||
if (DropDownItems.Count > 0)
|
||||
{
|
||||
toolStripMenuItemAll = new ToolStripMenuItem
|
||||
{
|
||||
Text = Messages.FILTER_SHOW_ALL,
|
||||
Enabled = FilterIsOn
|
||||
};
|
||||
|
||||
DropDownItems.AddRange(new ToolStripItem[]
|
||||
{
|
||||
new ToolStripSeparator(),
|
||||
toolStripMenuItemAll
|
||||
});
|
||||
DropDownItems.AddRange(new ToolStripItem[]
|
||||
{
|
||||
new ToolStripSeparator(),
|
||||
toolStripMenuItemAll
|
||||
});
|
||||
}
|
||||
|
||||
Enabled = DropDownItems.Count > 0;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -61,6 +61,7 @@ namespace XenAdmin.TabPages
|
||||
toolStripTop.Renderer = new CustomToolStripRenderer();
|
||||
toolStripSplitButtonDismiss.DefaultItem = tsmiDismissAll;
|
||||
toolStripSplitButtonDismiss.Text = tsmiDismissAll.Text;
|
||||
UpdateButtons();
|
||||
ConnectionsManager.History.CollectionChanged += History_CollectionChanged;
|
||||
ActionBase.NewAction += Action_NewAction;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user