]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
Fix mem leak.
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 2f88a9757bce8d1cd051d924a98373b2ded127d9..9b9d064259bdcbd96ea60e130a8889c25fbf0644 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();
-extern bool g_isIdle;
 extern bool      g_blockEventsOnDrag;
 extern wxCursor   g_globalCursor;
 
@@ -289,7 +293,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*/)