]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/notebook.cpp
make Delete() work in presence of client data
[wxWidgets.git] / src / gtk / notebook.cpp
index eff299416787f1a105c8469ab9903f2d7164e847..248e2e2e050f9c5929cee99ac412af5d420d5a2b 100644 (file)
@@ -614,10 +614,13 @@ 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 );
 
-    if (position < 0)
+#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
-        gtk_notebook_insert_page( notebook, win->m_widget, nb_page->m_box, position );
+#endif
+     gtk_notebook_insert_page( notebook, win->m_widget, nb_page->m_box, position );
 
     nb_page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data;
 
@@ -654,10 +657,13 @@ 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
-            SetSelection( position );
+#endif
+           SetSelection( position );
     }
 
     gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page",