diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 64716f751..1472d0c26 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -910,35 +910,6 @@ public class Base { editor.internalCloseRunner(); if (editors.size() == 1) { - // For 0158, when closing the last window /and/ it was already an - // untitled sketch, just give up and let the user quit. -// if (Preferences.getBoolean("sketchbook.closing_last_window_quits") || -// (editor.untitled && !editor.getSketch().isModified())) { - if (OSUtils.isMacOS()) { - Object[] options = {"OK", "Cancel"}; - String prompt = - _(" " + - " " + - "Are you sure you want to Quit?" + - "

Closing the last open sketch will quit Arduino."); - - int result = JOptionPane.showOptionDialog(editor, - prompt, - _("Quit"), - JOptionPane.YES_NO_OPTION, - JOptionPane.QUESTION_MESSAGE, - null, - options, - options[0]); - if (result == JOptionPane.NO_OPTION || - result == JOptionPane.CLOSED_OPTION) { - return false; - } - } - // This will store the sketch count as zero editors.remove(editor); try { diff --git a/app/src/processing/app/macosx/ThinkDifferent.java b/app/src/processing/app/macosx/ThinkDifferent.java index 1f243a8d4..132e7efe6 100644 --- a/app/src/processing/app/macosx/ThinkDifferent.java +++ b/app/src/processing/app/macosx/ThinkDifferent.java @@ -83,7 +83,7 @@ public class ThinkDifferent { @Override public void handleQuitRequestWith(AppEvent.QuitEvent quitEvent, QuitResponse quitResponse) { if (waitForBase()) { - if (Base.INSTANCE.handleClose(Base.INSTANCE.getActiveEditor())) { + if (Base.INSTANCE.handleQuit()) { quitResponse.performQuit(); } else { quitResponse.cancelQuit(); @@ -113,4 +113,4 @@ public class ThinkDifferent { } } -} \ No newline at end of file +}