Ignore:
Timestamp:
2013-11-28T18:19:44+01:00 (11 years ago)
Author:
simon04
Message:

JOSM/wikipedia: remove popup window - fix #josm9317

Location:
applications/editors/josm/plugins/wikipedia/src/org/wikipedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java

    r30074 r30100  
    251251    static class WikipediaEntry implements Comparable<WikipediaEntry> {
    252252
    253         final String name, description;
     253        final String name;
    254254        final String wikipediaLang, wikipediaArticle;
    255255        final LatLon coordinate;
     
    258258        public WikipediaEntry(String name, String description, LatLon coordinate) {
    259259            this.name = name;
    260             this.description = description;
    261260            this.coordinate = coordinate;
    262261
    263             final WikipediaLangArticle wp = WikipediaLangArticle.parseFromUrl(getHrefFromDescription());
     262            final WikipediaLangArticle wp = WikipediaLangArticle.parseFromUrl(getHrefFromDescription(description));
    264263            if (wp == null) {
    265                 System.err.println("Could not extract Wikipedia tag from: " + getHrefFromDescription());
     264                System.err.println("Could not extract Wikipedia tag from: " + getHrefFromDescription(description));
    266265            }
    267266            this.wikipediaLang = wp == null ? null : wp.lang;
     
    271270        public WikipediaEntry(String name, String wikipediaLang, String wikipediaArticle) {
    272271            this.name = name;
    273             this.description = null;
    274272            this.wikipediaLang = wikipediaLang;
    275273            this.wikipediaArticle = wikipediaArticle;
     
    277275        }
    278276
    279         protected final String getHrefFromDescription() {
     277        protected final String getHrefFromDescription(final String description) {
    280278            if (description == null) {
    281279                return null;
     
    316314
    317315        public String getBrowserUrl() {
    318             if (getHrefFromDescription() != null) {
    319                 return getHrefFromDescription().replace(" ", "_");
    320             } else {
    321                 return "http://" + wikipediaLang + ".wikipedia.org/wiki/"
    322                         + encodeURL(wikipediaArticle.replace(" ", "_"));
    323             }
     316            return "http://" + wikipediaLang + ".wikipedia.org/wiki/"
     317                    + encodeURL(wikipediaArticle.replace(" ", "_"));
    324318        }
    325319
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java

    r29854 r30100  
    9696                        label.setToolTipText(tr("Not linked yet"));
    9797                    }
    98                     if (entry.description != null) {
    99                         label.setToolTipText("<html>" + entry.description + "</html>");
    100                     }
    10198                    return label;
    10299                }
Note: See TracChangeset for help on using the changeset viewer.