Ticket #20123: 20123-columbusCSV-no-dialog.patch

File 20123-columbusCSV-no-dialog.patch, 3.8 KB (added by GerdP, 5 years ago)

remove dead dialog code from columbusCSV

  • src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPlugin.java

     
    2424       
    2525        ExtensionFileFilter.addImporter(new ColumbusCSVImporter());
    2626    }
    27    
    28     /**
    29      * Called in the preferences dialog to create a preferences page for the plugin,
    30      * if any available.
    31      */
    32     @Override
    33     public PreferenceSetting getPreferenceSetting() {
    34         if (columbusSettings == null) {
    35             columbusSettings = new ColumbusCSVPreferences();
    36         }
    37         return columbusSettings;
    38     }
    3927}
  • src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPreferences.java

     
    66import javax.swing.ButtonGroup;
    77import javax.swing.JCheckBox;
    88
    9 import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
    10 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    119import org.openstreetmap.josm.spi.preferences.Config;
    1210
    1311/**
     
    1412 * Implements the preferences dialog for this plugin.
    1513 * @author Oliver Wieland <oliver.wieland@online.de>
    1614 */
    17 public class ColumbusCSVPreferences extends DefaultTabPreferenceSetting {
     15public class ColumbusCSVPreferences {
    1816    public static final String PREFIX = "columbuscsv.";
    1917   
    2018    /**
     
    5553       super();
    5654    }
    5755
    58     /**
    59      * Applies the (new) settings after settings dialog has been closed successfully.
    60      */
    61     @Override
    62     public boolean ok() {
    63         Config.getPref().putBoolean(SHOW_SUMMARY, colCSVShowSummary.isSelected());
    64         Config.getPref().putBoolean(ZOOM_AFTER_IMPORT, colCSVDontZoomAfterImport.isSelected());
    65         Config.getPref().putBoolean(IGNORE_VDOP, colCSVIgnoreVDOP.isSelected());
    66         Config.getPref().putBoolean(WARN_CONVERSION_ERRORS, colCSVWarnConversionErrors.isSelected());
    67         Config.getPref().putBoolean(WARN_MISSING_AUDIO, colCSVWarnMissingAudio.isSelected());       
    68         return false;
    69     }
    7056   
    7157    /**
    7258     * If <tt>true</tt>, a summary dialog is shown after import. Default is <tt>true</tt>.
     
    11298        return Config.getPref().getBoolean(WARN_MISSING_AUDIO, false);
    11399    }
    114100
    115     /**
    116      * Populates the UI with our settings.
    117      * @param gui The pane to populate.
    118      */
    119     @Override
    120     public void addGui(PreferenceTabbedPane gui) {
    121         // Import settings
    122         ButtonGroup gpsImportGroup = new ButtonGroup();
    123         gpsImportGroup.add(colCSVShowSummary);
    124         gpsImportGroup.add(colCSVDontZoomAfterImport);
    125         gpsImportGroup.add(colCSVIgnoreVDOP);
    126      
    127         // Warning settings
    128         ButtonGroup gpsWarningsGroup = new ButtonGroup();
    129         gpsWarningsGroup.add(colCSVWarnMissingAudio);
    130         gpsWarningsGroup.add(colCSVWarnConversionErrors);
    131 
    132         // Apply settings
    133         colCSVShowSummary.setSelected(Config.getPref().getBoolean(SHOW_SUMMARY, true));
    134         colCSVDontZoomAfterImport.setSelected(Config.getPref().getBoolean(ZOOM_AFTER_IMPORT, true));
    135         colCSVIgnoreVDOP.setSelected(Config.getPref().getBoolean(IGNORE_VDOP, false));
    136         colCSVWarnConversionErrors.setSelected(Config.getPref().getBoolean(WARN_CONVERSION_ERRORS, true));
    137         colCSVWarnMissingAudio.setSelected(Config.getPref().getBoolean(WARN_MISSING_AUDIO, true));
    138     }
    139 
    140     @Override
    141     public boolean isExpert() {
    142         return false;
    143     }
    144    
    145101}