]> git.saurik.com Git - wxWidgets.git/commitdiff
wxFrame::GetClientSize -> DoGetClientSize
authorRobert Roebling <robert@roebling.de>
Tue, 11 May 1999 20:41:00 +0000 (20:41 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 11 May 1999 20:41:00 +0000 (20:41 +0000)
  Minor wxDialog fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/frame.h
include/wx/gtk1/frame.h
src/gtk/dialog.cpp
src/gtk/frame.cpp
src/gtk1/dialog.cpp
src/gtk1/frame.cpp

index 6dda00580119a965672c94caacbdc05a72dfdb85..70bb8392b6be0622d8feca370a0b94b389484876 100644 (file)
@@ -62,8 +62,6 @@ public:
     virtual bool Show( bool show );
     virtual void Centre( int direction = wxHORIZONTAL );
 
-    virtual void GetClientSize( int *width, int *height ) const;
-
     virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
             const wxString& name = _T("statusBar"));
     virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
@@ -123,6 +121,7 @@ protected:
                            int sizeFlags = wxSIZE_AUTO);
 
     virtual void DoSetClientSize(int width, int height);
+    virtual void DoGetClientSize( int *width, int *height ) const;
 
 private:
     DECLARE_EVENT_TABLE()
index 6dda00580119a965672c94caacbdc05a72dfdb85..70bb8392b6be0622d8feca370a0b94b389484876 100644 (file)
@@ -62,8 +62,6 @@ public:
     virtual bool Show( bool show );
     virtual void Centre( int direction = wxHORIZONTAL );
 
-    virtual void GetClientSize( int *width, int *height ) const;
-
     virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
             const wxString& name = _T("statusBar"));
     virtual wxStatusBar *OnCreateStatusBar( int number, long style, wxWindowID id,
@@ -123,6 +121,7 @@ protected:
                            int sizeFlags = wxSIZE_AUTO);
 
     virtual void DoSetClientSize(int width, int height);
+    virtual void DoGetClientSize( int *width, int *height ) const;
 
 private:
     DECLARE_EVENT_TABLE()
index 92622c8f68c36411857ab565e7eb18c7e72d5dfa..a6616c919c496678ce923d704c210907b9f362f3 100644 (file)
@@ -575,6 +575,8 @@ void wxDialog::SetIcon( const wxIcon &icon )
     m_icon = icon;
     if (!icon.Ok()) return;
 
+    if (!m_widget->window) return;
+
     wxMask *mask = icon.GetMask();
     GdkBitmap *bm = (GdkBitmap *) NULL;
     if (mask) bm = mask->GetBitmap();
index a0c6bb403fcc13d16ff8f85a27173b7478dbb1f2..365f857639e55869b350db9cfb9a8edd8a4673ca 100644 (file)
@@ -538,11 +538,11 @@ void wxFrame::Centre( int direction )
     Move( x, y );
 }
 
-void wxFrame::GetClientSize( int *width, int *height ) const
+void wxFrame::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
 
-    wxWindow::GetClientSize( width, height );
+    wxWindow::DoGetClientSize( width, height );
     if (height)
     {
         /* menu bar */
index 92622c8f68c36411857ab565e7eb18c7e72d5dfa..a6616c919c496678ce923d704c210907b9f362f3 100644 (file)
@@ -575,6 +575,8 @@ void wxDialog::SetIcon( const wxIcon &icon )
     m_icon = icon;
     if (!icon.Ok()) return;
 
+    if (!m_widget->window) return;
+
     wxMask *mask = icon.GetMask();
     GdkBitmap *bm = (GdkBitmap *) NULL;
     if (mask) bm = mask->GetBitmap();
index a0c6bb403fcc13d16ff8f85a27173b7478dbb1f2..365f857639e55869b350db9cfb9a8edd8a4673ca 100644 (file)
@@ -538,11 +538,11 @@ void wxFrame::Centre( int direction )
     Move( x, y );
 }
 
-void wxFrame::GetClientSize( int *width, int *height ) const
+void wxFrame::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") );
 
-    wxWindow::GetClientSize( width, height );
+    wxWindow::DoGetClientSize( width, height );
     if (height)
     {
         /* menu bar */