]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/slider.cpp
Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / gtk / slider.cpp
index f3ab24213f9f949e8eda96895e50e4a8b61325c5..582a6d53d799e0c80a913d36802cebb3c34ccaad 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
@@ -141,10 +141,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 
     m_parent->DoAddChild( this );
 
-    PostCreation();
-    InheritAttributes();
-
-    Show( TRUE );
+    PostCreation(size);
 
     return TRUE;
 }
@@ -289,4 +286,11 @@ void wxSlider::GtkEnableEvents()
                         (gpointer) this );
 }
 
+// static
+wxVisualAttributes
+wxSlider::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    return GetDefaultAttributesFromGTKWidget(gtk_vscale_new);
+}
+
 #endif