groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [1/3] groovy git commit: GROOVY-8718: handle new quit handler param better
Date Fri, 10 Aug 2018 12:09:50 GMT
Repository: groovy
Updated Branches:
  refs/heads/master d56d9e756 -> 93af30530


GROOVY-8718: handle new quit handler param better


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/85912669
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/85912669
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/85912669

Branch: refs/heads/master
Commit: 85912669aad2f758977ef78a4dc78e847453b557
Parents: d56d9e7
Author: Paul King <paulk@asert.com.au>
Authored: Fri Aug 10 14:57:17 2018 +1000
Committer: Paul King <paulk@asert.com.au>
Committed: Fri Aug 10 14:57:17 2018 +1000

----------------------------------------------------------------------
 .../groovy-console/src/main/groovy/groovy/ui/Console.groovy   | 7 ++++++-
 .../src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy       | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/85912669/subprojects/groovy-console/src/main/groovy/groovy/ui/Console.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/ui/Console.groovy b/subprojects/groovy-console/src/main/groovy/groovy/ui/Console.groovy
index 8a1708d..a0c7009 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/ui/Console.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/ui/Console.groovy
@@ -679,7 +679,12 @@ class Console implements CaretListener, HyperlinkListener, ComponentListener,
Fo
         runThread?.interrupt()
     }
 
-    void exit(EventObject evt = null, desktopQuitResponse = null) {
+    void exitDesktop(EventObject evt = null, quitResponse = null) {
+        exit(evt)
+        quitResponse.performQuit()
+    }
+
+    void exit(EventObject evt = null) {
         if (askToInterruptScript()) {
             if (askToSaveFile()) {
                 if (frame instanceof Window) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/85912669/subprojects/groovy-console/src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy
b/subprojects/groovy-console/src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy
index 8b25190..b40e26d 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/ui/view/MacOSXMenuBar.groovy
@@ -30,7 +30,7 @@ if (!handler) {
 import java.awt.Desktop
 def handler = Desktop.getDesktop()
 handler.setAboutHandler(controller.&showAbout)
-handler.setQuitHandler(controller.&exit)
+handler.setQuitHandler(controller.&exitDesktop)
 handler.setPreferencesHandler(controller.&preferences)
 handler
 """ : """


Mime
View raw message