Changeset 16731 in osm for applications
- Timestamp:
- 2009-07-30T13:24:22+02:00 (15 years ago)
- 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 31 31 32 32 import java.awt.event.ActionEvent; 33 import java.util.LinkedList; 33 34 import java.util.List; 34 35 … … 39 40 import org.openstreetmap.josm.plugins.osb.api.EditAction; 40 41 import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog; 41 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;42 42 43 43 public class AddCommentAction extends OsbAction { … … 53 53 @Override 54 54 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>())); 56 56 HistoryChangedListener l = new HistoryChangedListener() { 57 57 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); 59 59 } 60 60 }; 61 61 String comment = TextInputDialog.showDialog( 62 62 Main.map, 63 tr("Add a comment"), 63 tr("Add a comment"), 64 64 tr("Enter your comment"), 65 65 OsbPlugin.loadIcon("add_comment22.png"), 66 66 history, l); 67 67 68 68 if(comment != null) { 69 69 comment = addMesgInfo(comment); -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/CloseIssueAction.java
r16559 r16731 31 31 32 32 import java.awt.event.ActionEvent; 33 import java.util.LinkedList; 33 34 import java.util.List; 34 35 … … 40 41 import org.openstreetmap.josm.plugins.osb.api.EditAction; 41 42 import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog; 42 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;43 43 44 44 public class CloseIssueAction extends OsbAction { … … 55 55 @Override 56 56 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>())); 58 58 HistoryChangedListener l = new HistoryChangedListener() { 59 59 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); 61 61 } 62 62 }; -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/NewIssueAction.java
r16559 r16731 35 35 import java.awt.event.MouseListener; 36 36 import java.io.IOException; 37 import java.util.LinkedList; 37 38 import java.util.List; 38 39 … … 47 48 import org.openstreetmap.josm.plugins.osb.api.NewAction; 48 49 import org.openstreetmap.josm.plugins.osb.gui.dialogs.TextInputDialog; 49 import org.openstreetmap.josm.plugins.osb.gui.historycombobox.StringUtils;50 50 51 51 public class NewIssueAction extends OsbAction implements MouseListener { … … 58 58 59 59 private OsbPlugin plugin; 60 60 61 61 private Cursor previousCursor; 62 62 … … 97 97 98 98 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>())); 100 100 HistoryChangedListener l = new HistoryChangedListener() { 101 101 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); 103 103 } 104 104 }; 105 105 String result = TextInputDialog.showDialog( 106 106 Main.map, 107 tr("Create issue"), 107 tr("Create issue"), 108 108 tr("Describe the problem precisely"), 109 109 OsbPlugin.loadIcon("icon_error_add22.png"),
Note:
See TracChangeset
for help on using the changeset viewer.