+ wxASSERT_MSG( button, "unexpectedly failed to add button to info bar" );
+
+ return button;
+}
+
+void wxInfoBar::AddButton(wxWindowID btnid, const wxString& label)
+{
+ if ( !UseNative() )
+ {
+ wxInfoBarGeneric::AddButton(btnid, label);
+ return;
+ }
+
+ // if we had created the default close button before, remove it now that we
+ // have some user-defined button
+ if ( m_impl->m_close )
+ {
+ gtk_widget_destroy(m_impl->m_close);
+ m_impl->m_close = NULL;
+ }
+
+ GtkWidget * const button = GTKAddButton(btnid, label);
+ if ( button )
+ m_impl->m_buttons.push_back(wxInfoBarGTKImpl::Button(button, btnid));