Changeset 32387 in osm


Ignore:
Timestamp:
2016-06-23T18:39:46+02:00 (8 years ago)
Author:
stoecker
Message:

Old style SideButton usage (see #josm12994)

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/build.xml

    r32182 r32387  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="9649"/>
     7    <property name="plugin.main.version" value="10369"/>
    88    <property name="plugin.canloadatruntime" value="true"/>
    99
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java

    r32114 r32387  
    119119
    120120        public WikipediaLoadCoordinatesAction() {
    121             super(tr("Coordinates"), ImageProvider.get("dialogs", "refresh"));
     121            super(tr("Coordinates"));
     122            new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true);
    122123            putValue(SHORT_DESCRIPTION, tr("Fetches all coordinates from Wikipedia in the current view"));
    123124        }
     
    176177
    177178        public WikipediaLoadCategoryAction() {
    178             super(tr("Category"), ImageProvider.get("dialogs", "refresh"));
     179            super(tr("Category"));
     180            new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this, true);
    179181            putValue(SHORT_DESCRIPTION, tr("Fetches a list of all Wikipedia articles of a category"));
    180182        }
     
    205207
    206208        public PasteWikipediaArticlesAction() {
    207             super(tr("Clipboard"), ImageProvider.get("paste"));
     209            super(tr("Clipboard"));
     210            new ImageProvider("paste").getResource().attachImageIcon(this, true);
    208211            putValue(SHORT_DESCRIPTION, tr("Pastes Wikipedia articles from the system clipboard"));
    209212        }
     
    226229
    227230        public OpenWikipediaArticleAction() {
    228             super(tr("Open Article"), ImageProvider.getIfAvailable("browser"));
     231            super(tr("Open Article"));
     232            new ImageProvider("browser").getResource().attachImageIcon(this);
    229233            putValue(SHORT_DESCRIPTION, tr("Opens the Wikipedia article of the selected item in a browser"));
    230234        }
     
    243247
    244248        public WikipediaSettingsAction() {
    245             super(tr("Language"), ImageProvider.get("dialogs/settings"));
     249            super(tr("Language"));
     250            new ImageProvider("dialogs/settings").getResource().attachImageIcon(this, true);
    246251            putValue(SHORT_DESCRIPTION, tr("Sets the default language for the Wikipedia articles"));
    247252        }
     
    264269
    265270        public AddWikipediaTagAction() {
    266             super(tr("Add Tag"), ImageProvider.get("pastetags"));
     271            super(tr("Add Tag"));
     272            new ImageProvider("pastetags").getResource().attachImageIcon(this, true);
    267273            putValue(SHORT_DESCRIPTION, tr("Adds a ''wikipedia'' tag corresponding to this article to the selected objects"));
    268274        }
     
    290296
    291297        ZoomToWikipediaArticleAction() {
    292             super(tr("Zoom to selection"), ImageProvider.get("dialogs/autoscale", "selection"));
     298            super(tr("Zoom to selection"));
     299            new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this);
    293300            putValue(SHORT_DESCRIPTION, tr("Zoom to selection"));
    294301        }
Note: See TracChangeset for help on using the changeset viewer.