From 727953356df2db52b0292589782175fd6de37e03 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Oct 2003 23:08:39 +0000 Subject: [PATCH] removed calls to wxWindowBase::InitBase(), it is called from the ctor anyhow (and so was called twice) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/spinbutt.h | 10 ++-------- src/common/wincmn.cpp | 2 +- src/gtk/window.cpp | 3 --- src/gtk1/window.cpp | 3 --- src/mac/carbon/window.cpp | 6 ------ src/mac/window.cpp | 6 ------ src/mgl/window.cpp | 5 ----- src/motif/choice.cpp | 2 -- src/motif/spinbutt.cpp | 2 -- src/motif/window.cpp | 4 ---- src/msw/spinbutt.cpp | 2 -- src/os2/window.cpp | 6 ------ src/x11/window.cpp | 4 ---- 13 files changed, 3 insertions(+), 52 deletions(-) diff --git a/include/wx/spinbutt.h b/include/wx/spinbutt.h index 78b8c96225..a4f3073f77 100644 --- a/include/wx/spinbutt.h +++ b/include/wx/spinbutt.h @@ -39,7 +39,8 @@ class WXDLLEXPORT wxSpinButtonBase : public wxControl { public: - wxSpinButtonBase() { InitBase(); } + // ctor intiializes the range with the default (0..100) values + wxSpinButtonBase() { m_min = 0; m_max = 100; } // accessors virtual int GetValue() const = 0; @@ -60,13 +61,6 @@ public: bool IsVertical() const { return (m_windowStyle & wxSP_VERTICAL) != 0; } protected: - // init the base part of the control - void InitBase() - { - m_min = 0; - m_max = 100; - } - // the range value int m_min; int m_max; diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index a45a930fae..c8989dd81f 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -109,7 +109,7 @@ END_EVENT_TABLE() // ---------------------------------------------------------------------------- // the default initialization -void wxWindowBase::InitBase() +wxWindowBase::wxWindowBase() { // no window yet, no parent nor children m_parent = (wxWindow *)NULL; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index d9e5d422b1..4369b0a4d7 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2446,9 +2446,6 @@ wxWindow *wxGetActiveWindow() void wxWindowGTK::Init() { - // common init - InitBase(); - // GTK specific m_widget = (GtkWidget *) NULL; m_wxwindow = (GtkWidget *) NULL; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index d9e5d422b1..4369b0a4d7 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2446,9 +2446,6 @@ wxWindow *wxGetActiveWindow() void wxWindowGTK::Init() { - // common init - InitBase(); - // GTK specific m_widget = (GtkWidget *) NULL; m_wxwindow = (GtkWidget *) NULL; diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index fbe96110d2..6a23f1cab3 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -100,10 +100,6 @@ END_EVENT_TABLE() void wxWindowMac::Init() { - // generic - InitBase(); - - m_isBeingDeleted = FALSE; m_backgroundTransparent = FALSE; // as all windows are created with WS_VISIBLE style... @@ -116,8 +112,6 @@ void wxWindowMac::Init() m_hScrollBar = NULL ; m_vScrollBar = NULL ; - - m_label = wxEmptyString; } // Destructor diff --git a/src/mac/window.cpp b/src/mac/window.cpp index fbe96110d2..6a23f1cab3 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -100,10 +100,6 @@ END_EVENT_TABLE() void wxWindowMac::Init() { - // generic - InitBase(); - - m_isBeingDeleted = FALSE; m_backgroundTransparent = FALSE; // as all windows are created with WS_VISIBLE style... @@ -116,8 +112,6 @@ void wxWindowMac::Init() m_hScrollBar = NULL ; m_vScrollBar = NULL ; - - m_label = wxEmptyString; } // Destructor diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 86c0ae8534..0b3e3eaf3b 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -546,14 +546,9 @@ void wxWindowMGL::Init() wxLogFatalError(_("Cannot initialize display.")); } - // generic: - InitBase(); - // mgl specific: m_wnd = NULL; m_isShown = TRUE; - m_isBeingDeleted = FALSE; - m_isEnabled = TRUE; m_frozen = FALSE; m_paintMGLDC = NULL; m_eraseBackground = -1; diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 233a0670e5..27673013fa 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -52,8 +52,6 @@ wxChoice::wxChoice() void wxChoice::Init() { - InitBase(); - m_noStrings = 0; m_buttonWidget = (WXWidget) 0; m_menuWidget = (WXWidget) 0; diff --git a/src/motif/spinbutt.cpp b/src/motif/spinbutt.cpp index ec039edb0c..edd15fa3c9 100644 --- a/src/motif/spinbutt.cpp +++ b/src/motif/spinbutt.cpp @@ -274,8 +274,6 @@ bool wxSpinButton::Create( wxWindow *parent, wxWindowID id, SetName(name); - InitBase(); - m_windowId = ( id == -1 ) ? NewControlId() : id; bool isVert = IsVertical(); diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 63b1e37a52..423526f738 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -200,9 +200,6 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap) void wxWindow::Init() { - // generic initializations first - InitBase(); - // Motif-specific m_needsRefresh = TRUE; m_mainWidget = (WXWidget) 0; @@ -210,7 +207,6 @@ void wxWindow::Init() m_winCaptured = FALSE; m_isShown = TRUE; - m_isBeingDeleted = FALSE; m_hScrollBar = m_vScrollBar = diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 72e12fd14b..ee90758b65 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -127,8 +127,6 @@ bool wxSpinButton::Create(wxWindow *parent, const wxString& name) { // basic initialization - InitBase(); - m_windowId = (id == -1) ? NewControlId() : id; m_backgroundColour = parent->GetBackgroundColour() ; diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 842335a91d..5117bf5670 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -294,17 +294,11 @@ bool wxWindowOS2::OS2Command( void wxWindowOS2::Init() { - // - // Generic - // - InitBase(); - // // PM specific // m_bWinCaptured = FALSE; - m_isBeingDeleted = FALSE; m_fnOldWndProc = NULL; m_bUseCtl3D = FALSE; m_bMouseInWindow = FALSE; diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 93c612e4e9..f84025ee9b 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -99,9 +99,6 @@ END_EVENT_TABLE() void wxWindowX11::Init() { - // generic initializations first - InitBase(); - // X11-specific m_mainWindow = (WXWindow) 0; m_clientWindow = (WXWindow) 0; @@ -111,7 +108,6 @@ void wxWindowX11::Init() m_winCaptured = FALSE; m_needsInputFocus = FALSE; m_isShown = TRUE; - m_isBeingDeleted = FALSE; m_lastTS = 0; m_lastButton = 0; } -- 2.47.2