From 85e8eaad9d2be96564aa32b7fd5182de0fbb4a6e Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 30 Jul 2009 10:54:56 +0000
Subject: [PATCH] Fix for issue 4157 (Control Panel does not display Mac OS menu bar in Browse Entries dialog)

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java |   32 +++++++++++++++-----------------
 1 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java
index 3f9f2a3..696d0e1 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/MainActionsPane.java
@@ -80,8 +80,8 @@
     ArrayList<Category> categories = createCategories();
     ButtonGroup group = new ButtonGroup();
     int maxWidth = 0;
-    final Map<Action, GenericDialog> dialogs =
-      new HashMap<Action, GenericDialog>();
+    final Map<Action, GenericFrame> frames =
+      new HashMap<Action, GenericFrame>();
     ArrayList<ActionButton> actions = new ArrayList<ActionButton>();
     for(Category category: categories)
     {
@@ -104,8 +104,8 @@
           {
             // Constructs the panels using reflection.
             Action action = b.getActionObject();
-            GenericDialog dlg = dialogs.get(action);
-            if (dlg == null)
+            GenericFrame frame = frames.get(action);
+            if (frame == null)
             {
               Class<? extends StatusGenericPanel> panelClass =
                 action.getAssociatedPanelClass();
@@ -118,10 +118,10 @@
                 {
                   panel.setInfo(getInfo());
                 }
-                dlg = createDialog(panel);
+                frame = createFrame(panel);
 
-                dialogs.put(action, dlg);
-                Utilities.centerGoldenMean(dlg,
+                frames.put(action, frame);
+                Utilities.centerGoldenMean(frame,
                     Utilities.getFrame(MainActionsPane.this));
               }
               catch (Throwable t)
@@ -130,13 +130,13 @@
                 t.printStackTrace();
               }
             }
-            if (!dlg.isVisible())
+            if (!frame.isVisible())
             {
-              dlg.setVisible(true);
+              frame.setVisible(true);
             }
             else
             {
-              dlg.toFront();
+              frame.toFront();
             }
           }
         });
@@ -173,15 +173,13 @@
   }
 
   /**
-   * Creates the dialog to be displayed using the provided panel.
-   * @param panel the panel that will be contained in the dialog.
-   * @return the dialog to be displayed using the provided panel.
+   * Creates the frame to be displayed using the provided panel.
+   * @param panel the panel that will be contained in the frame.
+   * @return the frame to be displayed using the provided panel.
    */
-  protected GenericDialog createDialog(StatusGenericPanel panel)
+  protected GenericFrame createFrame(StatusGenericPanel panel)
   {
-    return new GenericDialog(
-        Utilities.getFrame(MainActionsPane.this),
-        panel);
+    return new GenericFrame(panel);
   }
 
   /**

--
Gitblit v1.10.0