comparison 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
comparison
equal deleted inserted replaced
1330:c63069148357 1331:4c12170f003f
6402 * handle: Handle to the notebook widget. 6402 * handle: Handle to the notebook widget.
6403 * pageid: ID of the page to be destroyed. 6403 * pageid: ID of the page to be destroyed.
6404 */ 6404 */
6405 void API dw_notebook_page_destroy(HWND handle, unsigned int pageid) 6405 void API dw_notebook_page_destroy(HWND handle, unsigned int pageid)
6406 { 6406 {
6407 HWND pagehwnd = (HWND)WinSendMsg(handle, BKM_QUERYPAGEWINDOWHWND,
6408 MPFROMLONG(pageid), 0L);
6407 WinSendMsg(handle, BKM_DELETEPAGE, 6409 WinSendMsg(handle, BKM_DELETEPAGE,
6408 MPFROMLONG(pageid), (MPARAM)BKA_SINGLE); 6410 MPFROMLONG(pageid), (MPARAM)BKA_SINGLE);
6411 if(pagehwnd)
6412 dw_window_destroy(pagehwnd);
6409 } 6413 }
6410 6414
6411 /* 6415 /*
6412 * Queries the currently visible page ID. 6416 * Queries the currently visible page ID.
6413 * Parameters: 6417 * Parameters: