diff --git a/src/java/davmail/ui/tray/OSXAwtGatewayTray.java b/src/java/davmail/ui/tray/OSXAwtGatewayTray.java index 6045b349..7e751ebb 100644 --- a/src/java/davmail/ui/tray/OSXAwtGatewayTray.java +++ b/src/java/davmail/ui/tray/OSXAwtGatewayTray.java @@ -23,8 +23,8 @@ public class OSXAwtGatewayTray extends AwtGatewayTray { @Override protected void createAndShowGUI() { System.setProperty("apple.laf.useScreenMenuBar", "true"); - trayIcon.removeActionListener(settingsListener); super.createAndShowGUI(); + trayIcon.removeActionListener(settingsListener); try { OSXAdapter.setAboutHandler(this, AwtGatewayTray.class.getDeclaredMethod("about", (Class[]) null)); OSXAdapter.setPreferencesHandler(this, AwtGatewayTray.class.getDeclaredMethod("preferences", (Class[]) null));