X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff7485d88bb690a5ce638bd1cc39566dfa0f37ba..e9d7a889634ee5cbe90bcc639c6197a29169be3a:/src/gtk/infobar.cpp?ds=sidebyside diff --git a/src/gtk/infobar.cpp b/src/gtk/infobar.cpp index e386a95f96..9963cdb516 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 @@ -209,9 +213,9 @@ GtkWidget *wxInfoBar::GTKAddButton(wxWindowID btnid, const wxString& label) GtkWidget *button = gtk_info_bar_add_button ( GTK_INFO_BAR(m_widget), - label.empty() + (label.empty() ? GTKConvertMnemonics(wxGetStockGtkID(btnid)) - : label, + : label).utf8_str(), btnid ); @@ -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