]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
missing commit
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 0589a9b70da967f717f5d568c34207a78cd80f6b..7673bca04a1c1eda58c235365cfdab99c6bccf12 100644 (file)
@@ -29,18 +29,18 @@ extern bool      g_blockEventsOnDrag;
 extern "C" {
 static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxToggleButton *cb)
 {
-    if (!cb->m_hasVMT || g_blockEventsOnDrag)
+    if (g_blockEventsOnDrag)
         return;
 
     // Generate a wx event.
-    wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
+    wxCommandEvent event(wxEVT_TOGGLEBUTTON, cb->GetId());
     event.SetInt(cb->GetValue());
     event.SetEventObject(cb);
     cb->HandleWindowEvent(event);
 }
 }
 
-wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent );
+wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent );
 
 // ------------------------------------------------------------------------
 // wxBitmapToggleButton
@@ -235,7 +235,7 @@ wxSize wxToggleButton::DoGetBestSize() const
 wxVisualAttributes
 wxToggleButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 {
-    return GetDefaultAttributesFromGTKWidget(gtk_toggle_button_new);
+    return GetDefaultAttributesFromGTKWidget(gtk_toggle_button_new());
 }
 
 #endif // wxUSE_TOGGLEBTN