]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/docview.cpp
Move "static" keyword out from wxDEPRECATED() macros to placate icc.
[wxWidgets.git] / samples / docview / docview.cpp
index f8f2a8f98b658f941592fd93673437b70c66e1ab..57eeef7c520d9f073ac62083c4eb2f60a6603aeb 100644 (file)
@@ -7,7 +7,7 @@
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Julian Smart
 //              (c) 2008 Vadim Zeitlin
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 /*
@@ -228,10 +228,9 @@ bool MyApp::OnInit()
     CreateMenuBarForFrame(frame, menuFile, m_menuEdit);
 
     frame->SetIcon(wxICON(doc));
-    frame->Centre(wxBOTH);
-    frame->Show(true);
+    frame->Centre();
+    frame->Show();
 
-    SetTopWindow(frame);
     return true;
 }
 
@@ -285,10 +284,11 @@ void MyApp::CreateMenuBarForFrame(wxFrame *frame, wxMenu *file, wxMenu *edit)
     frame->SetMenuBar(menubar);
 }
 
-wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
+wxFrame *MyApp::CreateChildFrame(wxView *view, bool isCanvas)
 {
     // create a child frame of appropriate class for the current mode
     wxFrame *subframe;
+    wxDocument *doc = view->GetDocument();
 #if wxUSE_MDI_ARCHITECTURE
     if ( GetMode() == Mode_MDI )
     {
@@ -317,7 +317,7 @@ wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
                             wxSize(300, 300)
                        );
 
-        subframe->Centre(wxBOTH);
+        subframe->Centre();
     }
 
     wxMenu *menuFile = new wxMenu;