Changeset 16731 in osm for applications


Ignore:
Timestamp:
2009-07-30T13:24:22+02:00 (15 years ago)
Author:
stoecker
Message:

remove old style prefs

Location:
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/AddCommentAction.java

    r16559 r16731  
    3131
    3232import java.awt.event.ActionEvent;
     33import java.util.LinkedList;
    3334import java.util.List;
    3435
     
    3940import org.openstreetmap.josm.plugins.osb.api.EditAction;
    4041import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog;
    41 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;
    4242
    4343public class AddCommentAction extends OsbAction {
     
    5353    @Override
    5454    protected void doActionPerformed(ActionEvent e) throws Exception {
    55         List<String> history = StringUtils.stringToList(Main.pref.get(ConfigKeys.OSB_COMMENT_HISTORY), "§§§");
     55        List<String> history = new LinkedList<String>(Main.pref.getCollection(ConfigKeys.OSB_COMMENT_HISTORY, new LinkedList<String>()));
    5656        HistoryChangedListener l = new HistoryChangedListener() {
    5757            public void historyChanged(List<String> history) {
    58                 Main.pref.put(ConfigKeys.OSB_COMMENT_HISTORY, StringUtils.listToString(history, "§§§"));
     58                Main.pref.putCollection(ConfigKeys.OSB_COMMENT_HISTORY, history);
    5959            }
    6060        };
    6161        String comment = TextInputDialog.showDialog(
    6262                Main.map,
    63                 tr("Add a comment"), 
     63                tr("Add a comment"),
    6464                tr("Enter your comment"),
    6565                OsbPlugin.loadIcon("add_comment22.png"),
    6666                history, l);
    67        
     67
    6868        if(comment != null) {
    6969            comment = addMesgInfo(comment);
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/CloseIssueAction.java

    r16559 r16731  
    3131
    3232import java.awt.event.ActionEvent;
     33import java.util.LinkedList;
    3334import java.util.List;
    3435
     
    4041import org.openstreetmap.josm.plugins.osb.api.EditAction;
    4142import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog;
    42 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;
    4343
    4444public class CloseIssueAction extends OsbAction {
     
    5555    @Override
    5656    protected void doActionPerformed(ActionEvent e) throws Exception {
    57         List<String> history = StringUtils.stringToList(Main.pref.get(ConfigKeys.OSB_COMMENT_HISTORY), "§§§");
     57        List<String> history = new LinkedList<String>(Main.pref.getCollection(ConfigKeys.OSB_COMMENT_HISTORY, new LinkedList<String>()));
    5858        HistoryChangedListener l = new HistoryChangedListener() {
    5959            public void historyChanged(List<String> history) {
    60                 Main.pref.put(ConfigKeys.OSB_COMMENT_HISTORY, StringUtils.listToString(history, "§§§"));
     60                Main.pref.putCollection(ConfigKeys.OSB_COMMENT_HISTORY, history);
    6161            }
    6262        };
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/NewIssueAction.java

    r16559 r16731  
    3535import java.awt.event.MouseListener;
    3636import java.io.IOException;
     37import java.util.LinkedList;
    3738import java.util.List;
    3839
     
    4748import org.openstreetmap.josm.plugins.osb.api.NewAction;
    4849import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog;
    49 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;
    5050
    5151public class NewIssueAction extends OsbAction implements MouseListener {
     
    5858
    5959    private OsbPlugin plugin;
    60    
     60
    6161    private Cursor previousCursor;
    6262
     
    9797
    9898    private void addNewIssue(MouseEvent e) {
    99         List<String> history = StringUtils.stringToList(Main.pref.get(ConfigKeys.OSB_NEW_HISTORY), "§§§");
     99        List<String> history = new LinkedList<String>(Main.pref.getCollection(ConfigKeys.OSB_NEW_HISTORY, new LinkedList<String>()));
    100100        HistoryChangedListener l = new HistoryChangedListener() {
    101101            public void historyChanged(List<String> history) {
    102                 Main.pref.put(ConfigKeys.OSB_NEW_HISTORY, StringUtils.listToString(history, "§§§"));
     102                Main.pref.putCollection(ConfigKeys.OSB_NEW_HISTORY, history);
    103103            }
    104104        };
    105105        String result = TextInputDialog.showDialog(
    106106                Main.map,
    107                 tr("Create issue"), 
     107                tr("Create issue"),
    108108                tr("Describe the problem precisely"),
    109109                OsbPlugin.loadIcon("icon_error_add22.png"),
Note: See TracChangeset for help on using the changeset viewer.