mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
18.44.2007 214fa1fb1ce97fa827e74c5930dbcb012db7f3b1
improve MacOSX native LAF: set the application name for the menu bar and the dock.
4 files modified
24 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java 4 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java 2 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java 14 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/StatusPanelLauncher.java 4 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2006 Sun Microsystems, Inc.
 *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 */
package org.opends.quicksetup.installer;
@@ -195,6 +195,8 @@
    {
      public void run()
      {
        // Setup MacOSX native menu bar before AWT is loaded.
        Utils.setMacOSXMenuBar(getMsg("frame-install-title"));
        SplashScreen.main(args);
        returnValue[0] = 0;
      }
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallLauncher.java
@@ -152,6 +152,8 @@
    {
      public void run()
      {
        // Setup MacOSX native menu bar before AWT is loaded.
        Utils.setMacOSXMenuBar(getMsg("frame-uninstall-title"));
        SplashScreen.main(args);
        returnValue[0] = 0;
      }
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -1338,4 +1338,18 @@
  {
    return MAX_LINE_WIDTH;
  }
  /**
   * Puts Swing menus in the Mac OS menu bar, if using the Aqua look and feel,
   * and sets the application name that is displayed in the application menu
   * and in the dock.
   * @param appName
   *          application name to display in the menu bar and the dock.
   */
  public static void setMacOSXMenuBar(String appName)
  {
    System.setProperty("apple.laf.useScreenMenuBar", "true");
    System.setProperty("com.apple.mrj.application.apple.menu.about.name",
                       appName);
  }
}
opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/StatusPanelLauncher.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2007 Sun Microsystems, Inc.
 *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 */
package org.opends.statuspanel;
@@ -93,6 +93,8 @@
    {
      public void run()
      {
        // Setup MacOSX native menu bar before AWT is loaded.
        Utils.setMacOSXMenuBar(getMsg("statuspanel-dialog-title"));
        SplashScreen.main(args);
        returnValue[0] = 0;
      }