From f924129679e25bdc0bb8d4accf47bc420d4b802d Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 11 May 1999 20:41:00 +0000 Subject: [PATCH] wxFrame::GetClientSize -> DoGetClientSize 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 | 3 +-- include/wx/gtk1/frame.h | 3 +-- src/gtk/dialog.cpp | 2 ++ src/gtk/frame.cpp | 4 ++-- src/gtk1/dialog.cpp | 2 ++ src/gtk1/frame.cpp | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/wx/gtk/frame.h b/include/wx/gtk/frame.h index 6dda005801..70bb8392b6 100644 --- a/include/wx/gtk/frame.h +++ b/include/wx/gtk/frame.h @@ -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() diff --git a/include/wx/gtk1/frame.h b/include/wx/gtk1/frame.h index 6dda005801..70bb8392b6 100644 --- a/include/wx/gtk1/frame.h +++ b/include/wx/gtk1/frame.h @@ -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() diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 92622c8f68..a6616c919c 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -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(); diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index a0c6bb403f..365f857639 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -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 */ diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 92622c8f68..a6616c919c 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -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(); diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index a0c6bb403f..365f857639 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -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 */ -- 2.45.2