GTK's dnd is broken, not mine

Added notebook::removepage (not tested)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-11-24 13:29:09 +00:00
parent 33a5bc5299
commit fed46e722a
11 changed files with 127 additions and 24 deletions

View File

@@ -370,12 +370,32 @@ bool wxNotebook::DeletePage( int page )
child = child->next;
}
wxASSERT( child );
wxCHECK_MSG( child != NULL, FALSE, "illegal notebook index" );
delete nb_page->m_client;
// Amazingly, this is not necessary
// gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page_num );
m_pages.DeleteObject( nb_page );
return TRUE;
}
bool wxNotebook::RemovePage( int page )
{
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page) return FALSE;
int page_num = 0;
GList *child = GTK_NOTEBOOK(m_widget)->children;
while (child)
{
if (nb_page->m_page == (GtkNotebookPage*)child->data) break;
page_num++;
child = child->next;
}
wxCHECK_MSG( child != NULL, FALSE, "illegal notebook index" );
gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page_num );
m_pages.DeleteObject( nb_page );