]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1447666 ] Fix obscure GTK wxListBox construction bug
authorJulian Smart <julian@anthemion.co.uk>
Sat, 11 Mar 2006 13:24:07 +0000 (13:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 11 Mar 2006 13:24:07 +0000 (13:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/listbox.h
src/gtk/listbox.cpp

index 7804a966254e7a39ae6fb3ea66e3e41e26635e24..544d10dd0c864d749a8c85b7f0697eec7641b5a1 100644 (file)
@@ -18,7 +18,10 @@ class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
 {
 public:
     // ctors and such
-    wxListBox();
+    wxListBox()
+    {
+        Init();
+    }
     wxListBox( wxWindow *parent, wxWindowID id,
             const wxPoint& pos = wxDefaultPosition,
             const wxSize& size = wxDefaultSize,
@@ -27,9 +30,7 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr )
     {
-#if wxUSE_CHECKLISTBOX
-        m_hasCheckBoxes = FALSE;
-#endif // wxUSE_CHECKLISTBOX
+        Init();
         Create(parent, id, pos, size, n, choices, style, validator, name);
     }
     wxListBox( wxWindow *parent, wxWindowID id,
@@ -40,13 +41,13 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr )
     {
-#if wxUSE_CHECKLISTBOX
-        m_hasCheckBoxes = FALSE;
-#endif // wxUSE_CHECKLISTBOX
+        Init();
         Create(parent, id, pos, size, choices, style, validator, name);
     }
     virtual ~wxListBox();
 
+    void Init(); //common construction
+
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
index d908514a19232f1722b643d38c525d1171ee2d1f..2028db5fea716e7ec34835bce5c3c924cc3379d9 100644 (file)
@@ -419,7 +419,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
 // construction
 // ----------------------------------------------------------------------------
 
-wxListBox::wxListBox()
+void wxListBox::Init()
 {
     m_treeview = (GtkTreeView*) NULL;
 #if wxUSE_CHECKLISTBOX