diff --git a/TODO.md b/TODO.md index 2296de53..f94b16bd 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,3 @@ -- should uiWindowOnClosing() really return an int? - - if so, should the default return 0 instead of 1? - note that uiInitOptions should be initialized to zero - have a cbSize member - drop "Page" from uiTab method names? (uiTabAppendPage() -> uiTabAppend()) @@ -61,3 +59,4 @@ notes to self - reconsider this, as the pointer array code does work with the first invalid index... - we would need to test everything else with it - note that uiTabInsertPageBefore() does NOT change the current tab page (it may change its index if inserting before the current page) +- note that the default action for uiWindowOnClosing() is to return 0 (keep the window open) diff --git a/darwin/window.m b/darwin/window.m index 3e5749c1..57ce6f7e 100644 --- a/darwin/window.m +++ b/darwin/window.m @@ -49,7 +49,7 @@ struct window { static int defaultOnClosing(uiWindow *w, void *data) { - return 1; + return 0; } static void windowDestroy(uiControl *c) diff --git a/unix/window.c b/unix/window.c index fe8cbfcb..1dcbae2a 100644 --- a/unix/window.c +++ b/unix/window.c @@ -36,7 +36,7 @@ static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data) static int defaultOnClosing(uiWindow *w, void *data) { - return 1; + return 0; } static void windowDestroy(uiControl *c) diff --git a/windows/window.c b/windows/window.c index c1d77a5b..aa3fddc1 100644 --- a/windows/window.c +++ b/windows/window.c @@ -73,7 +73,7 @@ ATOM registerWindowClass(HICON hDefaultIcon, HCURSOR hDefaultCursor) static int defaultOnClosing(uiWindow *w, void *data) { - return 1; + return 0; } static void windowDestroy(uiControl *c)