No real changes, just replace -1 with wxNOT_FOUND in wxBookCtrl code.

Make the code consistently use wxNOT_FOUND instead of -1 everywhere.

See #12622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-27 16:54:24 +00:00
parent ef0fdf3914
commit 7e837615b9
16 changed files with 40 additions and 40 deletions

View File

@@ -227,7 +227,7 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
{
int sel = notebook->GetSelection();
if (sel == -1)
if (sel == wxNOT_FOUND)
return TRUE;
wxGtkNotebookPage *nb_page = notebook->GetNotebookPage(sel);
wxCHECK_MSG( nb_page, FALSE, wxT("invalid selection in wxNotebook") );
@@ -362,9 +362,9 @@ bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
int wxNotebook::GetSelection() const
{
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid notebook") );
if ( m_selection == -1 )
if ( m_selection == wxNOT_FOUND )
{
GList *nb_pages = GTK_NOTEBOOK(m_widget)->children;
@@ -417,7 +417,7 @@ wxGtkNotebookPage* wxNotebook::GetNotebookPage( int page ) const
int wxNotebook::DoSetSelection( size_t page, int flags )
{
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
wxCHECK_MSG( m_widget != NULL, wxNOT_FOUND, wxT("invalid notebook") );
wxCHECK_MSG( page < m_pagesData.GetCount(), -1, wxT("invalid notebook index") );
@@ -597,10 +597,10 @@ bool wxNotebook::DeleteAllPages()
wxNotebookPage *wxNotebook::DoRemovePage( size_t page )
{
if ( m_selection != -1 && (size_t)m_selection >= page )
if ( m_selection != wxNOT_FOUND && (size_t)m_selection >= page )
{
// the index will become invalid after the page is deleted
m_selection = -1;
m_selection = wxNOT_FOUND;
}
wxNotebookPage *client = wxNotebookBase::DoRemovePage(page);