Skip to content

Commit

Permalink
fix: drop action listener in BaseMainWindowMenu
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed May 29, 2024
1 parent 3bab572 commit d05b66b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/org/omegat/gui/main/BaseMainWindowMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 2014 Aaron Madlon-Kay
* 2015 Didier Briel, Yu Tang
* 2017 Didier Briel
* 2023 Hiroshi Miura
* 2023-2024 Hiroshi Miura
* Home page: https://www.omegat.org/
* Support center: https://omegat.org/support
*
Expand All @@ -40,7 +40,6 @@
import static org.omegat.gui.main.MainWindowMenuHandler.findInProjectReuseLastWindow;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.lang.reflect.Field;
import java.util.EnumMap;
Expand Down Expand Up @@ -113,7 +112,7 @@
* /src/org/omegat/gui/main/MainMenuShortcuts.mac.properties with the proper
* shortcuts if set.
*/
public abstract class BaseMainWindowMenu implements ActionListener, MenuListener, IMainMenu {
public abstract class BaseMainWindowMenu implements MenuListener, IMainMenu {

/** menu bar instance */
protected final JMenuBar mainMenu = new JMenuBar();
Expand Down Expand Up @@ -652,14 +651,6 @@ public void onApplicationShutdown() {
});
}

@Override
public void actionPerformed(ActionEvent evt) {
// Get item name from actionCommand.
String action = evt.getActionCommand();
Log.logInfoRB("LOG_MENU_CLICK", action);
invokeAction(action, evt.getModifiers());
}

/**
* Code for dispatching events from components to event handlers.
*
Expand Down Expand Up @@ -736,7 +727,6 @@ protected JCheckBoxMenuItem createCheckboxMenuItem(Action action) {
protected JCheckBoxMenuItem createCheckboxMenuItem(final String titleKey) {
JCheckBoxMenuItem result = new JCheckBoxMenuItem();
Mnemonics.setLocalizedText(result, OStrings.getString(titleKey));
result.addActionListener(this);
return result;
}

Expand All @@ -760,7 +750,6 @@ protected JRadioButtonMenuItem createRadioButtonMenuItem(String titleKey, Button
JRadioButtonMenuItem result = new JRadioButtonMenuItem();
Mnemonics.setLocalizedText(result, OStrings.getString(titleKey));
buttonGroup.add(result);
result.addActionListener(this);
return result;
}

Expand Down

0 comments on commit d05b66b

Please sign in to comment.