From 06ec8c88556b02782c7b91a233de91eaf4a1439d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 09 Jun 2009 12:28:05 +0000
Subject: [PATCH] Fix for issue 3550 (Consider making the control panel able to manage remote servers)
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
index 7b1e713..2f3abf3 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/CustomAttributePanel.java
@@ -41,6 +41,7 @@
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
+import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent;
import org.opends.guitools.controlpanel.event.ScrollPaneBorderListener;
import org.opends.guitools.controlpanel.task.DeleteSchemaElementsTask;
@@ -136,10 +137,13 @@
/**
* {@inheritDoc}
*/
- public void configurationChanged(final ConfigurationChangeEvent ev)
+ public void configurationChanged(ConfigurationChangeEvent ev)
{
- updateErrorPaneIfAuthRequired(ev.getNewDescriptor(),
- INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_ATTRIBUTE_DELETE.get());
+ final ServerDescriptor desc = ev.getNewDescriptor();
+ updateErrorPaneIfAuthRequired(desc,
+ isLocal() ?
+ INFO_CTRL_PANEL_AUTHENTICATION_REQUIRED_FOR_ATTRIBUTE_DELETE.get() :
+ INFO_CTRL_PANEL_CANNOT_CONNECT_TO_REMOTE_DETAILS.get(desc.getHostname()));
SwingUtilities.invokeLater(new Runnable()
{
/**
@@ -147,7 +151,7 @@
*/
public void run()
{
- delete.setEnabled(!authenticationRequired(ev.getNewDescriptor()));
+ delete.setEnabled(!authenticationRequired(desc));
}
});
}
--
Gitblit v1.10.0