]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
Fix crash in wxGTK wxPopupWindow when creating it without parent.
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 1ad831108f722b2d0940672ffb5be01132251d2d..7673bca04a1c1eda58c235365cfdab99c6bccf12 100644 (file)
@@ -33,14 +33,14 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog
         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