Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace mouse-listener with more conventional action-listener #222

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions src/main/java/listfix/view/controls/PlaylistEditCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@ private void initComponents()
_playlistEntryRightClickMenu = new JPopupMenu();
_miEditFilename = new JMenuItem();
_miOpenFileLocation = new JMenuItem();
_miReplace = new JMenuItem();
JPopupMenu.Separator jSeparator3 = new JPopupMenu.Separator();
_miFindClosest = new JMenuItem();
JPopupMenu.Separator jSeparator4 = new JPopupMenu.Separator();
Expand All @@ -625,21 +624,9 @@ private void initComponents()
_miCopySelectedFiles = new JMenuItem();
JMenuItem _miNewPlaylistFromSelected = new JMenuItem();
JToolBar _uiToolbar = new JToolBar();
_btnSave = new JButton();
_btnReload = new JButton();
_btnAdd = new JButton();
_btnDelete = new JButton();
JToolBar.Separator jSeparator1 = new JToolBar.Separator();
_btnUp = new JButton();
_btnDown = new JButton();
_btnInvert = new JButton();
_btnReorder = new JButton();
JToolBar.Separator jSeparator2 = new JToolBar.Separator();
_btnMagicFix = new JButton();
_btnPlay = new JButton();
JToolBar.Separator jSeparator5 = new JToolBar.Separator();
_btnPrevMissing = new JButton();
_btnNextMissing = new JButton();
_uiTableScrollPane = new JScrollPane();
_uiTable = createTable();

Expand All @@ -661,6 +648,7 @@ private void initComponents()
});
_playlistEntryRightClickMenu.add(_miOpenFileLocation);

_miReplace = new JMenuItem();
_miReplace.setText("Replace Selected Entry");
_miReplace.addActionListener(evt -> replaceSelectedEntries());
_playlistEntryRightClickMenu.add(_miReplace);
Expand Down Expand Up @@ -700,14 +688,7 @@ private void initComponents()
_btnReload = makeButton("gtk-refresh.png");
_btnReload.setToolTipText("Reload");
_btnReload.setEnabled(playlist != null && playlist.isModified());
_btnReload.addMouseListener(new MouseAdapter()
{
@Override
public void mouseClicked(MouseEvent evt)
{
reloadPlaylist();
}
});
_btnReload.addActionListener(evt -> reloadPlaylist());
_uiToolbar.add(_btnReload);

_btnAdd = makeButton("edit-add.gif");
Expand Down