X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88d197753d7595709727d9b6a79f1772c2f12a39..345bdf13c073dde5f81ff8b91640232dd09445ee:/src/gtk/notebook.cpp diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index c1c1a2d9d3..1aba12cee7 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -7,10 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "notebook.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -83,7 +79,7 @@ public: #include "wx/listimpl.cpp" -WX_DEFINE_LIST(wxGtkNotebookPagesList); +WX_DEFINE_LIST(wxGtkNotebookPagesList) //----------------------------------------------------------------------------- @@ -654,7 +650,7 @@ bool wxNotebook::InsertPage( size_t position, if ( position == GetPageCount() ) m_pagesData.Append( nb_page ); else - m_pagesData.Insert( m_pagesData.Item( position ), nb_page ); + m_pagesData.Insert( position, nb_page ); m_pages.Insert(win, position); @@ -664,13 +660,7 @@ bool wxNotebook::InsertPage( size_t position, gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate", GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win ); -#ifndef __VMS - // On VMS position is unsigned and thus always positive - if (position < 0) - gtk_notebook_append_page( notebook, win->m_widget, nb_page->m_box ); - else -#endif - gtk_notebook_insert_page( notebook, win->m_widget, nb_page->m_box, position ); + gtk_notebook_insert_page( notebook, win->m_widget, nb_page->m_box, position ); nb_page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data; @@ -716,13 +706,7 @@ bool wxNotebook::InsertPage( size_t position, gtk_widget_show( GTK_WIDGET(nb_page->m_label) ); if (select && (m_pagesData.GetCount() > 1)) { -#ifndef __VMS - // On VMS position is unsigned and thus always positive - if (position < 0) - SetSelection( GetPageCount()-1 ); - else -#endif - SetSelection( position ); + SetSelection( position ); } gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page",