]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
fixed a big memory leak in DoDrawBitmap() (coverity checker CID 57)
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 2f88a9757bce8d1cd051d924a98373b2ded127d9..722d7f965901ea3350caf6b586176c60ac03d258 100644 (file)
 
 #if wxUSE_TOGGLEBTN
 
+// FIXME: Use GtkImage instead of GtkPixmap.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 extern void wxapp_install_idle_handler();
@@ -289,7 +295,7 @@ void wxToggleButton::SetLabel(const wxString& label)
 
     wxControl::SetLabel(label);
 
-    gtk_label_set(GTK_LABEL(GTK_BIN(m_widget)->child), wxGTK_CONV(GetLabel()));
+    gtk_label_set_text(GTK_LABEL(GTK_BIN(m_widget)->child), wxGTK_CONV(GetLabel()));
 }
 
 bool wxToggleButton::Enable(bool enable /*=true*/)