diff options
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/RegistryEditor.java')
-rwxr-xr-x | java/src/IceGridGUI/LiveDeployment/RegistryEditor.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/RegistryEditor.java b/java/src/IceGridGUI/LiveDeployment/RegistryEditor.java index edb5879d368..dc3f9ac57e6 100755 --- a/java/src/IceGridGUI/LiveDeployment/RegistryEditor.java +++ b/java/src/IceGridGUI/LiveDeployment/RegistryEditor.java @@ -68,7 +68,7 @@ class RegistryEditor extends Editor } }; - Action patch = new AbstractAction("Patch distribution") + final Action patch = new AbstractAction("Patch distribution") { public void actionPerformed(ActionEvent e) { @@ -147,8 +147,12 @@ class RegistryEditor extends Editor private void maybeShowPopup(MouseEvent e) { - if (e.isPopupTrigger() && _applications.getSelectedRow() != -1) + int selectedRow = _applications.getSelectedRow(); + if (e.isPopupTrigger() && selectedRow != -1) { + String appName = (String)_applications.getValueAt(selectedRow, 0); + ApplicationDescriptor desc = _target.getApplicationDescriptor(appName); + patch.setEnabled(desc != null && desc.distrib.icepatch.length() > 0); appPopup.show(_applications, e.getX(), e.getY()); } } |