Changeset 30060 in osm
- Timestamp:
- 2013-11-19T02:41:51+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
r30034 r30060 92 92 // as we don't know its contents yet and therefore have a height of 0. This will 93 93 // lead to unnecessary scrollbars. 94 private JMultilineLabel OutputDisplay = new JMultilineLabel(" ");94 private JMultilineLabel outputDisplay = new JMultilineLabel(" "); 95 95 private HistoryComboBox descriptionField; 96 96 private HistoryComboBox tagsField; … … 162 162 JPanel p = new JPanel(new GridBagLayout()); 163 163 164 OutputDisplay.setMaxWidth(findMaxDialogSize().width-10);165 p.add( OutputDisplay, GBC.eol());164 outputDisplay.setMaxWidth(findMaxDialogSize().width-10); 165 p.add(outputDisplay, GBC.eol()); 166 166 167 167 p.add(tagsLabel, GBC.eol().insets(0,10,0,0)); … … 179 179 180 180 private void initTitleAndDescriptionFromGpxData(GpxData gpxData) { 181 String description , title, tags = "";181 String description = "", title = "", tags = ""; 182 182 if (gpxData != null) { 183 183 GpxTrack firstTrack = gpxData.tracks.iterator().next(); … … 187 187 } else if (firstTrack != null && gpxData.tracks.size() == 1 && firstTrack.get("desc") != null) { 188 188 description = firstTrack.getString("desc"); 189 } else {189 } else if (gpxData.storageFile != null) { 190 190 description = gpxData.storageFile.getName().replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$",""); 191 191 } 192 title = tr("Selected track: {0}", gpxData.storageFile.getName()); 192 if (gpxData.storageFile != null) { 193 title = tr("Selected track: {0}", gpxData.storageFile.getName()); 194 } 193 195 Object meta_tags = gpxData.attr.get(GpxConstants.META_KEYWORDS); 194 196 if (meta_tags != null) { … … 200 202 title = tr("No GPX layer selected. Cannot upload a trace."); 201 203 } 202 OutputDisplay.setText(title);204 outputDisplay.setText(title); 203 205 descriptionField.setText(description); 204 206 tagsField.setText(tags); … … 246 248 GuiHelper.runInEDT(new Runnable() { 247 249 @Override public void run() { 248 OutputDisplay.setText(tr("Upload canceled"));250 outputDisplay.setText(tr("Upload canceled")); 249 251 buttons.get(0).setEnabled(true); 250 252 } … … 267 269 GuiHelper.runInEDT(new Runnable() { 268 270 @Override public void run() { 269 OutputDisplay.setText(tr("Error while uploading"));271 outputDisplay.setText(tr("Error while uploading")); 270 272 } 271 273 }); … … 325 327 GuiHelper.runInEDT(new Runnable() { 326 328 @Override public void run() { 327 OutputDisplay.setText(success329 outputDisplay.setText(success 328 330 ? tr("GPX upload was successful") 329 331 : tr("Upload failed. Server returned the following message: ") + returnMsgEDT); … … 409 411 GuiHelper.runInEDT(new Runnable() { 410 412 @Override public void run() { 411 OutputDisplay.setText(errorsEDT);413 outputDisplay.setText(errorsEDT); 412 414 } 413 415 });
Note:
See TracChangeset
for help on using the changeset viewer.