]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assign the returned value in wxMDIParentFrame::OnCreateClient() to any member...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Mar 2008 03:12:47 +0000 (03:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Mar 2008 03:12:47 +0000 (03:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/tabmdi.cpp
src/cocoa/mdi.mm
src/generic/mdig.cpp
src/gtk/mdi.cpp
src/gtk1/mdi.cpp
src/mac/carbon/mdi.cpp

index ccf9e885f51d37b9f06b80ef977b4d3af9a695a1..f5057af3baa1fb2b9b476203bca31ec9be58a6d8 100644 (file)
@@ -110,9 +110,11 @@ bool wxAuiMDIParentFrame::Create(wxWindow *parent,
     }
 #endif // wxUSE_MENUS
 
-    wxFrame::Create(parent, id, title, pos, size, style, name);
-    OnCreateClient();
-    return true;
+    if ( !wxFrame::Create(parent, id, title, pos, size, style, name) )
+        return false;
+
+    m_pClientWindow = OnCreateClient();
+    return m_pClientWindow != NULL;
 }
 
 
@@ -252,8 +254,7 @@ wxAuiMDIClientWindow *wxAuiMDIParentFrame::GetClientWindow() const
 
 wxAuiMDIClientWindow *wxAuiMDIParentFrame::OnCreateClient()
 {
-    m_pClientWindow = new wxAuiMDIClientWindow( this );
-    return m_pClientWindow;
+    return new wxAuiMDIClientWindow( this );
 }
 
 void wxAuiMDIParentFrame::ActivateNext()
index a0c8022306f1577ff3e8057d4798905db4e6d6b1..b1aa7c6b264add299e348b4ec459461df9e41e68 100644 (file)
@@ -95,10 +95,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
         const wxPoint& pos, const wxSize& size,
         long style, const wxString& name)
 {
-    bool success = wxFrame::Create(parent,winid,title,pos,size,style,name);
-    if(success)
-        OnCreateClient();
-    return success;
+    if ( !wxFrame::Create(parent,winid,title,pos,size,style,name) )
+        return false;
+
+    m_clientWindow = OnCreateClient();
+
+    return m_clientWindow != NULL;
 }
 
 wxMDIParentFrame::~wxMDIParentFrame()
@@ -145,8 +147,7 @@ wxMDIClientWindow *wxMDIParentFrame::GetClientWindow() const
 
 wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
 {
-    m_clientWindow = new wxMDIClientWindow( this );
-    return m_clientWindow;
+    return new wxMDIClientWindow( this );
 }
 
 void wxMDIParentFrame::ActivateNext()
index a1cdc3b08979a8b5a0753b99001572b7159c61ec..d97213d79744dc19df967ac0afe0092fdb2db8cb 100644 (file)
@@ -120,11 +120,12 @@ bool wxGenericMDIParentFrame::Create(wxWindow *parent,
 #endif // wxUSE_MENUS
   }
 
-  wxFrame::Create( parent, id, title, pos, size, style, name );
+  if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
+      return false;
 
-  OnCreateClient();
+  m_pClientWindow = OnCreateClient();
 
-  return true;
+  return m_pClientWindow != NULL;
 }
 
 #if wxUSE_MENUS
@@ -248,11 +249,10 @@ wxGenericMDIClientWindow *wxGenericMDIParentFrame::GetClientWindow() const
 wxGenericMDIClientWindow *wxGenericMDIParentFrame::OnCreateClient()
 {
 #if wxUSE_GENERIC_MDI_AS_NATIVE
-    m_pClientWindow = new wxMDIClientWindow( this );
+    return new wxMDIClientWindow( this );
 #else
-    m_pClientWindow = new wxGenericMDIClientWindow( this );
+    return new wxGenericMDIClientWindow( this );
 #endif
-    return m_pClientWindow;
 }
 
 void wxGenericMDIParentFrame::ActivateNext()
index da981865bf31a1b38b23885cb3ed678dc9b8e004..4a7ddf7c9fe868e798ea233a039ed6e43f5356af 100644 (file)
@@ -99,11 +99,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
                               long style,
                               const wxString& name )
 {
-    wxFrame::Create( parent, id, title, pos, size, style, name );
+    if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
+        return false;
 
-    OnCreateClient();
+    m_clientWindow = OnCreateClient();
 
-    return true;
+    return m_clientWindow != NULL;
 }
 
 void wxMDIParentFrame::OnInternalIdle()
@@ -246,8 +247,7 @@ wxMDIClientWindow *wxMDIParentFrame::GetClientWindow() const
 
 wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
 {
-    m_clientWindow = new wxMDIClientWindow( this );
-    return m_clientWindow;
+    return new wxMDIClientWindow( this );
 }
 
 void wxMDIParentFrame::ActivateNext()
index e906cb600b668be125a1c0811a48f7dfc07af103..eeff4813e4c0d02c21186bb063feb78dece841a6 100644 (file)
@@ -128,11 +128,12 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
                               long style,
                               const wxString& name )
 {
-    wxFrame::Create( parent, id, title, pos, size, style, name );
+    if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) )
+        return false;
 
-    OnCreateClient();
+    m_clientWindow = OnCreateClient();
 
-    return true;
+    return m_clientWindow != NULL;
 }
 
 void wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height )
@@ -290,8 +291,7 @@ wxMDIClientWindow *wxMDIParentFrame::GetClientWindow() const
 
 wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
 {
-    m_clientWindow = new wxMDIClientWindow( this );
-    return m_clientWindow;
+    return new wxMDIClientWindow( this );
 }
 
 void wxMDIParentFrame::ActivateNext()
index 58a00ae186b50cad1700e7d0b280d047bab1212a..428a0dc41091279cd096179ff62cfc1cc5fe11e0 100644 (file)
@@ -119,12 +119,14 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
         m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next"));
     }
 
-    wxFrame::Create( parent , id , title , pos , size , style , name ) ;
+    if ( !wxFrame::Create( parent , id , title , pos , size , style , name ) )
+        return false;
+
     m_parentFrameActive = true;
 
-    OnCreateClient();
+    m_clientWindow = OnCreateClient();
 
-    return true;
+    return m_clientWindow != NULL;
 }
 
 wxMDIParentFrame::~wxMDIParentFrame()
@@ -275,9 +277,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
 // just return a new class)
 wxMDIClientWindow *wxMDIParentFrame::OnCreateClient()
 {
-    m_clientWindow = new wxMDIClientWindow( this );
-
-    return m_clientWindow;
+    return new wxMDIClientWindow( this );
 }
 
 // Responds to colour changes, and passes event on to children.