Mercurial > dwindows
diff os2/dw.c @ 1331:4c12170f003f
Make dw_notebook_page_destroy() on OS/2 and Windows destroy the contents of the page.
I found that on GTK the contents will have the reference count lowered when the page is removed.
Causing the contents to be destroyed... however this does not happen on OS/2 or Windows.
The option was to either reference the contents before destroying the page on GTK or have
OS/2 and Windows destroy the contents. Because of the name I decided to destroy the contents.
It isn't clear to me what the behavior of removeTabViewItem is on the Mac so no changes there.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 10 Nov 2011 18:06:32 +0000 |
parents | 552da4dea7d1 |
children | c0f29ce1a879 |
line wrap: on
line diff
--- a/os2/dw.c Thu Nov 10 14:24:37 2011 +0000 +++ b/os2/dw.c Thu Nov 10 18:06:32 2011 +0000 @@ -6404,8 +6404,12 @@ */ void API dw_notebook_page_destroy(HWND handle, unsigned int pageid) { + HWND pagehwnd = (HWND)WinSendMsg(handle, BKM_QUERYPAGEWINDOWHWND, + MPFROMLONG(pageid), 0L); WinSendMsg(handle, BKM_DELETEPAGE, MPFROMLONG(pageid), (MPARAM)BKA_SINGLE); + if(pagehwnd) + dw_window_destroy(pagehwnd); } /*