]> git.saurik.com Git - wxWidgets.git/commitdiff
Added code to make wxMDIChildFrame::Activate() work
authorJ. Russell Smyth <drfish@cox.net>
Mon, 17 May 1999 06:29:39 +0000 (06:29 +0000)
committerJ. Russell Smyth <drfish@cox.net>
Mon, 17 May 1999 06:29:39 +0000 (06:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/mdi.cpp
src/gtk1/mdi.cpp

index 0753a14aa633fe5b8d14365184e64dd9be9cf78d..bed9f15c1a8c50f8d367ee39ce2230e90e715e0a 100644 (file)
@@ -311,6 +311,17 @@ wxMenuBar *wxMDIChildFrame::GetMenuBar() const
 
 void wxMDIChildFrame::Activate()
 {
+#if( GTK_MINOR_VERSION>0 )
+    wxMDIParentFrame* parent = (wxMDIParentFrame*)GetParent();
+    GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget);
+    gint pageno = gtk_notebook_page_num(notebook,m_page->child);
+    gtk_notebook_set_page(notebook,pageno);
+#else
+    // the only way I can see to do this under gtk+ 1.0.X would
+    // be to keep track of page numbers, start at first and 
+    // do "next" enough times to get to this page number - messy
+    // - J. Russell Smyth
+#endif
 }
 
 void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )
index 0753a14aa633fe5b8d14365184e64dd9be9cf78d..bed9f15c1a8c50f8d367ee39ce2230e90e715e0a 100644 (file)
@@ -311,6 +311,17 @@ wxMenuBar *wxMDIChildFrame::GetMenuBar() const
 
 void wxMDIChildFrame::Activate()
 {
+#if( GTK_MINOR_VERSION>0 )
+    wxMDIParentFrame* parent = (wxMDIParentFrame*)GetParent();
+    GtkNotebook* notebook = GTK_NOTEBOOK(parent->m_widget);
+    gint pageno = gtk_notebook_page_num(notebook,m_page->child);
+    gtk_notebook_set_page(notebook,pageno);
+#else
+    // the only way I can see to do this under gtk+ 1.0.X would
+    // be to keep track of page numbers, start at first and 
+    // do "next" enough times to get to this page number - messy
+    // - J. Russell Smyth
+#endif
 }
 
 void wxMDIChildFrame::OnActivate( wxActivateEvent &WXUNUSED(event) )