Changeset 14176 in josm for trunk/src/org
- Timestamp:
- 2018-08-22T01:20:19+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r14154 r14176 106 106 import org.openstreetmap.josm.gui.SplashScreen.SplashProgressMonitor; 107 107 import org.openstreetmap.josm.gui.bugreport.BugReportDialog; 108 import org.openstreetmap.josm.gui.bugreport.DefaultBugReportSendingHandler; 108 109 import org.openstreetmap.josm.gui.download.DownloadDialog; 109 110 import org.openstreetmap.josm.gui.io.CredentialDialog; … … 776 777 if (!GraphicsEnvironment.isHeadless()) { 777 778 BugReportQueue.getInstance().setBugReportHandler(BugReportDialog::showFor); 778 BugReportSender.setBugReportSendingHandler( BugReportDialog.bugReportSendingHandler);779 BugReportSender.setBugReportSendingHandler(new DefaultBugReportSendingHandler()); 779 780 } 780 781 -
trunk/src/org/openstreetmap/josm/gui/bugreport/BugReportDialog.java
r14153 r14176 18 18 import javax.swing.JOptionPane; 19 19 import javax.swing.JPanel; 20 import javax.swing.SwingUtilities;21 20 import javax.swing.UIManager; 22 21 … … 33 32 import org.openstreetmap.josm.tools.ImageProvider; 34 33 import org.openstreetmap.josm.tools.InputMapUtils; 35 import org.openstreetmap.josm.tools.OpenBrowser;36 34 import org.openstreetmap.josm.tools.bugreport.BugReport; 37 35 import org.openstreetmap.josm.tools.bugreport.BugReportQueue.SuppressionMode; 38 36 import org.openstreetmap.josm.tools.bugreport.BugReportSender; 39 import org.openstreetmap.josm.tools.bugreport.BugReportSender.BugReportSendingHandler;40 37 import org.openstreetmap.josm.tools.bugreport.ReportedException; 41 38 … … 55 52 private JCheckBox cbSuppressSingle; 56 53 private JCheckBox cbSuppressAll; 57 58 /**59 * Default bug report callback that opens the bug report form in user browser60 * and displays a dialog in case of error.61 * @since 1279062 */63 public static final BugReportSendingHandler bugReportSendingHandler = new BugReportSendingHandler() {64 @Override65 public String sendingBugReport(String bugUrl, String statusText) {66 return OpenBrowser.displayUrl(bugUrl);67 }68 69 @Override70 public void failed(String errorMessage, String statusText) {71 SwingUtilities.invokeLater(() -> {72 JPanel errorPanel = new JPanel(new GridBagLayout());73 errorPanel.add(new JMultilineLabel(74 tr("Opening the bug report failed. Please report manually using this website:")),75 GBC.eol().fill(GridBagConstraints.HORIZONTAL));76 errorPanel.add(new UrlLabel(Config.getUrls().getJOSMWebsite() + "/newticket", 2), GBC.eop().insets(8, 0, 0, 0));77 errorPanel.add(new DebugTextDisplay(statusText));78 79 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), errorPanel, tr("You have encountered a bug in JOSM"),80 JOptionPane.ERROR_MESSAGE);81 });82 }83 };84 54 85 55 /**
Note:
See TracChangeset
for help on using the changeset viewer.