X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b318dc42374cfb58878c779447c9d0a6fc79eb1d..b1e343f2bbcadb59b9c5e8f4637b4a0008077d2c:/src/gtk1/notebook.cpp diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index fe5e541720..0621f9fe5b 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -20,6 +20,7 @@ #include "wx/imaglist.h" #include "wx/intl.h" #include "wx/log.h" +#include "wx/bitmap.h" #include "wx/gtk/private.h" #include "wx/gtk/win_gtk.h" @@ -86,14 +87,12 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), gint page, wxNotebook *notebook ) { - static bool s_inPageChange = FALSE; - // are you trying to call SetSelection() from a notebook event handler? // you shouldn't! - wxCHECK_RET( !s_inPageChange, + wxCHECK_RET( !notebook->m_inSwitchPage, _T("gtk_notebook_page_change_callback reentered") ); - s_inPageChange = TRUE; + notebook->m_inSwitchPage = TRUE; if (g_isIdle) wxapp_install_idle_handler(); @@ -123,7 +122,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), notebook->GetEventHandler()->ProcessEvent( eventChanged ); } - s_inPageChange = FALSE; + notebook->m_inSwitchPage = FALSE; } //----------------------------------------------------------------------------- @@ -236,6 +235,8 @@ END_EVENT_TABLE() void wxNotebook::Init() { m_padding = 0; + m_inSwitchPage = FALSE; + m_imageList = (wxImageList *) NULL; m_pagesData.DeleteContents( TRUE ); m_selection = -1;