Changeset 17354 in osm


Ignore:
Timestamp:
2009-08-30T17:05:37+02:00 (15 years ago)
Author:
guggis
Message:

Updated to JOSM 2010

Location:
applications/editors/josm/plugins/openstreetbugs
Files:
3 edited

Legend:

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

    r16797 r17354  
    2626                <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
    28                 <attribute name="Plugin-Mainversion" value="1893"/>
     28                <attribute name="Plugin-Mainversion" value="2010"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030            </manifest>
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java

    r16135 r17354  
    209209            hooks.add(0, uploadHook);
    210210           
    211             // add a listener to the plugin toggle button
    212             final JToggleButton toggle = (JToggleButton) dialog.action.button;
    213             active = toggle.isSelected();
    214             toggle.addActionListener(new ActionListener() {
    215                 private boolean download = true;
    216                
    217                 public void actionPerformed(ActionEvent e) {
    218                     active = toggle.isSelected();
    219                     if (toggle.isSelected() && download) {
    220                         Main.worker.execute(new Runnable() {
    221                             public void run() {
    222                                 updateData();
    223                             }
    224                         });
    225                         download = false;
    226                     }
    227                 }
    228             });
    229211        } else if (oldFrame!=null && newFrame==null ) { // map frame removed
    230212           
     
    241223    public void layerAdded(Layer newLayer) {
    242224        if(newLayer instanceof OsmDataLayer) {
    243             active = ((JToggleButton)dialog.action.button).isSelected();
     225            active = dialog.isDialogShowing();
    244226           
    245227            // start the auto download loop
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java

    r16622 r17354  
    311311
    312312    }
     313
     314    private boolean downloaded = false;
     315    protected void initialDownload() {
     316        Main.worker.execute(new Runnable() {
     317            public void run() {
     318                osbPlugin.updateData();
     319            }
     320        });
     321    }
     322   
     323        @Override
     324        public void showDialog() {
     325                if (!downloaded) {
     326                        initialDownload();
     327                        downloaded = true;
     328                }
     329                super.showDialog();
     330        }
    313331}
Note: See TracChangeset for help on using the changeset viewer.