diff dwtest.c @ 1559:bc3a11fe9a46

Don't use _dw_pool_drain() in dw_exit() on Mac... that drains and recreates the pool. Just drain the pool during exit. Also switched to using dw_exit() and dw_main_quit() in dwtest.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 17 Jan 2012 16:10:47 +0000
parents 030e9bddc1c9
children ee47bda26916
line wrap: on
line diff
--- a/dwtest.c	Tue Jan 17 06:49:05 2012 +0000
+++ b/dwtest.c	Tue Jan 17 16:10:47 2012 +0000
@@ -571,19 +571,13 @@
 
 int DWSIGNAL exit_callback(HWND window, void *data)
 {
-    dw_taskbar_delete(textbox1, fileicon);
-    dw_window_destroy((HWND)data);
-    exit(0);
-    return -1;
-}
-
-int DWSIGNAL test_callback(HWND window, void *data)
-{
-    dw_window_destroy((HWND)data);
-    if ( current_file )
-        dw_free( current_file );
-    exit(0);
-    return -1;
+    if(dw_messagebox("dwtest", DW_MB_YESNO | DW_MB_QUESTION, "Are you sure you want to exit?"))
+    {
+        dw_taskbar_delete(textbox1, fileicon);
+        dw_window_destroy((HWND)data);
+        dw_main_quit();
+    }
+    return TRUE;
 }
 
 int DWSIGNAL browse_file_callback(HWND window, void *data)
@@ -1698,5 +1692,7 @@
 
     dw_main();
 
+    dw_debug("dwtest exiting...");
+    dw_exit(0);
     return 0;
 }