+#endif // GTK+ 2.6+
+#endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON
+
+ g_object_ref(m_widget);
+
+ if (m_caption != wxMessageBoxCaptionStr)
+ gtk_window_set_title(GTK_WINDOW(m_widget), wxGTK_CONV(m_caption));
+
+ GtkDialog * const dlg = GTK_DIALOG(m_widget);
+
+ // we need to add buttons manually if we use custom labels or always for
+ // Yes/No/Cancel dialog as GTK+ doesn't support it natively and when using
+ // Hildon we add all the buttons manually as it doesn't support too many of
+ // the combinations we may have
+#if wxUSE_LIBHILDON
+ static const bool addButtons = true;
+#else // !wxUSE_LIBHILDON
+ const bool addButtons = buttons == GTK_BUTTONS_NONE;
+#endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON
+
+ if ( m_dialogStyle & wxYES_NO ) // Yes/No or Yes/No/Cancel dialog