Skip to content

Commit 2acd06d

Browse files
author
Federico Fissore
committed
Core/Lib manager confirmation dialogs should pop up onto that manager modal
1 parent 7552636 commit 2acd06d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public void onRemovePressed(final ContributedLibrary lib) {
252252
boolean managedByIndex = indexer.getIndex().getLibraries().contains(lib);
253253

254254
if (!managedByIndex) {
255-
int chosenOption = JOptionPane.showConfirmDialog(getParent(), _("This library is not listed on Library Manager. You won't be able to resinstall it from here.\nAre you sure you want to delete it?"), _("Please confirm library deletion"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
255+
int chosenOption = JOptionPane.showConfirmDialog(this, _("This library is not listed on Library Manager. You won't be able to resinstall it from here.\nAre you sure you want to delete it?"), _("Please confirm library deletion"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
256256
if (chosenOption != JOptionPane.YES_OPTION) {
257257
return;
258258
}

Diff for: app/src/cc/arduino/contributions/packages/ui/ContributionManagerUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void onRemovePressed(final ContributedPlatform platform, boolean showWarn
196196
clearErrorMessage();
197197

198198
if (showWarning) {
199-
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);
199+
int chosenOption = JOptionPane.showConfirmDialog(this, 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);
200200
if (chosenOption != JOptionPane.YES_OPTION) {
201201
return;
202202
}

0 commit comments

Comments
 (0)