Ignore:
Timestamp:
2013-03-20T08:05:48+01:00 (11 years ago)
Author:
zverik
Message:

some updates to iodb plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery_offset_db/src/iodb/DeprecateOffsetAction.java

    r29371 r29377  
    3030            return;
    3131       
     32        String desc = offset instanceof ImageryOffset ? "imagery offset is wrong"
     33                : "calibration geometry is aligned badly";
    3234        if( JOptionPane.showConfirmDialog(Main.parent,
    33                 tr("Warning: deprecation is irreversible"), // todo: expand
     35                tr("Warning: deprecation is basically irreversible!\nAre you sure this " + desc + "?"),
    3436                ImageryOffsetTools.DIALOG_TITLE, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION ) {
    3537            return;
     
    4648
    4749        String message = "Please enter the reason why you mark this "
    48                 + (offset instanceof ImageryOffset ? "imagery offset" : "calibraion object") + " as deprecated:";
    49         String reason = null;
    50         boolean iterated = false;
    51         while( reason == null ) {
    52             reason = JOptionPane.showInputDialog(Main.parent, message, ImageryOffsetTools.DIALOG_TITLE, JOptionPane.PLAIN_MESSAGE);
    53             if( reason == null || reason.length() == 0 ) {
    54                 return;
    55             }
    56             if( reason.length() < 3 || reason.length() > 200 ) {
    57                 reason = null;
    58                 if( !iterated ) {
    59                     message = message + "\n" + tr("Reason text should be 3 to 200 letters long.");
    60                     iterated = true;
    61                 }
    62             }
    63         }
     50                + (offset instanceof ImageryOffset ? "imagery offset" : "calibraion geometry") + " as deprecated:";
     51        String reason = StoreImageryOffsetAction.queryDescription(message);
     52        if( reason == null )
     53            return;
    6454       
    6555        try {
Note: See TracChangeset for help on using the changeset viewer.