Remove stop-after-last-window? option, it's obsolete, get ui.event-loop (only used on X11 and Windows) to load

db4
slava 2008-12-13 03:49:22 -06:00
parent cafc8efe97
commit 7bf857650c
5 changed files with 3 additions and 17 deletions

View File

@ -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

View File

@ -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 ;

View File

@ -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

View File

@ -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 ;

View File

@ -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