Changeset 32575 in osm for applications/editors


Ignore:
Timestamp:
2016-07-05T14:48:50+02:00 (8 years ago)
Author:
floscher
Message:

[mapillary] Add information to PluginState if currently a changeset is submitted

Patch submitted by peterneubauer<peter@…>.

Location:
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java

    r32383 r32575  
    286286    } else if (MapillaryLayer.getInstance().getData().size() > 0) {
    287287      ret.append(tr("Total Mapillary images: {0}", MapillaryLayer.getInstance().getData().size()));
     288    } else if (PluginState.isSubmittingChangeset()) {
     289        ret.append(tr("Submitting Mapillary Changeset"));
    288290    } else {
    289291      ret.append(tr("No images found"));
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java

    r32378 r32575  
    1616 */
    1717public final class PluginState {
     18
     19  private static boolean submittingChangeset;
    1820
    1921  private static int runningDownloads;
     
    5456
    5557  /**
     58   * Checks if there is a changeset being submitted.
     59   *
     60   * @return true if the plugin is submitting a changeset false otherwise.
     61   */
     62  public static boolean isSubmittingChangeset() {
     63    return submittingChangeset;
     64  }
     65   /**
    5666   * Checks if there is any running upload.
    5767   *
     
    109119    }
    110120  }
     121  public static void notLoggedInToMapillaryDialog() {
     122    if (Main.main == null) {
     123      return;
     124    }
     125    JOptionPane.showMessageDialog(
     126        Main.parent,
     127        tr("You are not logged in, please log in to Mapillary in the preferences"),
     128        tr("Not Logged in to Mapillary"),
     129        JOptionPane.WARNING_MESSAGE
     130    );
     131  }
     132
     133
    111134
    112135  /**
     
    118141    return tr("Uploading: {0}", "(" + imagesUploaded + "/" + imagesToUpload + ")");
    119142  }
     143
     144  public static void setSubmittingChangeset(boolean isSubmitting) {
     145      submittingChangeset = isSubmitting;
     146  }
    120147}
Note: See TracChangeset for help on using the changeset viewer.