X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7193f282111a7658c9c47b8817b3412b35c30fe..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/gtk/infobar.cpp?ds=sidebyside diff --git a/src/gtk/infobar.cpp b/src/gtk/infobar.cpp index f6ceee09db..defc0738aa 100644 --- a/src/gtk/infobar.cpp +++ b/src/gtk/infobar.cpp @@ -82,8 +82,12 @@ namespace inline bool UseNative() { +#ifdef __WXGTK3__ + return true; +#else // native GtkInfoBar widget is only available in GTK+ 2.18 and later return gtk_check_version(2, 18, 0) == 0; +#endif } } // anonymous namespace @@ -193,7 +197,7 @@ void wxInfoBar::Dismiss() void wxInfoBar::GTKResponse(int btnid) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, btnid); + wxCommandEvent event(wxEVT_BUTTON, btnid); event.SetEventObject(this); if ( !HandleWindowEvent(event) ) @@ -275,7 +279,7 @@ void wxInfoBar::DoApplyWidgetStyle(GtkRcStyle *style) wxInfoBarGeneric::DoApplyWidgetStyle(style); if ( UseNative() ) - gtk_widget_modify_style(m_impl->m_label, style); + GTKApplyStyle(m_impl->m_label, style); } #endif // wxUSE_INFOBAR