X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b29bd6b44fdf18f6dcd789652dc2b05db8458b76..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/gtk/tglbtn.cpp diff --git a/src/gtk/tglbtn.cpp b/src/gtk/tglbtn.cpp index 47a55a53af..7673bca04a 100644 --- a/src/gtk/tglbtn.cpp +++ b/src/gtk/tglbtn.cpp @@ -21,6 +21,7 @@ #include "wx/button.h" #endif +#include #include "wx/gtk/private.h" extern bool g_blockEventsOnDrag; @@ -28,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 @@ -212,8 +213,8 @@ GtkLabel *wxToggleButton::GTKGetLabel() const void wxToggleButton::DoApplyWidgetStyle(GtkRcStyle *style) { - gtk_widget_modify_style(m_widget, style); - gtk_widget_modify_style(gtk_bin_get_child(GTK_BIN(m_widget)), style); + GTKApplyStyle(m_widget, style); + GTKApplyStyle(gtk_bin_get_child(GTK_BIN(m_widget)), style); } // Get the "best" size for this control. @@ -234,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