Last change
on this file since 14397 was 12565, checked in by Don-vip, 7 years ago |
fix #15110 - Disable audio actions when no audio is present (patch by bafonins, modified)
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[6380] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
[626] | 2 | package org.openstreetmap.josm.actions.audio;
|
---|
| 3 |
|
---|
[582] | 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
[2842] | 5 | import static org.openstreetmap.josm.tools.I18n.trc;
|
---|
[582] | 6 |
|
---|
| 7 | import java.awt.event.ActionEvent;
|
---|
| 8 | import java.awt.event.KeyEvent;
|
---|
| 9 |
|
---|
| 10 | import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
|
---|
[1084] | 11 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
[626] | 12 |
|
---|
[5871] | 13 | /**
|
---|
[6830] | 14 | * Play the sound track from the Audio Marker before the one most recently played.<br>
|
---|
[6069] | 15 | * Play from the first such Marker if none has been played or already at the first marker.
|
---|
[5871] | 16 | * @since 547
|
---|
| 17 | */
|
---|
[12565] | 18 | public class AudioPrevAction extends AbstractAudioAction {
|
---|
[626] | 19 |
|
---|
[5871] | 20 | /**
|
---|
| 21 | * Constructs a new {@code AudioPrevAction}.
|
---|
| 22 | */
|
---|
[1169] | 23 | public AudioPrevAction() {
|
---|
[2857] | 24 | super(trc("audio", "Previous Marker"), "audio-prev", trc("audio", "Play previous marker."),
|
---|
[4982] | 25 | Shortcut.registerShortcut("audio:prev", tr("Audio: {0}", trc("audio", "Previous Marker")), KeyEvent.VK_F5, Shortcut.DIRECT), true);
|
---|
[1169] | 26 | }
|
---|
[626] | 27 |
|
---|
[6084] | 28 | @Override
|
---|
[1169] | 29 | public void actionPerformed(ActionEvent e) {
|
---|
| 30 | MarkerLayer.playPreviousMarker();
|
---|
| 31 | }
|
---|
[626] | 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.