From 12528a2548d419b1d48d1ec70f0f9ae3a94c0b20 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 23 Oct 2009 19:44:22 +0000
Subject: [PATCH] Fix for issue 4313 (Control-panel stop triggers authentication pop-up) After getting the return code from stop-ds, verify that the server released its lock on the file used to test that it is running.

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
index fe35e15..8ab5a40 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LocalOrRemotePanel.java
@@ -261,7 +261,14 @@
    */
   public Component getPreferredFocusComponent()
   {
-    return pwd;
+    if (pwd.isVisible())
+    {
+      return pwd;
+    }
+    else
+    {
+      return combo;
+    }
   }
 
   /**
@@ -302,6 +309,11 @@
         {
           updateComponentState();
           displayMainPanel();
+          Component comp = getPreferredFocusComponent();
+          if (comp != null)
+          {
+            comp.requestFocusInWindow();
+          }
         }
       };
       displayMessage(INFO_CTRL_PANEL_LOADING_PANEL_SUMMARY.get());

--
Gitblit v1.10.0