From 7bf857650c322290e5445e1d8113f4527f03adcf Mon Sep 17 00:00:00 2001
From: slava <slava@slava-laptop.(none)>
Date: Sat, 13 Dec 2008 03:49:22 -0600
Subject: [PATCH] Remove stop-after-last-window? option, it's obsolete, get
 ui.event-loop (only used on X11 and Windows) to load

---
 basis/tools/deploy/shaker/strip-cocoa.factor | 4 ----
 basis/ui/event-loop/event-loop.factor        | 7 +++----
 basis/ui/tools/deploy/deploy.factor          | 5 -----
 basis/ui/ui.factor                           | 3 ---
 basis/ui/windows/windows.factor              | 1 -
 5 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/basis/tools/deploy/shaker/strip-cocoa.factor b/basis/tools/deploy/shaker/strip-cocoa.factor
index 773b2d0f3b..df64443b7b 100644
--- a/basis/tools/deploy/shaker/strip-cocoa.factor
+++ b/basis/tools/deploy/shaker/strip-cocoa.factor
@@ -19,12 +19,8 @@ IN: cocoa.application
 
 [ [ die ] 19 setenv ] "cocoa.application" add-init-hook
 
-"stop-after-last-window?" get
-
 H{ } clone \ pool [
     global [
-        "stop-after-last-window?" "ui" lookup set
-
         ! Only keeps those methods that we actually call
         sent-messages get super-sent-messages get assoc-union
         objc-methods [ assoc-intersect pool-values ] change
diff --git a/basis/ui/event-loop/event-loop.factor b/basis/ui/event-loop/event-loop.factor
index fe6f4d7de5..7c08d802f5 100644
--- a/basis/ui/event-loop/event-loop.factor
+++ b/basis/ui/event-loop/event-loop.factor
@@ -1,12 +1,11 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: ui.backend kernel namespaces sequences deques calendar
-threads ;
+USING: calendar combinators deques kernel namespaces sequences
+threads ui ui.backend ui.gadgets ;
 IN: ui.event-loop
 
 : event-loop? ( -- ? )
     {
-        { [ stop-after-last-window? get not ] [ t ] }
         { [ graft-queue deque-empty? not ] [ t ] }
         { [ windows get-global empty? not ] [ t ] }
         [ f ]
@@ -14,6 +13,6 @@ IN: ui.event-loop
 
 HOOK: do-events ui-backend ( -- )
 
-: event-loop ( quot -- ) [ event-loop? ] [ do-events ] [ ] while ;
+: event-loop ( -- ) [ event-loop? ] [ do-events ] [ ] while ;
 
 : ui-wait ( -- ) 10 milliseconds sleep ;
diff --git a/basis/ui/tools/deploy/deploy.factor b/basis/ui/tools/deploy/deploy.factor
index f233c9f162..38db81c3dc 100644
--- a/basis/ui/tools/deploy/deploy.factor
+++ b/basis/ui/tools/deploy/deploy.factor
@@ -18,10 +18,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
     deploy-ui? get
     "Include user interface framework" <checkbox> add-gadget ;
 
-: exit-when-windows-closed ( parent -- parent )
-    "stop-after-last-window?" get
-    "Exit when last UI window closed" <checkbox> add-gadget ;
-
 : io-settings ( parent -- parent )
     "Input/output support:" <label> add-gadget
     deploy-io get deploy-io-options <radio-buttons> add-gadget ;
@@ -50,7 +46,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
             <pile>
             bundle-name
             deploy-ui
-            os macosx? [ exit-when-windows-closed ] when
             io-settings
             reflection-settings
             advanced-settings
diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor
index b6bc172c21..37ce4ea499 100644
--- a/basis/ui/ui.factor
+++ b/basis/ui/ui.factor
@@ -10,8 +10,6 @@ IN: ui
 ! Assoc mapping aliens to gadgets
 SYMBOL: windows
 
-SYMBOL: stop-after-last-window?
-
 : window ( handle -- world ) windows get-global at ;
 
 : window-focus ( handle -- gadget ) window world-focus ;
@@ -207,7 +205,6 @@ MAIN: ui
         f windows set-global
         [
             ui-hook set
-            stop-after-last-window? on
             ui
         ] with-scope
     ] if ;
diff --git a/basis/ui/windows/windows.factor b/basis/ui/windows/windows.factor
index 7f68bb5736..525aca21ab 100755
--- a/basis/ui/windows/windows.factor
+++ b/basis/ui/windows/windows.factor
@@ -574,7 +574,6 @@ M: windows-ui-backend set-title ( string world -- )
 M: windows-ui-backend ui
     [
         [
-            stop-after-last-window? on
             init-clipboard
             init-win32-ui
             start-ui