Ignore:
Timestamp:
2009-04-11T21:42:09+02:00 (16 years ago)
Author:
hampelratte
Message:

added possibility to add a comment before the issue gets closed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/CloseIssueAction.java

    r13497 r14471  
    3131
    3232import java.awt.event.ActionEvent;
    33 import java.io.IOException;
    3433
    3534import javax.swing.JOptionPane;
     
    4948
    5049    @Override
    51     protected void doActionPerformed(ActionEvent e) throws IOException {
    52         int result = JOptionPane.showConfirmDialog(Main.parent,
     50    protected void doActionPerformed(ActionEvent e) throws Exception {
     51        int closeOk = JOptionPane.showConfirmDialog(Main.parent,
    5352                tr("Really mark this issue as ''done''?"),
    5453                tr("Really close?"),
    5554                JOptionPane.YES_NO_OPTION);
    5655
    57         if(result == JOptionPane.YES_OPTION) {
     56        if(closeOk == JOptionPane.YES_OPTION) {
     57            int addComment = JOptionPane.showConfirmDialog(Main.parent,
     58                    tr("Do you want to add a comment?"),
     59                    tr("Add comment?"),
     60                    JOptionPane.YES_NO_OPTION);
     61            if(addComment == JOptionPane.YES_OPTION) {
     62                new AddCommentAction().doActionPerformed(new ActionEvent(this, 0, "add_comment"));
     63            }
    5864            closeAction.execute(getSelectedNode());
    5965        }
Note: See TracChangeset for help on using the changeset viewer.