mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-12-03 16:41:04 +01:00
CA-123572: Fixed regression: restored "New folder" item in the context menu of the Folders root node.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
7f29ebf2e9
commit
f120ffd496
@ -144,7 +144,9 @@ namespace XenAdmin.Commands
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
return selection.ContainsOneItemOfType<Folder>() && ConnectionAvailable();
|
||||
return (selection.ContainsOneItemOfType<Folder>()
|
||||
|| selection.ContainsOneItemOfType<GroupingTag>(t => t.Grouping is OrganizationViewFolders))
|
||||
&& ConnectionAvailable();
|
||||
}
|
||||
|
||||
private bool ConnectionAvailable()
|
||||
|
@ -488,6 +488,14 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
TreeContextMenu.Items.Add(new CommandToolStripMenuItem(new ConnectAllHostsCommand(Program.MainWindow.CommandInterface), true));
|
||||
TreeContextMenu.Items.Add(new CommandToolStripMenuItem(new DisconnectAllHostsCommand(Program.MainWindow.CommandInterface), true));
|
||||
}
|
||||
else
|
||||
{
|
||||
var groupingTag = e.Node.Tag as GroupingTag;
|
||||
if (groupingTag != null && groupingTag.Grouping as OrganizationViewFolders != null)
|
||||
TreeContextMenu.Items.Add(new CommandToolStripMenuItem(
|
||||
new NewFolderCommand(Program.MainWindow.CommandInterface, new[] { new SelectedItem(groupingTag, e.Node) }),
|
||||
true));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user