Changeset 1572 in josm
- Timestamp:
- 2009-05-05T16:32:19+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java
r1462 r1572 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 5 import java.awt.event.ActionEvent;6 import java.awt.event.ActionListener;7 4 8 5 import javax.swing.Box; … … 46 43 public void addGui(PreferenceDialog gui) { 47 44 // audioMenuVisible 48 audioMenuVisible.addActionListener(new ActionListener(){49 public void actionPerformed(ActionEvent e) {50 if (!audioMenuVisible.isSelected())51 audioMenuVisible.setSelected(false);52 audioMenuVisible.setEnabled(audioMenuVisible.isSelected());53 }54 });55 45 audioMenuVisible.setSelected(! Main.pref.getBoolean("audio.menuinvisible")); 56 46 audioMenuVisible.setToolTipText(tr("Show or hide the audio menu entry on the main menu bar.")); … … 58 48 59 49 // audioTraceVisible 60 markerAudioTraceVisible.addActionListener(new ActionListener(){61 public void actionPerformed(ActionEvent e) {62 if (!markerAudioTraceVisible.isSelected())63 markerAudioTraceVisible.setSelected(false);64 }65 });66 50 markerAudioTraceVisible.setSelected(Main.pref.getBoolean("marker.traceaudio", true)); 67 51 markerAudioTraceVisible.setToolTipText(tr("Display a moving icon representing the point on the synchronized track where the audio currently playing was recorded.")); … … 69 53 70 54 // buttonLabels 71 markerButtonLabels.addActionListener(new ActionListener(){72 public void actionPerformed(ActionEvent e) {73 if (!markerButtonLabels.isSelected())74 markerButtonLabels.setSelected(false);75 }76 });77 55 markerButtonLabels.setSelected(Main.pref.getBoolean("marker.buttonlabels")); 78 56 markerButtonLabels.setToolTipText(tr("Put text labels against audio (and image and web) markers as well as their button icons.")); … … 80 58 81 59 // makeAutoMarkers 82 makeAutoMarkers.addActionListener(new ActionListener(){83 public void actionPerformed(ActionEvent e) {84 if (!makeAutoMarkers.isSelected())85 makeAutoMarkers.setSelected(false);86 }87 });88 60 makeAutoMarkers.setSelected(Main.pref.getBoolean("marker.makeautomarkers", true)); 89 61 makeAutoMarkers.setToolTipText(tr("Automatically make a marker layer from any waypoints when opening a GPX layer.")); … … 93 65 94 66 // audioMarkersFromExplicitWaypoints 95 audioMarkersFromExplicitWaypoints.addActionListener(new ActionListener(){96 public void actionPerformed(ActionEvent e) {97 if (!audioMarkersFromExplicitWaypoints.isSelected())98 audioMarkersFromExplicitWaypoints.setSelected(false);99 }100 });101 67 audioMarkersFromExplicitWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromexplicitwaypoints", true)); 102 68 audioMarkersFromExplicitWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer.")); … … 104 70 105 71 // audioMarkersFromUntimedWaypoints 106 audioMarkersFromUntimedWaypoints.addActionListener(new ActionListener(){107 public void actionPerformed(ActionEvent e) {108 if (!audioMarkersFromUntimedWaypoints.isSelected())109 audioMarkersFromUntimedWaypoints.setSelected(false);110 }111 });112 72 audioMarkersFromUntimedWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromuntimedwaypoints", true)); 113 73 audioMarkersFromUntimedWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer.")); … … 115 75 116 76 // audioMarkersFromNamedTrackpoints 117 audioMarkersFromNamedTrackpoints.addActionListener(new ActionListener(){118 public void actionPerformed(ActionEvent e) {119 if (!audioMarkersFromNamedTrackpoints.isSelected())120 audioMarkersFromNamedTrackpoints.setSelected(false);121 }122 });123 77 audioMarkersFromNamedTrackpoints.setSelected(Main.pref.getBoolean("marker.audiofromnamedtrackpoints", false)); 124 78 audioMarkersFromNamedTrackpoints.setToolTipText(tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions.")); … … 126 80 127 81 // audioMarkersFromWavTimestamps 128 audioMarkersFromWavTimestamps.addActionListener(new ActionListener(){129 public void actionPerformed(ActionEvent e) {130 if (!audioMarkersFromWavTimestamps.isSelected())131 audioMarkersFromWavTimestamps.setSelected(false);132 }133 });134 82 audioMarkersFromWavTimestamps.setSelected(Main.pref.getBoolean("marker.audiofromwavtimestamps", false)); 135 83 audioMarkersFromWavTimestamps.setToolTipText(tr("Create audio markers at the position on the track corresponding to the modified time of each audio WAV file imported.")); … … 137 85 138 86 // audioMarkersFromStart 139 audioMarkersFromStart.addActionListener(new ActionListener(){140 public void actionPerformed(ActionEvent e) {141 if (!audioMarkersFromStart.isSelected())142 audioMarkersFromStart.setSelected(false);143 }144 });145 87 audioMarkersFromStart.setSelected(Main.pref.getBoolean("marker.audiofromstart")); 146 88 audioMarkersFromStart.setToolTipText(tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
Note:
See TracChangeset
for help on using the changeset viewer.