Changeset 1572 in josm


Ignore:
Timestamp:
2009-05-05T16:32:19+02:00 (11 years ago)
Author:
stoecker
Message:

close #2464 - patch by Henrik Niehaus - audio preferences fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java

    r1462 r1572  
    22
    33import static org.openstreetmap.josm.tools.I18n.tr;
    4 
    5 import java.awt.event.ActionEvent;
    6 import java.awt.event.ActionListener;
    74
    85import javax.swing.Box;
     
    4643    public void addGui(PreferenceDialog gui) {
    4744        // 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         });
    5545        audioMenuVisible.setSelected(! Main.pref.getBoolean("audio.menuinvisible"));
    5646        audioMenuVisible.setToolTipText(tr("Show or hide the audio menu entry on the main menu bar."));
     
    5848
    5949        // audioTraceVisible
    60         markerAudioTraceVisible.addActionListener(new ActionListener(){
    61             public void actionPerformed(ActionEvent e) {
    62                 if (!markerAudioTraceVisible.isSelected())
    63                     markerAudioTraceVisible.setSelected(false);
    64             }
    65         });
    6650        markerAudioTraceVisible.setSelected(Main.pref.getBoolean("marker.traceaudio", true));
    6751        markerAudioTraceVisible.setToolTipText(tr("Display a moving icon representing the point on the synchronized track where the audio currently playing was recorded."));
     
    6953
    7054        // buttonLabels
    71         markerButtonLabels.addActionListener(new ActionListener(){
    72             public void actionPerformed(ActionEvent e) {
    73                 if (!markerButtonLabels.isSelected())
    74                     markerButtonLabels.setSelected(false);
    75             }
    76         });
    7755        markerButtonLabels.setSelected(Main.pref.getBoolean("marker.buttonlabels"));
    7856        markerButtonLabels.setToolTipText(tr("Put text labels against audio (and image and web) markers as well as their button icons."));
     
    8058
    8159        // makeAutoMarkers
    82         makeAutoMarkers.addActionListener(new ActionListener(){
    83             public void actionPerformed(ActionEvent e) {
    84                 if (!makeAutoMarkers.isSelected())
    85                     makeAutoMarkers.setSelected(false);
    86             }
    87         });
    8860        makeAutoMarkers.setSelected(Main.pref.getBoolean("marker.makeautomarkers", true));
    8961        makeAutoMarkers.setToolTipText(tr("Automatically make a marker layer from any waypoints when opening a GPX layer."));
     
    9365
    9466        // audioMarkersFromExplicitWaypoints
    95         audioMarkersFromExplicitWaypoints.addActionListener(new ActionListener(){
    96             public void actionPerformed(ActionEvent e) {
    97                 if (!audioMarkersFromExplicitWaypoints.isSelected())
    98                     audioMarkersFromExplicitWaypoints.setSelected(false);
    99             }
    100         });
    10167        audioMarkersFromExplicitWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromexplicitwaypoints", true));
    10268        audioMarkersFromExplicitWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer."));
     
    10470
    10571        // audioMarkersFromUntimedWaypoints
    106         audioMarkersFromUntimedWaypoints.addActionListener(new ActionListener(){
    107             public void actionPerformed(ActionEvent e) {
    108                 if (!audioMarkersFromUntimedWaypoints.isSelected())
    109                     audioMarkersFromUntimedWaypoints.setSelected(false);
    110             }
    111         });
    11272        audioMarkersFromUntimedWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromuntimedwaypoints", true));
    11373        audioMarkersFromUntimedWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer."));
     
    11575
    11676        // audioMarkersFromNamedTrackpoints
    117         audioMarkersFromNamedTrackpoints.addActionListener(new ActionListener(){
    118             public void actionPerformed(ActionEvent e) {
    119                 if (!audioMarkersFromNamedTrackpoints.isSelected())
    120                     audioMarkersFromNamedTrackpoints.setSelected(false);
    121             }
    122         });
    12377        audioMarkersFromNamedTrackpoints.setSelected(Main.pref.getBoolean("marker.audiofromnamedtrackpoints", false));
    12478        audioMarkersFromNamedTrackpoints.setToolTipText(tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
     
    12680
    12781        // audioMarkersFromWavTimestamps
    128         audioMarkersFromWavTimestamps.addActionListener(new ActionListener(){
    129             public void actionPerformed(ActionEvent e) {
    130                 if (!audioMarkersFromWavTimestamps.isSelected())
    131                     audioMarkersFromWavTimestamps.setSelected(false);
    132             }
    133         });
    13482        audioMarkersFromWavTimestamps.setSelected(Main.pref.getBoolean("marker.audiofromwavtimestamps", false));
    13583        audioMarkersFromWavTimestamps.setToolTipText(tr("Create audio markers at the position on the track corresponding to the modified time of each audio WAV file imported."));
     
    13785
    13886        // audioMarkersFromStart
    139         audioMarkersFromStart.addActionListener(new ActionListener(){
    140             public void actionPerformed(ActionEvent e) {
    141                 if (!audioMarkersFromStart.isSelected())
    142                     audioMarkersFromStart.setSelected(false);
    143             }
    144         });
    14587        audioMarkersFromStart.setSelected(Main.pref.getBoolean("marker.audiofromstart"));
    14688        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.