mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Core deletion confirmation
This commit is contained in:
@ -35,7 +35,9 @@ import cc.arduino.contributions.ui.FilteredAbstractTableModel;
|
|||||||
import cc.arduino.contributions.ui.InstallerJDialog;
|
import cc.arduino.contributions.ui.InstallerJDialog;
|
||||||
import cc.arduino.contributions.ui.InstallerTableCell;
|
import cc.arduino.contributions.ui.InstallerTableCell;
|
||||||
import cc.arduino.utils.Progress;
|
import cc.arduino.utils.Progress;
|
||||||
|
import processing.app.I18n;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@ -172,6 +174,12 @@ public class ContributionManagerUI extends InstallerJDialog {
|
|||||||
|
|
||||||
public void onRemovePressed(final ContributedPlatform platform) {
|
public void onRemovePressed(final ContributedPlatform platform) {
|
||||||
clearErrorMessage();
|
clearErrorMessage();
|
||||||
|
|
||||||
|
int chosenOption = JOptionPane.showConfirmDialog(getParent(), I18n.format(_("Do you want to remove {0}?\nIf you do so you won't be able to use {0} any more."), platform.getName()), _("Please confirm boards deletion"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
|
||||||
|
if (chosenOption != JOptionPane.YES_OPTION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
installerThread = new Thread(new Runnable() {
|
installerThread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Reference in New Issue
Block a user