Remove "Register Product on Pods" from the Site Management context menu

Drops the standalone right-click submenu (and its handler + field). Installing a
product from the console still registers its launch entries on completion, and the
Add New Product dialog's "push now" path still uses RegisterProductOnSelectedPods,
which is retained.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-06-30 20:18:17 -05:00
co-authored by Claude Opus 4.8
parent d1e9f0e365
commit 7ae8c0dfb1
+3 -29
View File
@@ -103,8 +103,6 @@ public class SiteManagement : Form
private ToolStripMenuItem installProductToolStripMenuItem;
private ToolStripMenuItem registerProductToolStripMenuItem;
private ToolStripMenuItem importSiteConfigurationToolStripMenuItem;
private ToolStripMenuItem exportSiteConfigurationToolStripMenuItem;
@@ -976,10 +974,6 @@ public class SiteManagement : Form
}
deletePodToolStripMenuItem.Enabled = num2 > 0;
installProductToolStripMenuItem.Enabled = num > 0;
if (registerProductToolStripMenuItem != null)
{
registerProductToolStripMenuItem.Enabled = num > 0;
}
resendPodConfigurationToolStripMenuItem.Enabled = num > 0;
uninstallProductToolStripMenuItem.Enabled = list != null && list.Count > 0;
uninstallProductToolStripMenuItem.DropDownItems.Clear();
@@ -998,32 +992,18 @@ public class SiteManagement : Form
}
/// <summary>
/// Rebuilds the product-related context menus from the data-driven catalog (<see cref="AppRegistry"/>):
/// • "Install Product" → transfer a package and register its launch entries
/// • "Register Product" → push launch entries to pods over the network, no file install
/// plus the "Add New Product..." management action.
/// Rebuilds the "Install Product" context menu from the data-driven catalog
/// (<see cref="AppRegistry"/>) — one entry per product plus the "Add New Product..."
/// management action.
/// </summary>
private void BuildInstallProductMenu()
{
// Lazily create the "Register Product" parent and place it after "Install Product".
if (registerProductToolStripMenuItem == null)
{
registerProductToolStripMenuItem = new ToolStripMenuItem("Register Product on Pods");
int insertAt = cmnuDataGrid.Items.IndexOf(installProductToolStripMenuItem) + 1;
cmnuDataGrid.Items.Insert(insertAt, registerProductToolStripMenuItem);
}
installProductToolStripMenuItem.DropDownItems.Clear();
registerProductToolStripMenuItem.DropDownItems.Clear();
foreach (ProductDefinition product in AppRegistry.Products)
{
ToolStripMenuItem installItem = new ToolStripMenuItem(product.MenuText) { Tag = product };
installItem.Click += InstallProduct_Click;
installProductToolStripMenuItem.DropDownItems.Add(installItem);
ToolStripMenuItem registerItem = new ToolStripMenuItem(product.Name) { Tag = product };
registerItem.Click += RegisterProduct_Click;
registerProductToolStripMenuItem.DropDownItems.Add(registerItem);
}
installProductToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator());
@@ -1064,12 +1044,6 @@ public class SiteManagement : Form
}
/// <summary>Pushes a catalog product's launch entries to selected connected pods without installing files.</summary>
private void RegisterProduct_Click(object sender, EventArgs e)
{
ProductDefinition product = (ProductDefinition)((ToolStripMenuItem)sender).Tag;
RegisterProductOnSelectedPods(product);
}
private void RegisterProductOnSelectedPods(ProductDefinition product)
{
int pushed = 0;