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 [ [ die ] 19 setenv ] "cocoa.application" add-init-hook
"stop-after-last-window?" get
H{ } clone \ pool [ H{ } clone \ pool [
global [ global [
"stop-after-last-window?" "ui" lookup set
! Only keeps those methods that we actually call ! Only keeps those methods that we actually call
sent-messages get super-sent-messages get assoc-union sent-messages get super-sent-messages get assoc-union
objc-methods [ assoc-intersect pool-values ] change objc-methods [ assoc-intersect pool-values ] change

View File

@ -1,12 +1,11 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: ui.backend kernel namespaces sequences deques calendar USING: calendar combinators deques kernel namespaces sequences
threads ; threads ui ui.backend ui.gadgets ;
IN: ui.event-loop IN: ui.event-loop
: event-loop? ( -- ? ) : event-loop? ( -- ? )
{ {
{ [ stop-after-last-window? get not ] [ t ] }
{ [ graft-queue deque-empty? not ] [ t ] } { [ graft-queue deque-empty? not ] [ t ] }
{ [ windows get-global empty? not ] [ t ] } { [ windows get-global empty? not ] [ t ] }
[ f ] [ f ]
@ -14,6 +13,6 @@ IN: ui.event-loop
HOOK: do-events ui-backend ( -- ) 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 ; : ui-wait ( -- ) 10 milliseconds sleep ;

View File

@ -18,10 +18,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
deploy-ui? get deploy-ui? get
"Include user interface framework" <checkbox> add-gadget ; "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 ) : io-settings ( parent -- parent )
"Input/output support:" <label> add-gadget "Input/output support:" <label> add-gadget
deploy-io get deploy-io-options <radio-buttons> add-gadget ; deploy-io get deploy-io-options <radio-buttons> add-gadget ;
@ -50,7 +46,6 @@ TUPLE: deploy-gadget < pack vocab settings ;
<pile> <pile>
bundle-name bundle-name
deploy-ui deploy-ui
os macosx? [ exit-when-windows-closed ] when
io-settings io-settings
reflection-settings reflection-settings
advanced-settings advanced-settings

View File

@ -10,8 +10,6 @@ IN: ui
! Assoc mapping aliens to gadgets ! Assoc mapping aliens to gadgets
SYMBOL: windows SYMBOL: windows
SYMBOL: stop-after-last-window?
: window ( handle -- world ) windows get-global at ; : window ( handle -- world ) windows get-global at ;
: window-focus ( handle -- gadget ) window world-focus ; : window-focus ( handle -- gadget ) window world-focus ;
@ -207,7 +205,6 @@ MAIN: ui
f windows set-global f windows set-global
[ [
ui-hook set ui-hook set
stop-after-last-window? on
ui ui
] with-scope ] with-scope
] if ; ] if ;

View File

@ -574,7 +574,6 @@ M: windows-ui-backend set-title ( string world -- )
M: windows-ui-backend ui M: windows-ui-backend ui
[ [
[ [
stop-after-last-window? on
init-clipboard init-clipboard
init-win32-ui init-win32-ui
start-ui start-ui